Commit Graph

1091 Commits

Author SHA1 Message Date
Megan Rogge
9362739ef4 add terminal to taskExecution (#254477)
fix #234440
2025-07-08 12:52:36 -04:00
Henning Dieterichs
488d6df795 Implements edit source tracking through proposed API (#252430)
Implements edit source tracking through proposed API
2025-06-26 10:52:51 +02:00
Henning Dieterichs
b31fceb67b Implements cancellationToken tracking (#251712)
* Implements cancellationToken tracking

* Fixes CI
2025-06-18 12:04:22 +02:00
Henning Dieterichs
82054fce09 Removes deprecated inline edit proposal 2025-06-16 17:36:59 +02:00
Tyler James Leonhardt
c235626145 issuer -> authorizationServer refactor (#250359)
* `issuer` -> `authorizationServer` refactor

Also:
* adds `authorizationServerGlobs` to the authentication contribution schema
* removes ugly MCP issuer hack and instead plumbs the authorizationServer down to the new auth providers
2025-06-02 17:38:21 -07:00
Tyler James Leonhardt
abf1002a81 Add loopback & device code flows (#250015) 2025-05-28 16:40:57 -07:00
Tyler James Leonhardt
3089b8262f Initial support of dynamic auth providers for MCP (#249501)
* Initial support of dynamic auth providers for MCP

With this change, we support being able to on-the-fly create an Auth Provider based on an oauth-authorization-server's metadata.

MCP then leverages this because by following the MCP spec we can figure out the oauth server metadata and then request a token from that server.

The tokens are persisted and will be refreshed on demand... all based on the OAuth spec.

* Connor's feedback & some type fixes
2025-05-22 17:11:36 +00:00
Tyler James Leonhardt
86efdcd2c1 Introduce Issuer handling in the Authentication stack (#248948)
Mostly plumbing... this enables:
```
vscode.authentication.getSession('microsoft', scopes, { issuer: "https://login.microsoftonline.com/common/v2.0" });
```
And the respective API for an auth providers to handle it being passed in.

This props up work in MCP land which needs a way to map an issuer to an auth provider... but I certainly see utility outside of that space.

Fixes https://github.com/microsoft/vscode/issues/248775#issuecomment-2876711396
2025-05-14 23:02:15 +02:00
Johannes Rieken
e29c92acaf remove old notebookCellExecutionState proposal (#248522)
re https://github.com/microsoft/vscode/issues/124970#issuecomment-2864279668
2025-05-12 02:36:15 +02:00
Rob Lourens
aeddbbb7c2 Add ChatPrepareToolInvocationPart (#248660)
* Implement ChatPrepareToolInvocationPart for when tool calls begin

* Just show "Working" progress
2025-05-12 01:50:43 +02:00
Connor Peet
c67e9f96ff mcp: finalize MCP server definition provider API (#248244)
* mcp: finalize MCP server definition provider API

Closes #243522

* comments
2025-05-07 08:58:34 -07:00
Rob Lourens
3cd1709046 Delete LanguageModelExtraDataPart (#248180)
* Delete LanguageModelExtraDataPart
#246980

* Clean up helper types

* Plumb non-image data through
2025-05-05 20:16:37 -07:00
Justin Chen
07906e72e6 Merge branch 'main' into connor4312/kabutops 2025-04-24 10:04:33 -07:00
Rob Lourens
7d87048781 LanguageModelDataPart as arbitrary mimeType+data+factory functions (#247238)
* LanguageModelDataPart as arbitrary mimeType+data+factory functions
Like NotebookCellOutputItem

* change languagemodel data part shape

* rm whitespace

---------

Co-authored-by: Your Name <justchen@microsoft.com>
2025-04-24 09:27:52 -07:00
Connor Peet
0be40f9403 mcp: adopt api feedback on extension API (#247245) 2025-04-23 14:22:49 -07:00
Raymond Zhao
68f70843d6 Add two-phase AI Settings Search (#247177)
* Add AI settings search proposed API
* Use Progress API
* Implement new API into remote search provider
2025-04-23 19:20:23 +00:00
Ladislau Szomoru
970d4f34b9 SCM - maintain quick diff provider visibility (#247129)
Maintain selection
2025-04-22 15:31:29 +02:00
Connor Peet
eb62aa4adb Merge remote-tracking branch 'origin/main' into pr/justschen/246553 2025-04-21 14:59:52 -07:00
Rob Lourens
ef9b85d17a Optional cancel token (#247040)
Fix microsoft/vscode-copilot#9642
2025-04-20 21:35:28 -07:00
Rob Lourens
714f54156f Add editedFileEvents (#246996)
* Start plumbing working set events

* more

* More fixes

* Update tests
2025-04-20 16:54:07 +00:00
Rob Lourens
dd6b05c349 LanguageModel API updates to support prompt caching and thinking tokens (#246981)
* LanguageModel API updates to support prompt caching and thinking tokens
Add LanguageModelExtraDataPart which contains any arbitrary model-specific data
microsoft/vscode-copilot#15716

* Remove LanguageModelChatMessage3

* Bump API versions
2025-04-19 18:21:22 -07:00
Connor Peet
dede7bb4b7 mcp: refine extension API (#246856)
- Replace SSE with HTTP in the API (although this still supports the
  same SSE fallback we otherwise have, this is not documented)
- Add a new `resolveMcpServerDefinition` step that is only run before
  the MCP server is started -- both from a cache or from a running
  extension. This lets extensions do user interaction is a more correct way.
- Add appropriate docs and such.
2025-04-17 21:17:04 +00:00
Sandeep Somavarapu
18fcd02565 support rendering extensions in chat (#246666) 2025-04-15 14:30:19 -07:00
Osvaldo Ortega
59599ee5a7 Merge pull request #246558 from microsoft/osortega/ai-keyword-support
Support for AI suggested keywords
2025-04-14 16:36:48 -07:00
Osvaldo Ortega
e2ed4adfea Support for AI suggested keywords 2025-04-14 16:09:49 -07:00
Your Name
b90d747939 images in tool call first pass 2025-04-14 14:59:47 -07:00
Benjamin Pasero
d5fd33b8eb encoding - make options optional again (#246492)
* encoding - make `options` optional again

* tweaks

* updates
2025-04-14 12:46:39 +00:00
Benjamin Pasero
f0ee501c7f API: Finalise text document encoding (fix #241449) (#246016)
* API: Finalise text document encoding (fix #241449)

* address feedback
2025-04-10 18:28:21 +00:00
Henning Dieterichs
9c6b2d234a Adds InlineCompletionItemProvider.handleEndOfLifetime 2025-04-10 14:12:32 +02:00
Johannes Rieken
254a65698c chore - cleanup chat provider proposal (#245436) 2025-04-03 14:03:47 +02:00
Justin Chen
7f01c2f4f4 switch image mimetype to enum (#244776)
switch mimetype to enum
2025-03-26 11:31:25 -07:00
Matt Bierner
d8da0ea5ed Merge pull request #244302 from mjbvz/chat-status
Add chat status API proposal
2025-03-25 01:05:44 -07:00
Tyler James Leonhardt
c244b199e2 Delete Unused API (#244529)
ref https://github.com/microsoft/vscode/issues/243615
2025-03-25 01:48:56 +01:00
Matt Bierner
70c66eb148 Merge branch 'main' into chat-status 2025-03-24 08:27:51 -07:00
Rob Lourens
2bdf282f0a Pass model to tools (#244323)
* Pass model to tools
When tools make requests, they should use the right model. So we
- save the model id on the request
- look it up when the tool is invoked
- resolve it to a LanguageModelChat in the EH

* Fix build
2025-03-22 06:42:06 +00:00
Matt Bierner
cb6b626928 Add chat status API proposal
Adds a new proposal that lets extensions contribute to a basic status item for chat
2025-03-21 13:33:27 -07:00
Rob Lourens
dd6e06a8f2 Add onDidDisposeChatSession to enable closing chat terminals when a chat session ends (#244030) 2025-03-19 20:22:38 +01:00
Justin Chen
23b3085b84 allow extensions to make LLM requests with image attachment (#243151)
* first pass language model image

* add language model 2 instead

* more languagemodel2

* change api shape

* add back original languagemodelchatmessage

* fix imports

* allow old languageModelChatMessage to also b used

* handle vsbuffer case

* make sure to resize images before sending the chat request

* remove detail

* remove whitespace

* rename to languageModelDataPart
2025-03-18 14:29:23 -07:00
Tyler James Leonhardt
558d5df792 Add proposed API for trusted domains and for web page extraction (#243811)
* Add proposed API for trusted domains and for web page extraction

I don't love the shape of this API but I'm going with this for now to play with it.

This will help Chat provide contents of web pages as context but also allow it full control of the tool.

ref https://github.com/microsoft/vscode/issues/243615

* use a different url

* delete the test until we have a good way to mock
2025-03-17 22:26:13 +01:00
Megan Rogge
281e0a55b0 make task problem matcher events API simpler (#243756) 2025-03-17 16:12:35 +01:00
Johannes
18072d9217 Merge branch 'main' into joh/genetic-canidae 2025-03-14 14:16:00 +01:00
Johannes Rieken
6da38d10e9 make select tools for all tools, not just MCP tools (#243551)
* add `ChatRequest#tools`

* make select tools for all tools, not just MCP tools

* make the select tools work with all tools, group by MCP server, extension, and rest
* fill in the new ChatRequest#selectTools API with selected tools
* have the MCP server command be its own command with its own custom rendering

* remove old comment
2025-03-14 13:41:18 +01:00
Connor Peet
0f278b9a16 fixup tests and to .d.ts todos 2025-03-13 23:05:14 -07:00
Connor Peet
a1e2602ab0 wip on more extension-contributed collections 2025-03-13 18:17:39 -07:00
Johannes
00d7e7b228 wip up McpConfigurationProvider api
This allows to dynamically compute the well-known mcp configuration object so that config can be made simpler
2025-03-13 17:57:32 +01:00
Megan Rogge
870d14c7b3 add task status API (#243092) 2025-03-12 10:24:22 -04:00
Connor Peet
eb700003eb mcp: initial hacking
This is some basic work to get MCP hooked up. It's enough to discover
and establish connections to MCP servers on the machine with very very
basic commands to manage them:

![](https://memes.peet.io/img/25-03-2220f93e-3d1f-41ab-867e-0b9ba616ec6f.mp4)

Refs #242864

The McpRegistry registers both collections of servers (from various
config files) and 'delegates', which is currently _only_ the node
extension host but is pretty generic and so could point at other
processes in the future. SSE could even be served from the renderer when
we aren't on a remote.

It wraps into IMcpServerConnection's, which do some basic connection
management and expose the McpServerRequestHandler which speaks JSON-RPC
to the MCP server. This is wrapped into the IMcpServer which is the
complete, stateful representation of the server. It does stuff like
caching discovered tools such that they can be viewed and controlled
even when the MCP server isn't running.

The IMcpService is the 'public' entry for other VS Code features. Its
API is very simple right now, exposing an observable of the available
servers, which should be easy for chat to consume.

Still need to get some good tests going, add proper and more discovery,
and excercise currently-untested API. SSE is also a stub right now.
2025-03-09 12:14:51 -07:00
Rob Lourens
cfe8020e4e Add ChatErrorLevel to ChatErrorDetails (#242139)
We need this so that the error when the rate limit is exceeded can show as 'info' without having to set `responseIsFiltered`
2025-02-27 03:48:19 +01:00
Rob Lourens
45f744af6c Custom tool invocation renderer for terminal tool (#241768)
* Custom tool invocation renderer for terminal tool
Enable editing the terminal command

* Fix issues
2025-02-24 14:35:06 -08:00
Benjamin Pasero
89fef848ef Provide encoding-related APIs for editor extensions (#824) (#240804) 2025-02-20 12:04:34 +01:00