Commit Graph

1209 Commits

Author SHA1 Message Date
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
Connor Peet
f9dd5e1a8d chat: better problems integration (#241276)
chat: allow referencing and dragging in diagnostics

- There is a new proposal which adds `ChatReferenceDiagnostic` as a
  prompt reference type
- You can now pick "Problems..." as part of the chat attachment context
- You can drag and drop files and individual diagnostics from the
  Problems view into chat. Previously trying to do this would just
  attach the file.
2025-02-20 02:38:32 +01:00
Benjamin Pasero
6cb4d19196 . 2025-02-19 14:03:20 +01:00
Benjamin Pasero
da6fc30c98 rewind 2025-02-19 12:53:49 +01:00
Don Jayamanne
dcc65bffea Add Chat NotebookEdit API 2025-02-14 13:16:45 +11:00
Tyler James Leonhardt
99a63c4a3c Allow createIfNone to also use detail (#240565)
Fixes https://github.com/microsoft/vscode/issues/240295
2025-02-13 18:08:30 +01:00
Rob Lourens
e6f3e3a874 Support dynamic tool message after tool runs (#240586) 2025-02-13 00:08:21 +01:00
Rob Lourens
5e5183a362 🔪 DELETE chatVariableResolver API proposal 💀 (#239755)
* 🔪 DELETE chatVariableResolver API proposal 💀

* Remove import

* Remove chat variable test

* Bump distro
2025-02-07 19:03:21 +01:00
Benjamin Pasero
86b64aa4bc files - abandon watcher correlation API proposal (#239906)
* files - abandon watcher correlation API proposal

* fix compile
2025-02-07 10:43:11 +01:00
Rob Lourens
4aa863ca56 Move chat participant detection to private.d.ts (#239754) 2025-02-05 17:34:43 -08:00
Joyce Er
802eba821f refactor: clean up unused detectedParticipant API (#239566) 2025-02-04 07:55:33 +01:00
Anthony Kim
57e4810cae Expose shell type to extensions (#238071)
* copy everything from #237624

* try to better word notes in proposed.d.ts

* why is test being so flaky

* try sending one more text

* strictEqual only on isInteractedWith always fails

* update the name as recommended

* embed to make sure we are selecting event we are interested in as recommended

* add node as part of TerminalShellType

* getting type ..extHostTypes.TerminalShellType.Bash is not comparable to type ..vscode.TerminalShellType.Bash

* just use one enum?

* figured out how to get from extHostTypes

* clean up
2025-01-17 16:19:02 -05:00
Martin Aeschlimann
37a00332c7 remove old MappedEditsProvider 2025-01-15 21:21:58 +01:00
Matt Bierner
23b62bc580 Merge pull request #237443 from mjbvz/steady-leopard
Finalize paste api and drop api tweaks
2025-01-08 01:03:37 -08:00
Matt Bierner
4daea74ba9 Finalize paste api and drop api tweaks
Fixes #30066

This finalizes the documentPaste api. This api allows extensions to attach metadata on text copy and change how content is pasted. Some examples:

- Updating imports for pasted code
- Inserting an image as an attachment in notebooks
- Pasting files converts them to relative text paths
2025-01-07 14:57:16 -08:00
Rob Lourens
70866d5287 Enable "tools agent" (#237369)
* Add an edit tool (doesn't work)

* More

* Properly wait on text edits to be done applying

* Better editFile tool

* Fixes

* Be more insistent with editFile instructions

* Add "agent mode" UI

* Fix error thrown when calling tools sometimes

* Persist chat agent mode state

* Hide editing tools from other extensions for now

* Fix test build issues

* Allow disabling tools agent mode

* Remove comment

* Fix codeblock index properly

* Cleanup

* Cleanup

* Remove ccreq check

* Rename for clarity
2025-01-07 04:22:42 +00:00
Johannes Rieken
d162ceb7fe extension events use new ExtensionError so that these errors don't make it into "normal" error telemetry (#236336)
* extension events use new `ExtensionError` so that these errors don't make it into "normal" error telemetry

fixes https://github.com/microsoft/vscode/issues/232914

* fix tests
2024-12-17 15:15:31 +01:00
Alex Ross
ce50bd4876 Remove unused showLocal proposal (#236032)
* Remove unused showLocal proposal

* No local build error??
2024-12-15 17:17:17 +00:00
Connor Peet
436f1e99c1 testing: finalize attributable test coverage API (#234686)
* testing: finalize attributable test coverage API

Closes #212196

* fixup
2024-11-26 18:53:38 +00:00
Tyler James Leonhardt
5cb3edbfc4 Move env.nativeHandle to window.nativeHandle (#234395) 2024-11-22 06:50:12 +05:30
Tyler James Leonhardt
d7ab35a98e handle: string to nativeHandle: UInt8Array based on feedback (#234378)
Feedback in https://github.com/microsoft/vscode/issues/229431
2024-11-21 11:58:49 -07:00
Megan Rogge
d79858c114 add support for file/folder terminal completions (#234289) 2024-11-21 07:05:55 +05:30
Ladislau Szomoru
975e05cd1c DiffInformation API - cleanup + renames (#234248)
* Refactoring + renaming things

* Renamed TextEditorDiffKind to TextEditorChangeKind
2024-11-20 14:46:04 +05:30
Megan Rogge
a7ba900c98 add kind, kind to icon map 2024-11-19 14:07:54 -05:00
Megan Rogge
346a744203 adjust api 2024-11-19 13:40:38 -05:00
Megan Rogge
417f23b545 Merge branch 'main' into merogge/terminal-suggest-wip 2024-11-18 10:26:11 -05:00
Ladislau Szomoru
30043071a3 TextEditorDiffInformation API proposal (#233896)
* WIP - initial implementation

* Introduce the diff model service

* Remove code that is not needed

* Handle DiffEditor

* Performance optimization

* Refactor code

* More cleanup (V1)

* More cleanup (V2)

* More cleanup (V2.1)

* Pull request feedback

* Remove debugging statements

* Update mock proxy to fix tests

* Add proposed api check
2024-11-18 15:38:21 +01:00
Aaron Munger
b8ad8f5101 put fix/explain with copilot directly in the status bar (#233927)
* put copilot fix and explain in status bar

* fix up actions

* watch for execution error within the viewmodel

* make observable publicly readonly

* remove unused service

* fix tests

* remove unused import
2024-11-15 11:36:12 -08:00
Megan Rogge
45e4fda6e8 clean up 2024-11-13 11:03:14 -06:00
Megan Rogge
0385106215 Merge branch 'main' into merogge/terminal-suggest-wip 2024-11-13 08:51:12 -06:00
Joyce Er
89f3c39493 feat: allow chat related file providers to specify a description at registration and for results (#233731) 2024-11-12 23:08:34 +01:00
Megan Rogge
0dab339ce8 Merge branch 'main' into merogge/terminal-suggest-wip 2024-11-12 15:22:27 -06:00
Joyce Er
8fd40e611f feat: scaffold chat editing related files provider api (#233451) 2024-11-08 15:21:48 -08:00