Commit Graph
176 Commits
Author SHA1 Message Date
Connor Peet cdc797e34a edits: remove replace_string healing exp (#2117) 2025-11-20 19:45:25 +00:00
Bryan Chen 61c345044f Remove explicit 'any' (#1960)
* Remove explicit 'any'

* remove any

* fix typecheck failure

* export CopilotToolParamsBase

* replace any with unknown in toolsService

* fix typing for IEmbeddingsEndpoint

* fix tool types

* use `unknown` for tool contructor type
2025-11-19 17:36:29 +00:00
Rob Lourens 3a7f238cb4 Fix using the wrong runTest tool reference for prompt hints (#2066)
* Fix using the wrong runTest tool reference

* Update test snapshot
2025-11-19 00:03:57 +00:00
Bryan Chen 87af30b89c Support includeIgnoredFiles option in search results (#1868)
* feat: add option to include ignored files in search results

* Provide instruction of includeIgnoredFiles to models in case of missing match

* updated warnings
2025-11-18 15:13:40 +00:00
Sandeep Somavarapu fedde4f1f1 clean up: (#2040)
* clean up:
- simplify namespaces
- simplify defining settings

* fix unused configs
2025-11-17 14:32:52 +00:00
Connor Peet e4b5974b1a edits: fix conflicting edits in multi-replace-string (#2016)
* edits: fix conflicting edits in multi-replace-string

- Minimize identical content in text edits to avoid potential conflicts in context
- Explicitly error any edits that still fail rather than garbling the file

Closes https://github.com/microsoft/vscode/issues/277154

* rm test.only

* fix whitespaces not being preserved in ws flex match
2025-11-15 00:51:53 +00:00
Connor Peet 125097f3f6 edits: set hasError on tool results from editing tools (#2022)
Refs https://github.com/microsoft/vscode/issues/275056
2025-11-14 22:42:01 +00:00
Connor Peet 4572f4ee80 edits: don't prompt every edit for a folder within a default-system path (#1982)
Closes https://github.com/microsoft/vscode/issues/276193
2025-11-13 17:41:09 +00:00
Johannes Rieken 7d0512d26a add failing test for https://github.com/microsoft/vscode/issues/277154 (#1981)
* add failing test for https://github.com/microsoft/vscode/issues/277154

* thanks copilot

* better assertion
2025-11-13 15:58:14 +00:00
Rob Lourens f896a0a626 Validate tool inputs (#1975) 2025-11-13 07:11:08 +00:00
Don Jayamanne 30c867c483 Move formatUriForFileWidget into common (#1973) 2025-11-13 06:00:21 +00:00
Don Jayamanne e6a67133a7 Render links in file edit confirmation (#1970) 2025-11-13 01:23:01 +00:00
Connor PeetandConnor Peet edb94a30a7 Cherry-pick MSRC 102702+103197 (#1926)
* Merge pull request #5 from devdiv-microsoft/release/msrc/103197

edits: avoid windows/ntfs path workarounds in edit guards

* edits: check files_added in patch for edit guards (#4)

Co-authored-by: Connor Peet <connor@peet.io>

---------

Co-authored-by: Connor Peet <connor@xbox.com>
2025-11-11 19:11:34 +00:00
Bryan Chen 1d87ecfe3e display folder instead of individual child files in get-errors result (#1866)
* getErrorsTool display folder instead of individual child files

* address copilot comments.

* Fix test failure

* updated per comments
2025-11-11 18:09:50 +00:00
Connor Peet ad9116d2af edits: show diffs for files being approved during edits (#1905)
* edits: show diffs for files being approved during edits

Requires a PR in core as well to adopt this nicely.

* cleanup
2025-11-11 01:36:17 +00:00
Bryan Chen 764f0d6a63 tool can give alternative definition by model (#1400)
* tool can give alternative definition by model

* Pass IChatEndpoint in getEnabledTools for calling tools' alternativeDefinition

* Introduce a ICopilotToolExtension to support override existing built-in tools and provide alternative definition.

* Fix errors

* add gpt-5-codex

* remove gpt-5
2025-11-07 22:42:45 +00:00
Bryan Chen e4e092caca Skip resources with no Warning/Error diagnostics when collecting diagnostics (#1785) 2025-11-06 21:10:58 +00:00
Rob Lourens 8a986974ba Delete runSubagent tool (#1819)
* Delete runSubagent tool
Moving to the core version

* Fix
2025-11-06 06:43:28 +00:00
Rob Lourens 56c5c743b4 Don't allow search using '**' (#1815)
There is a model that really wants to do this. It skips all .gitignore and makes search time out.
2025-11-06 01:37:55 +00:00
Justin Chen 3ce17fa038 api finalization for chat extension (#1788) 2025-11-04 22:03:05 +00:00
Joaquín RualesandJoaquín Ruales 9cca3b3fe0 Handle case when command exists but doesn't meet preconditions (#1781)
* Revert to generic 'Open Command Palette' when command not found, instead of reverting to JSON code block

* Also update vscode run command

* Fix test

* Rename test case for clarity

---------

Co-authored-by: Joaquín Ruales <joruales@Joaquins-MacBook-Pro-2.local>
2025-11-04 01:29:21 +00:00
Copilotandroblourens 856d7ee051 Validate read_file offset parameter and report actual line count when out of bounds (#1759)
* Initial plan

* Add out-of-bounds offset validation for read_file tool

Co-authored-by: roblourens <323878+roblourens@users.noreply.github.com>

* Add test for offset 0 clamping behavior

Co-authored-by: roblourens <323878+roblourens@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: roblourens <323878+roblourens@users.noreply.github.com>
2025-11-03 16:25:56 +00:00
Copilotandroblourens c19aeea325 Clarify regex vs literal text in search result messages (#1757)
* Initial plan

* Improve presentation of regex-based searches in agent mode

- Updated FindTextInFilesTool to indicate "regex" vs "text" in search messages
- Updated Claude grep tool formatter to show "Searched for regex"
- Added test for literal text search message format
- Updated existing test to match new regex message format

Co-authored-by: roblourens <323878+roblourens@users.noreply.github.com>

* Make regex/text keywords localizable via l10n

- Moved 'regex' and 'text' keywords inside l10n.t() calls
- This allows localization system to translate or keep terms as appropriate per language
- Addresses localization concern about whether 'regex' should be localized

Co-authored-by: roblourens <323878+roblourens@users.noreply.github.com>

* Refactor nested ternary operators into helper method

- Extract message generation logic into getResultMessage helper
- Improves code readability and maintainability
- All tests passing

Co-authored-by: roblourens <323878+roblourens@users.noreply.github.com>

* Update ChatSessionContentProvider test snapshot

- Updated snapshot to reflect new grep message format
- Changed from "Searched text for" to "Searched for regex"
- All tests now passing (8/8)

Co-authored-by: roblourens <323878+roblourens@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: roblourens <323878+roblourens@users.noreply.github.com>
2025-11-03 00:49:59 +00:00
Connor Peet 7b81eec536 edits: fix race condition that leading to clobbering paralle edits (#1724)
This fixes a race condition that can happen in LM results that contain
multiple edit tool calls. The emission and application of edits is
async, and so it is possible that an edit can be emitted and the next
edit generated before the first edit's changes are propagated to the
extension host's model.

This resolves the issue by keeping, updating, and reusing snapshotted
documents on each turn's prompt context.

cc @DonJayamanne for notebook stuff. This is a little shakier but it
seems to work (and I know NB prefers the separate notebook edit tool
anyway.)
2025-10-31 09:07:07 +00:00
Bhavya U e639b4fd15 Add Memory tool: implementation (#1728)
* Add Memory tool: implementation, wiring, config, Anthropic beta support, and SDK bump

* Update tests
2025-10-31 04:27:15 +00:00
Connor Peet 423435b29c edits: integrate claude code edits with our edit session model (#1699)
The extension side of https://github.com/microsoft/vscode/pull/274025
(lockstep w/ main API is not required)
2025-10-30 00:50:20 +00:00
Johannes Rieken fcbff5831a InlineChatIntent (#1549)
* remove references to old setting `github.copilot.chat.advanced.inlineChat2`

* play with `InlineChatIntent`

* wip

* move things, better/simpler prompt

* cleanup, renames, stuff

* more wip

* done after tool call

* edit and generate stest for new InlineChatIntent

* use codebook for diagnostics

* inline chat fixing stests

* stest run

* remove old Inline2 tests

* remove slash commands for v2, remove the editCodeIntent path for v2

* 💄

* 💄

* Don't use `diagnosticsTimeout` when with inline chat because the new diagnostics will never be read but slow down the result

* fix compile error

* stest run

* update baseline

* prevent some JSON errors from empty output

* unfresh baseline.json

* use `MockGithubAvailableEmbeddingTypesService` in stests

* back to hamfisted skipping of stests

* send telemetry from inline chat intent

* tweak some stests
2025-10-29 10:44:00 +00:00
SteVen Batten 305c0e3455 introduce copilot-fast (#1666) 2025-10-27 19:52:34 +00:00
Bryan Chen c627d1d88d fix: skip extra glob pattern (#1261)
* feat: enhance file search tools with model family support in pattern matching

* Updated tests
2025-10-25 00:07:19 +00:00
Don Jayamanne 0f85b1c4a9 Add some logging around notebook summary and variable retrieval (#1557) 2025-10-23 19:18:28 +00:00
Connor Peet 5b89f6ce9f edits: include healing data in replace_string result, exp to disable, examples (#1510)
- Include healed patch in replace_string tool results
- Add EXP to disable replace_string healing for non-Gemini models
- Add an example to the replace_string prompts for greater fidelity
2025-10-22 18:09:55 +00:00
9b35a158f2 Fix applyPatch-tool emitting incorrect edits (#1495)
* Hello Copilot (#1493)

Co-authored-by: kieferrm <4674940+kieferrm@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

* Fix applyPatch-tool emitting incorrect edits

Started to use applyPatch in stests (`joh/slow-meerkat`) which resulted in corrected files because of bogous edits. The culprit is that the applyPatch-tool computes multiple text edits and then dispatches them to the stream via individual calls. The semantics of that is that  call `N` knows new offsets after applying edits from the `N-1` call. Tho, the calls aren't made like that by the tool. Instead, it should dispatch its edit in a single call

* fix windows tests

---------

Co-authored-by: Benjamin Christopher Simmonds <44439583+benibenj@users.noreply.github.com>
Co-authored-by: kieferrm <4674940+kieferrm@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2025-10-22 17:15:48 +00:00
Joaquín Ruales e7f03e9a36 Fix Markdown link in Run Command tool (#1462)
* Fix Markdown link in Run Command tool

* Import commandUri in vscodeCmdTool.tsx

Add import for commandUri from linkify commands

* Use commandId instead of name

* Small comment

Add comments to clarify command ID handling in Quick Open.
2025-10-21 23:26:57 +00:00
Bryan ChenandRob Lourens 82ce547ded feat: support folder paths in get_errors tool (#1269)
* feat: support folder paths in get_errors tool

* rename test files for getErrors

* Add tests for the getErrorsTool

* updated snap

* polished tests

* Update output format to keep parity

* Added one more test with range

* Updated per comments

* Support getAllDiagnostics in SimulationWorkspace

---------

Co-authored-by: Rob Lourens <roblourens@gmail.com>
2025-10-21 00:49:43 +00:00
Connor Peet d544242f73 edits: fix create file inserting duplicate content (#1437)
Closes https://github.com/microsoft/vscode/issues/272214
2025-10-20 21:13:22 +00:00
Rob Lourens 0893eaecfd Rename executePrompt to runSubagent (#1420) 2025-10-19 21:52:40 +00:00
Rob Lourens 58588fced7 Enable exp for autoFix (#1413) 2025-10-18 05:46:13 +00:00
Bhavya UandCopilot beffd08b38 refactor: split agentInstructions by model and add PromptRegistry (#1362)
* refactor: split monolithic agentInstructions and add PromptRegistry

* Update src/extension/prompts/node/agent/grokCodeFastPrompts.tsx

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

* Update src/extension/prompts/node/agent/defaultAgentInstructions.tsx

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

* Update src/extension/prompts/node/agent/defaultAgentInstructions.tsx

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

* Update reference

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-17 18:01:50 +00:00
dileepyavan c84c205dea indentation issue fix for apply_patch tool patches (#1329) 2025-10-16 23:28:01 +00:00
Rob Lourens 4cf37e4b4c Cleanup - delete thinking tool (#1353) 2025-10-15 20:37:40 +00:00
Connor Peet ed514427f6 edits: add edit tool logging and small success analyzer tool (#1334) 2025-10-15 02:12:51 +00:00
Connor Peet 2e80ddb78f edits: normalize case for edits to sensitive files (#1324) 2025-10-14 17:34:15 +00:00
Connor Peet 0de0814ea2 edits: add Library to default restricted paths on macos (#1311) 2025-10-14 01:01:31 +00:00
Rob Lourens 6f6dfabc20 Fix editing from executePrompt tool (#1275)
Fix microsoft/vscode#270122
2025-10-09 16:37:23 +00:00
Aaron Munger e24813d6a9 get errors for a notebook URI (#1247)
* get problems within notebooks

* filter severity

* diagnostics for notebook URI

* remove extra filter

* any supported notebook
2025-10-07 22:51:10 +00:00
Bryan Chen 6108652ad8 feat: add timeout in searching text in files (#1233)
* feat: add timeout handling for file and text search operations

* feat: add timeout handling for search and rendering operations in FindTextInFilesTool

* use raceTimeout and raceCancellation

* Updated per comments

* extract a raceTimeoutAndCancellationError()

* enhance timeout handling and cancellation for file and text search operations

* enhance raceTimeoutAndCancellationError

* removed unnecessary check

* refactor: streamline cancellation token usage in file and text search operations
2025-10-07 22:47:19 +00:00
Bhavya UandCopilot 54f3ac5f48 Update telemetry in CreateFileTool to include model and file extension details (#1248)
* Enhance telemetry in CreateFileTool to include model and file extension details

* Update src/extension/tools/node/createFileTool.tsx

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

* Refactor model retrieval in CreateFileTool to use endpoint provider for improved accuracy

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-07 17:26:30 +00:00
Matt Bierner 0eae9a92d8 Update fetch tool to use metis (#1192)
* Update fetch tool to use metis

https://github.com/microsoft/vscode/issues/268956

* Add service dep for tests to

* Use mock service for tests

* Fix lazy
2025-10-07 16:31:20 +00:00
Bryan Chen b8ec099f50 Hide editFile tool message (#1232) 2025-10-06 17:16:52 +00:00
Connor Peet bfc23c61b2 edits: handle eperm in file edit checks (#1217)
Closes https://github.com/microsoft/vscode-internalbacklog/issues/5824
2025-10-01 19:41:57 +00:00