Commit Graph

98 Commits

Author SHA1 Message Date
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
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
Logan Ramos
4423551173 Add detail support to chat panel (#257716) 2025-07-24 13:28:54 -07:00
Aaron Munger
7542d38557 send telemetry when lines are accepted or rejected (#257498)
* send telemetry when lines are accepted or rejected

* fix types to pass info to EH

* send only if lines were affected
2025-07-24 12:47:49 -07:00
Peng Lyu
f890cca72e enhanced chat tool types for participants 2025-07-24 12:06:40 -07:00
Justin Chen
50f9496a14 core: update API to show markdown string in confirmation (#256990)
update api to use markdown strings
2025-07-21 08:52:21 -07:00
Connor Peet
25d003bcf6 tools: surface tool source in chat additions api (#256558)
For MCP I can already kind of get this from the tool name, but for
extension tools we previously had no way to know which extension
provided the tool.

This PR adds a `LanguageModelToolInformation.source` containing details
about where the tool came from. I also use this to include the MCP
server instructions which is needed for #250017.

cc @aeschli @roblourens
2025-07-17 22:25:25 +02: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
Rob Lourens
37b46afab0 Add more info to codeblock copy/insert/apply actions (#252319)
For dashboards
2025-06-24 15:52:05 -04:00
Rob Lourens
7afa954c12 Plumb custom mode body (#250250)
Towards microsoft/vscode-copilot#17638
2025-06-02 13:18:11 +10: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
Rob Lourens
4d0e77649d ChatRequest.tools: LanguageModelInformation -> string (#247419) 2025-04-25 20:52:21 +02:00
Johannes Rieken
1fd629a04c ChatRequest#tools returns as map of tool to enablement state (#247406)
* unrelated proposal change

* `ChatRequest#tools` returns as map of tool to enablement state
2025-04-25 12:36:36 -04:00
Matt Bierner
c08464e4e6 Merge pull request #247263 from s-rigaud/fix-vscode-d-ts-typos
fix: vscode-dts typos
2025-04-23 22:33:36 -07:00
Rob Lourens
d9bc5b09ea Add 'isExclusive' flag for tool selection (#247267)
* Add 'isExclusive' flag for tool selection
For prompts with tools to exclude non-selected tools

* Fix
2025-04-23 18:42:00 -07:00
Samuel Rigaud
b98832f58e fix: vscode-dts typos 2025-04-23 20:07:04 -04:00
Rob Lourens
ef9b85d17a Optional cancel token (#247040)
Fix microsoft/vscode-copilot#9642
2025-04-20 21:35:28 -07:00
Sandeep Somavarapu
18fcd02565 support rendering extensions in chat (#246666) 2025-04-15 14:30:19 -07:00
Rob Lourens
02c2dba5f2 Add missing type in chatParticipantAdditions.d.ts (#246431)
* Add missing type in chatParticipantAdditions.d.ts

* Add missing type

* Remove redundant else if
2025-04-14 02:24:07 +00: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
Rob Lourens
4861c5b109 Add isEdit to ChatResponseCodeblockUriPart (#244190)
We need to distinguish between codeblocks that have URIs and should be rendered as codeblock pills, vs ones that should be rendered as normal codeblocks but get the "apply in foo.js" handling due to having URIs. Previously this was just based on the mode, but in order to render chat codeblocks and also edits codeblocks, we need this tracking of whether a codeblockuri represents an edited file, which comes from the intent invocation.

When we clean up codeblock-based edits in favor of tools all the time, we can clean up this crazy code...
2025-03-20 16:52:18 -07: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
Don Jayamanne
dcc65bffea Add Chat NotebookEdit API 2025-02-14 13:16:45 +11:00
Rob Lourens
4aa863ca56 Move chat participant detection to private.d.ts (#239754) 2025-02-05 17:34:43 -08:00
Rob Lourens
b96caf191e Move variable types that completions need into additions.d.ts (#239752) 2025-02-05 17:34:23 -08:00
Joyce Er
802eba821f refactor: clean up unused detectedParticipant API (#239566) 2025-02-04 07:55:33 +01:00
Connor Peet
2246a5fddf chat: add a pause button for agent mode (#238735)
* chat: add a pause button for agent mode

There is a new `ChatParticipant.onDidChangePauseState` event that allows
the editor to signal requests should be paused or unpaused.

In agentic mode, a "pause" button is visible in the editor that surfaces
to this event. It's up to the LM to respect it. When paused, actions go
to their "idle" state, so new messages can be written which implicitly
cancel the previous request, following PR earlier today.

![](https://memes.peet.io/img/25-01-b61af958-1390-4143-9e09-cef99b2edb86.png)

This solves Kai's request of wanting to pause and see what the model is
doing before continuing, as well as my desire to be able to interrupt
and hint to the model when it gets off track, although that might
ideally evolve to some other 'hint' vs a cancelled and new request.

PR for copilot coming later this evening.

* allow taking input when paused
2025-01-27 04:31:26 +00:00
Johannes Rieken
4b5f03fcdc send a signal when a modified files is saved (#233323) 2024-11-07 13:04:38 +01:00
Johannes Rieken
6e3cbfd138 support done signal for chat response text edits (#233181)
* support to signal "done with editing" via `ChatResponseStream#textEdit`

* remove `triggerEditComputation` and the response action because this happens automatically
2024-11-06 11:08:57 +01:00
Rob Lourens
d9f379b135 Finalize ChatRequest#model (#231811)
* Finalize ChatRequest#model
Fix #230844

* Register model to fix tests
2024-10-21 16:42:23 -07:00
Rob Lourens
bcf6a6af1c Add LanguageModelIgnoredFileProvider (#231696) 2024-10-18 14:05:43 -07:00
Joyce Er
3709bf2387 feat: instrument accepting and rejecting chat edits (#230748)
* feat: instrument accepting and rejecting chat edits

* eslint

* Fix compile
2024-10-08 09:29:59 +02:00
Matt Bierner
f22a1167e4 More fixes 2024-10-02 17:22:33 -07:00
Matt Bierner
51992f3c11 Add .resolve method to chat anchors (#230273)
This allows the chat provider to fill in the actual symbol location later since figuring this out can sometimes be expensive
2024-10-01 17:02:40 -07:00