Commit Graph

130 Commits

Author SHA1 Message Date
Rob Lourens
ff740b1cef Plumb 'isBuiltin' for chat modes into request (#298486)
* Plumb 'isBuiltin' for chat modes into request
https://github.com/microsoft/vscode-internalbacklog/issues/6884

* Fix test
2026-02-28 22:28:32 +01:00
Don Jayamanne
b9eb51b0f2 Support display commands for terminal commands in background agents (#296261) 2026-02-19 12:48:38 +01:00
Matt Bierner
de93d65144 Remove a few more chat session id usages
For #274403

Confirmed that the api change should not effect copilot-chat
2026-02-17 17:17:10 -08:00
Matt Bierner
692b629077 Make chatHooks proposal self contained 2026-02-09 09:55:11 -08:00
Matt Bierner
40df840a80 Fix build error when using tsgo
We added a dependency between api proposals. Looks like tsgo is more strict about not picking this up automatically so we need to make sure there is an import so the dependency is picked up
2026-02-09 09:18:10 -08:00
Rob Lourens
1aa235610c Support rendering subagent details from external agents (#293705)
* Support rendering subagent details from external agents

* fix tests
2026-02-07 23:07:45 +00:00
Rob Lourens
7b1aae991c Track external tool calls (#290886)
* Track external tool calls

* Tools in progress work, subagents do not

* Remove the subagent stuff

* Safer

* Remove this

* Build fix

* Bump proposed API
Because this would lead to showing all tool calls twice in CC

* Remove this
2026-02-07 13:06:40 -08:00
Justin Chen
92f3084076 hook streaming first pass (#293514)
* hooks streaming first pass

* Update src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* update styling

* modify api shape

* address some comments + do not render for now

* new icons + no more continue

* make sure we render right, some comments addressed

* uncomment that stuffs

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-06 16:03:24 -08:00
Alex Ross
6764590f38 Switch over to command for PR chat response type (#293161)
* Switch over to command for PR chat response type
Part of #290997

* Fix failing test
2026-02-06 09:51:09 +00:00
Don Jayamanne
c35bf16a13 Support serialized tool call results for generic tools (similar to MCP, display input and outupt) (#292773)
* Support serialized tool call results for generic tools (similar to MCP, display input and outupt)

* Updates

* Updates
2026-02-04 16:26:02 -08:00
Don Jayamanne
b5f1376218 Support serialized tool call results that return resources (e.g. rg, glob, etc) (#292768)
* Support serialized tool call results that return resources (e.g. rg, glob, etc)

* Fixes

* add tests

* Fixes
2026-02-04 19:46:24 +00:00
Don Jayamanne
df57568c74 Support rendering serialized todo information from background agents (#292212)
* Support rendering serialized todo information from background agents

* Update src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/vs/workbench/api/common/extHostTypeConverters.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Updates

* updates

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-03 16:57:06 +11:00
Logan Ramos
c733d2c421 Adopt api versioning on chat participant addition (#292318) 2026-02-02 14:50:03 +00:00
Logan Ramos
481b139199 Have usage be on the stream rather than on result (#291944)
* Have usage be on the stream rather than on result

* Better lookup
2026-01-30 18:29:31 +00:00
Karthik Nadig
f7dc7a5d16 Add question feature (#289568)
* Initial commit of the question carousel

* some cleanup

* .

* .

* .

* .

* remove chat blocking on tool call

* refactor: update question carousel handling and remove blocking behavior

* feat: implement question carousel handling and response resolution

* feat: enhance question carousel with logging and auto-skip functionality

* refactor: remove question carousel data from various interfaces and implementations

* feat: enhance chat question carousel with answer restoration and default value handling

* feat: add ignore functionality to chat question carousel with appropriate handling

* yolo-mode support
2026-01-23 15:03:11 -08:00
Don Jayamanne
735afe80ef Display terminal tool results for bg sessions (#289845) 2026-01-23 10:31:37 +01:00
Connor Peet
2963db6f22 Merge remote-tracking branch 'origin/main' into dev/bhavyau/tools-model 2026-01-22 09:57:31 -08:00
Logan Ramos
e824922b6e Refine context usage widget (#289677)
* Add usage data to chat result api

* Start prototyping status icon

* Cleanup old context widget

* Cleanup widget

* Grow outwards

* Some cleanups and refacotors

* Make actions contributable

* Add action header

* Cleanup action rendering

* Add sub categories of token usage

* cleanup diff

* Handle copilot feedback
2026-01-22 17:55:37 +00:00
Connor Peet
f917cd9185 Merge remote-tracking branch 'origin/main' into dev/bhavyau/tools-model 2026-01-22 09:36:14 -08:00
Don Jayamanne
0ffdfb45f4 Improved MCP tool call rendering for non-local agents (#289505)
* Improved MCP tool call rendering for non-local agents

* Update src/vs/workbench/api/common/extHostTypeConverters.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-21 19:01:01 -08:00
Connor Peet
d042844bd5 Merge remote-tracking branch 'origin/main' into dev/bhavyau/tools-model 2026-01-21 12:59:52 -08:00
Connor Peet
4c5bbc5c2b chat: support representing file deletions in edit sessions (#289270)
* chat: support representing file deletions in edit sessions

Add support for file deletion operations in chat editing sessions through
new ChatResponseWorkspaceEditPart. This allows agents to represent file-level
operations (deletions, creations, renames) alongside text and notebook edits.

- Adds ChatEditingDeletedFileEntry class to represent deleted files with
  proper diff display and restoration functionality
- Introduces ChatResponseWorkspaceEditPart and IChatWorkspaceEdit interfaces
  for file-level operations at the workspace level
- Implements workspace edit streaming through chat editing sessions with
  proper undo/redo support
- Adds ChatWorkspaceEditContentPart for UI rendering of file operations
- Extends chat session storage to serialize deleted file entries
- Supports both acceptance and rejection of file deletions with proper state
  management and snapshotting

Ref https://github.com/microsoft/vscode/issues/275705

(Commit message generated by Copilot)

* fix test
2026-01-21 16:37:20 +00:00
Matt Bierner
ac06186ae1 Add sessionResource to proposed apis
For #274403

Replacing chatSessionId in a few API proposals. Keeping around the old fields for now until we can adopt this everywhere
2026-01-20 15:09:30 -08:00
Connor Peet
85c01a84c9 Merge remote-tracking branch 'origin/main' into dev/bhavyau/tools-model 2026-01-15 07:14:36 -08:00
Rob Lourens
32cdd274e8 Implement UX for running subagents in parallel (#287687)
* Support UX for parallel subagents
Similar to thinking ux

* Show prompt when expanded as well

* Add ellipsis

* Fix unit test

* Get subagents working with tool streaming changes

* Fixes

* Just keep this the same, close enough
2026-01-15 07:49:56 +08:00
Connor Peet
11ef18e302 Merge remote-tracking branch 'origin/main' into dev/bhavyau/tools-model 2026-01-14 11:59:00 -08:00
Logan Ramos
6b31b753c7 Support streaming of partial tool data (#278640)
* Start work on handling tool stream

* Start working on rendering tool progress

* Handle complete better

* Inovcation message

* Revert "Inovcation message"

This reverts commit f502d22d9a.

* Reapply "Inovcation message"

This reverts commit 855668653f.

* Revert "Reapply "Inovcation message""

This reverts commit 4c4db3ac36.

* Handle updating progress

* Better messages

* Have progress re-render if content changes

* Fix import

* Move prepare to view layer

* Clean up diff

* Pass tool call id through

* Pin it

* Modify the progress tool flow to use the same part + observables

* Some more debug logs

* Address feedback

* Plumb tool call id through to invoke

* Address connor's typing feedback

* Fix import

* Fix session operation log

* Update src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove debug logging

* fix wrong enums

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-14 13:27:49 -05:00
Connor Peet
8d3270de42 chat: wip on model-specific tools
This is a rethinking of the initial API proposed in `languageModelToolSupportsModel.d.ts`.

1. This switches to `models?: LanguageModelChatSelector[];` to control enablement.
   definitely open to switching this out, but I think a synchronously-analyzable
   expression is important to retain the data flows in core without too many races.
2. The extension is able to define a tool at runtime via registerToolDefinition. This
   should let us have entirely service-driven tools from model providers without
   requiring a static definition for each one. We can also have model-specific
   variants of tools without a ton of package.json work for each variant of the tool
   (as initially proposed using `when` clauses)

This then propagates that down into the tools service. Currently I have this as just
compiling to a `when` expression once it reaches the main thread. Then, for the tools
service, it takes an IContextKeyService in cases where tools should be enumerated,
and the chat input sets the model keys in its scoped context key service. This allows
the tools to be filtered correctly in the tool picker.

I initially thought about allowing multiple definitions be registered for the same tool
name/id for model-specific variants of tools but I realized that gets really gnarly and
we already have a `toolReferenceName` that multiple tools can register into.

Todo for tomorrow morning:
- Tools don't make it to the ChatRequest yet, or something, still need to investigate
- Need to make sure tools in prompts/models all work. For a first pass I think we can
  let prompts/modes reference all tools by toolReferenceName.
- Validate that multiple tools actually can safely share a reference name (and do
  some priority ordering?)
- General further validation
- Some unit tests
2026-01-13 16:02:29 -08:00
Connor Peet
d94a1fb7f5 Merge remote-tracking branch 'origin/main' into dev/bhavyau/tools-model 2026-01-13 10:53:28 -08:00
Connor Peet
fb875b2d60 tools: let hydrated tool calls have presentation options (#281634)
Editor side for https://github.com/microsoft/vscode/issues/281633
2025-12-08 06:13:37 +01:00
Don Jayamanne
7ec9c8eb07 Support restoring edits for background sessions (#279270)
* Support restoring edits for background sessions

* revert change
2025-11-26 06:01:26 +01:00
bhavyaus
6d7b8fc9ef Update invokeTool to support Language 2025-11-24 17:33:37 -08:00
bhavyaus
1a40cd0525 Support tool filtering by model 2025-11-24 13:24:03 -08:00
Connor Peet
8f24b33b0d edits: integration point for externally-editing agent clis
Allows external agent/CLI edits to be harnessed in our edit session
implementation. There is a callback API to make an external edit. While
the callback is running, we assume that all edits made were done by the
agent and update our internal models based on a before/after snapshot.
2025-10-29 15:52:52 -07:00
Copilot
25be0314fa Add read-only flag to ChatMultiDiffContentPart to disable file interactions (#272605)
* clarify chatSessions.name

* Initial plan

* Add read-only flag to ChatMultiDiffContentPart

Co-authored-by: joshspicer <23246594+joshspicer@users.noreply.github.com>

* extension API

---------

Co-authored-by: Josh Spicer <23246594+joshspicer@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2025-10-22 04:20:59 +00:00
Rob Lourens
a95d62323c Include chat mode name (#272193) 2025-10-20 02:33:44 +02:00
Matt Bierner
245265d15e Mark most Event properties as readonly
We want to prevent mistaken changes that do something like this:

```ts
foo.onEvent = () => { ... };
```

When they almost always mean:

```ts
foo.onEvent(() => { ... })
```
2025-10-09 13:59:00 -07:00
Rob Lourens
62ddb3df46 Indent tool calls made inside the execute_task subagent (#268588)
* Indent tool calls made inside the execute_task subagent

* format
2025-09-27 10:20:41 +09:00
Martin Aeschlimann
50b5aa8954 add ChatRequest.modeInstructions2 with mode metadata to try out things (#267303) 2025-09-17 21:25:37 -07:00
Martin Aeschlimann
88aa4a582e Merge remote-tracking branch 'origin/main' into aeschli/internal-takin 2025-09-05 12:45:07 +02:00
Copilot
6f08012621 Add diff indicators support to chat multi-diff content part (#264100)
* Initial plan

* Fix diff indicators not showing in coding agent changed files

Co-authored-by: joshspicer <23246594+joshspicer@users.noreply.github.com>

* Add diff indicators support to multi-diff content part

Co-authored-by: joshspicer <23246594+joshspicer@users.noreply.github.com>

* Fix formatting issue - remove extra blank line in ChatMultiDiffContentPart

Co-authored-by: joshspicer <23246594+joshspicer@users.noreply.github.com>

* wire through added and removed

* style

* fix rendering

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: joshspicer <23246594+joshspicer@users.noreply.github.com>
2025-09-03 23:20:51 +00:00
Martin Aeschlimann
5c0659b8e3 evolve 2025-09-01 19:59:40 +02:00
Martin Aeschlimann
b46d5828f0 tool references 2025-08-31 15:51:19 +02:00
Justin Chen
c34056c81b core: update thinking part shape for responses api (#263358)
* fix working progress flickering

* core: update thinking part shape for responses api
2025-08-25 18:03:39 -07:00
Justin Chen
95db854cd8 handle new thinking part shape (#261370) 2025-08-13 06:47:28 +02:00
Aaron Munger
e6a4f1b6a9 separate added/removed lines (#260626) 2025-08-08 10:59:08 -07:00
Justin Chen
43a9dc0df3 chain of thought API (#259939)
* cot api and rendering

* working progress streaminig

* streaming working

* collapsable thinking block

* some better styling

* fix merge conflict

* some cleaned up styling, removing copilot css

* label updates

* some vibe coded timer work

* fix anotha merge conflict

* thinking part with timer better

* render tools inside thinking container

* render markdown in container

* revert and remove majority ui changes

* fix some merge conflicts

* some cleanup

* hygiene
2025-08-06 00:47:36 -07:00
Rob Lourens
67212013a4 Add the ability to clear a ChatResponseStream, passing in a reason which results in a warning being displayed (#257271) (#259370)
* Add the ability to clear a ChatResponseStream, passing in a reason which results in a warning being displayed

* Changing ChatResponseStream.clear to ChatResponseStream.clearToPreviousToolInvocation and only clearing up to the last tool invocation

* Remove unnecessary code block

Co-authored-by: James Wang <120431051+jwangxx@users.noreply.github.com>
2025-08-04 02:37:35 +02:00
Peng Lyu
9b64bd6376 Support contributed file changes/diff part 2025-07-25 14:43:31 -07:00
Alex Ross
1155663cc7 Add ToolResultAudience and ChatResponsePullRequestPart (#257806)
* Add ToolResultAudience and ChatResponsePullRequestPart
Part of #255383

* Clean up
2025-07-25 08:26:56 -07:00