Commit Graph

1198 Commits

Author SHA1 Message Date
Osvaldo Ortega
363cfcdc7a Typos 2025-07-16 22:50:02 -07:00
Osvaldo Ortega
50b691a23c Chat session provider 2025-07-16 19:13:05 -07:00
Connor Peet
d86855a647 tools: update tools of a chat request when they change (#256321)
Makes the `userSelectedTools` passed into the chat agent service
observable such that the tools of the ongoing request update as new
tools come in. The benefit of this versus other (previous) approaches
is that it reflects the enablement/disablement state of the picker
(which is likely to get additional controls in the future) and works
without special tagging.

@roblourens / @DonJayamanne I think with this we can get rid of

0d6f5516d2/src/extension/tools/vscode-node/toolsService.ts (L118-L122)

which was added for Jupyter iirc.

Closes #254684
2025-07-16 16:10:47 -07:00
Henning Dieterichs
67b27dba35 Implements data channels (#256226) 2025-07-16 13:43:02 +02:00
Megan Rogge
ee02bbaa82 modify the right arg (#255244) 2025-07-11 11:41:23 -04:00
Megan Rogge
141aa8582a check if thisArgs are defined (#255214) 2025-07-10 13:03:07 -07:00
Matt Bierner
50d370bd3b Add basic API for custom rendering inside of chat output
First sketch for a simple API that lets extensions render content in chat using a webview

Right now this is targeting results from tool calls but we could potentially extend this to work with a more generic version of our chat response image part
2025-07-09 18:08:20 -07:00
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