Commit Graph

273 Commits

Author SHA1 Message Date
Vikram Nitin 0464f32967 Adding an execution-focused subagent (#3178)
* Added execution subagent

* Updated config

* Add execution_subagent to nonDeferredToolNames for Tool Search compatibility

* Modified to be in line with search subagent. Also removed all tools except terminal

* Fixed error with default model in package.json

* Updated prompt snapshots so that tests pass

* Deleted accidentally added yaml

* Modified subagent input format to not take exact commands

* Fixed parameter error

* Updated prompt snapshots

* Updated prompts according to Rob's suggestions

* Addressed Copilot and Bhavya comments

* Reverted accidental changes in anthropicPrompts.tsx

* Tweaked the tool use instructions wrt CoreRunInTerminal slightly

* Minor prompt changes

* Updated for new ToolCallingLoop interface

* Added instruction to Claude 4.6 prompt

* Gating change in prompts to prevent empty tags when execution subagent is not enabled

---------

Co-authored-by: Aakash Goel (MSTIC DS&AI) <aakashgoel@microsoft.com>
2026-03-19 04:55:58 +00:00
Anisha Agarwal 3014368d26 System prompt updates to handle search subagent (#4500)
* change to settings.json to trigger search subagent with proxy

* update prompting for opus 4.6 to discourage over use, and add prompting to openai models to encourage use

* update unit tests
2026-03-18 22:12:31 +00:00
Anisha Agarwal 9d4dadc315 Search subagent -- resolve relative and absolute paths (#4429)
* change to settings.json to trigger search subagent with proxy

* specify absolute path + handle case where relative path is given

* remove wording specifying absolute paths

* added edits for testing in vm

* remove logging

* revert it back to its original state

* updating to try given path first

* update the logic of filepaths
2026-03-18 19:17:27 +00:00
Bhavya U 35e83ba656 feat: add conversation transcript lookup after summarization (#4475)
* feat: add conversation transcript lookup after summarization

After conversation history is compacted, inform the model it can look up
the full pre-compaction transcript via read_file. The transcript is a JSONL
file produced by ISessionTranscriptService.

Key changes:
- Add isTranscriptUri() to ISessionTranscriptService for read_file allowlisting
- Allowlist transcript URIs in assertFileOkForTool and isFileExternalAndNeedsConfirmation
- Lazily start transcript session in SummarizedConversationHistory before
  summarization runs (idempotent if hooks already started it)
- After summarization, flush transcript and pass path to SummaryMessageElement
  which tells the model about the file
- Gate behind ConfigKey.ConversationTranscriptLookup (ExperimentBased, default off)
- Add setting in package.json preview section with onExp tag

* fix: update transcript lookup instruction to use ToolName.ReadFile
2026-03-18 06:06:21 +00:00
Martin Aeschlimann d275a7ed1e sessionLogDir not set for new chats (#4416)
* sessionLogDir not set for new chats

* fix test
2026-03-15 18:18:45 +00:00
Rob Lourens 4c9115174e Use resizeImage from core for viewimage tool (#4411) 2026-03-14 18:43:15 +00:00
Rob Lourens cc86f3c7a3 Split image viewing out of read file (#4394)
* Add dedicated view image tool (Written by Copilot)

* Remove stale read file test import (Written by Copilot)

* Add image extension coverage test (Written by Copilot)

* Update test snapshots
2026-03-13 06:01:55 +00:00
Paul 1b74623ae7 Improve troubleshoot command session detection reliability (#4386)
* more reliable

* Apply suggestion from @Copilot

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

* PR

* revert

* update

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-12 23:33:12 +00:00
Paul 6eb5dbdbed Add feature flag for troubleshoot skill, misc cleanup and fixes (#4382)
* Add user-visible settings for chat debug file logging

* feedback updates

* update

* fix test

---------

Co-authored-by: Vijay Upadya <41652029+vijayupadya@users.noreply.github.com>
2026-03-12 21:20:57 +00:00
Paul 2472428c0d Move troubleshoot skill to files-based approach (#4365)
* v3

* wip

* wip

* nit

* wip

* permissions

* update

* update

* clean

* update

* clean

* update

* nit

* update
2026-03-12 07:22:28 +00:00
Paul f38eaa7850 Add chat troubleshoot skill (#4351)
* wip

* clean

* update

* nit
2026-03-11 08:35:30 +00:00
Vijay Upadya 8bf0354979 Write chat debug events to disk as JSONL for diagnosis (#4347)
* Write JSONL file

* consume core API

* Feedback updated

* update commitId

* update retained to 50

* update from vscode
2026-03-11 05:01:05 +00:00
Connor Peet 7e7c1a6cc7 tools: add binary file support with hexdump display (#4331)
* tools: add binary file support with hexdump display

Adds support for reading and displaying binary files in the read file tool
with a hexdump-formatted view. This enables better handling of binary content
in the IDE context without attempting to interpret them as text.

- Adds hexdump utility to format binary data in a readable hex/ASCII view
- Extends readFileTool to detect binary files and provide formatted output
- Adds binaryFileHexdump prompt component for displaying binary content
- Integrates binary file variable support in file variable display
- Updates test fixtures with binary file handling scenarios

Fixes https://github.com/microsoft/vscode/issues/284178
Fixes https://github.com/microsoft/vscode/issues/299973

(Commit message generated by Copilot)

* pr comments

* baseline update

* baseline update
2026-03-10 21:49:13 +00:00
Rob Lourens 508d3f9a27 Support reading images with read_file (#4247)
* Support reading images with read_file

* Fix oversized image test to avoid 21MB allocation
2026-03-10 17:34:02 +00:00
Bhavya U 023ff49fc8 Fix custom tool search: enable in agent tools, filter invalid references, improve prompts (#4310)
* Fix custom tool search: enable in agent tools, filter invalid references, improve prompts

- Add tool_search to allowTools in agentIntent.ts so it appears in agent mode
- Filter tool_reference blocks in messagesApi.ts against valid tool names to prevent 400 errors
- Update tool description and prompt to encourage broad queries and reduce redundant calls
- Remove limit parameter from tool schema (always use default)
- Add sonnet 4.5 and opus 4.5 to supported models list
- Extract TOOL_SEARCH_SUPPORTED_MODELS shared constant with dot-format model IDs
- Remove modelSupportsToolSearch(), inline check into isAnthropicToolSearchEnabled()
- BYOK anthropicProvider normalizes hyphenated model IDs before checking support

* Add custom tool search tests for tool_reference conversion and filtering
2026-03-10 04:59:46 +00:00
Rob Lourens 5478618cc6 Handle absolute paths in search globs (#4287)
* Improve search tools for multiroot
Fix microsoft/vscode#292754

* Handle absolute paths in search globs

* Get rid of '**' fallback

* address comments

* Improve test
2026-03-09 23:23:48 +00:00
Connor Peet 4cb6e3c452 cherry pick 0.37 fixes (#4266)
* cherry pick 0.37 fixes

* fix merge conflict in test imports
2026-03-06 22:01:23 +00:00
Bhavya U b4a27c8137 implement custom tool search functionality with embeddings-based query (#4214)
* implement custom tool search functionality with embeddings-based query support

* Add tool search functionality with embeddings-based query support
2026-03-04 23:32:53 +00:00
Logan Ramos 62215a8a23 Remove hard coded gpt 4.1 in favor of copilot base (#4124)
* Remove hard coded gpt 4.1 in favor of copilot base

* Update simulator cache
2026-03-02 22:05:28 +00:00
Copilot e3f60219aa Fix diagnostics on empty lines being invisible to get_errors tool (#4025)
* Initial plan

* fix: show diagnostics on empty lines in get_errors tool and DiagnosticDescription

When a diagnostic is reported on an empty/blank line (e.g., a trailing
empty line at EOF), the DiagnosticDescription component was returning
an empty JSX fragment because the code content was empty after trimEnd().
This caused the entire diagnostic (including its error message) to be
invisible to the AI model.

Fixed by removing the empty-line guard and always emitting the diagnostic
message, just without a code block when the line has no content.

Also adds a test case for diagnostics reported on empty lines.

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

* formatting

* Update src/extension/tools/node/test/getErrorsTool.spec.tsx

Co-authored-by: Copilot <175728472+Copilot@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>
Co-authored-by: Rob Lourens <roblourens@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-02 06:21:01 +00:00
Alex Ross 971a42e627 Run command tool should include command result (#4061)
* Run command tool should include command result
Part of microsoft/vscode#298181

* CCR feedback
2026-02-27 13:07:23 +00:00
Martin Aeschlimann 8117b51c0a agent fails when trying to load prompt file (#4037) 2026-02-26 16:24:11 +00:00
Don Jayamanne 3c2c6b88e9 Do not prompt for permissions when editing files in workspace folder (#4010) 2026-02-26 02:27:42 +00:00
Matt Bierner bdb2e05961 Pass telemetry info headers to github code search status endpoint (#4005)
* Pass telemetry info headers to github code search status endpoint

* Don't allow `| undefined`
2026-02-25 21:24:19 +00:00
Johannes Rieken 526c569f25 Enhance edit file tools with disallowed URI error handling and add corresponding tests (#3972) 2026-02-25 11:17:00 +00:00
Kyle Cutler 9905eaabd4 Migrate integrated browser tool to the main repo (#3984)
* Migrate integrated browser tool to the main repo

* update specs

* formatting
2026-02-25 01:17:53 +00:00
Alex Ross c387e1e150 Install extension skill (#3856)
* Install extension skill

* Add setting to code

* Move setting

* Update assets/prompts/skills/install-vscode-extension/SKILL.md

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

* Update package.json

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-23 09:06:31 +00:00
Paul a83c989c99 Fix flaky extra external instructions confirmation for userData schemes (#3912)
* fix

* fix
2026-02-21 01:00:57 +00:00
Anisha Agarwal 40a0ce1d1a search subagent -> fine-tuned model flighting (#3864)
* change to settings.json to trigger search subagent with proxy

* disable new read file tool, consolidate proxy vs. non proxy searchsubagent model name
2026-02-20 18:26:17 +00:00
Alex Ross 88c598c0dd Remove unused doc info tool (#3892)
* Remove unused doc info tool

* Fix tests

* Fix whitespace

---------

Co-authored-by: João Moreno <joaomoreno@users.noreply.github.com>
2026-02-20 17:09:46 +00:00
Alex Ross 45bbb4f4da The reckoning: Update all the vscode.proposed.*.d.ts files (#3895)
* The reckoning: Update all the vscode.proposed.*.d.ts files
and run the update on post install

* Improve proposed update and check
- Pin it to a commit
- Require that update be run manually, not as post install
- Add PR check

---------

Co-authored-by: João Moreno <joaomoreno@users.noreply.github.com>
2026-02-20 14:06:58 +00:00
João Moreno 5f34e85fcc fix inconsistent telemetry event metadata (#3896)
related to microsoft/vscode#296465

Co-authored-by: João Moreno <22350+joaomoreno@users.noreply.github.com>
2026-02-20 12:14:11 +00:00
Tyler James Leonhardt 7de42dc61e Remove Ask User Question tool in favor of Core tool (#3880)
* Remove Ask User Question tool in favor of Core tool

Fixes https://github.com/microsoft/vscode/issues/296134

* feedback

* remove duplicate & restore toolset

* feedback

* revert change in anthropic.ts because ask_questions is what is used in Claude
2026-02-20 03:58:00 +00:00
Bhavya U f3e6859c16 Add support for local repository memory and update telemetry events (#3841)
* Add support for local repository memory and update telemetry events

* Update memory command labels for clarity in the UI

* update test

* Add repository memory section to snapshot tests for clarity
2026-02-19 05:51:04 +00:00
Justin Chen 817b620532 change simple browser tool to integrated browser tool (#3810)
* change simple browser tool to integrated browser tool

* update spec
2026-02-18 03:17:09 +00:00
Copilot abae555c93 Skip external file confirmation for non-existent files (#3795)
* Initial plan

* Fix non-existent files incorrectly treated as external

- Add file existence check in isFileExternalAndNeedsConfirmation()
- Non-existent files now return false (not external) to prevent confirmation dialog
- Actual tool invocation will fail with proper "file not found" error
- Update tests to reflect new behavior

Co-authored-by: connor4312 <2230985+connor4312@users.noreply.github.com>

* Address code review feedback

- Add comprehensive comment explaining error handling tradeoff
- Add test suite with MockFileSystemService to verify existing external files still need confirmation
- Tests confirm the fix works correctly for both existing and non-existing files

Co-authored-by: connor4312 <2230985+connor4312@users.noreply.github.com>

* update

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: connor4312 <2230985+connor4312@users.noreply.github.com>
Co-authored-by: Connor Peet <connor@peet.io>
2026-02-17 21:10:28 +00:00
Dmitriy Vasyura 4a3ea92149 Limit size of diffs and untracked filesreported by GitDiffService (#3743) 2026-02-17 20:12:54 +00:00
Bhavya U 5a59be1424 update memoryTool invocation to show file paths (#3755) 2026-02-16 00:04:55 +00:00
Harald Kirschner 60d9375465 Add telemetry for memory tool invocations and context reads (#3745)
Co-authored-by: Harald Kirschner <digitarald@gmail.com>
2026-02-14 04:58:02 +00:00
Harald Kirschner a1709b8fce Add skill name to readFileToolInvoked telemetry (#3739)
* Add skill name to readFileToolInvoked telemetry

* Rename telemetry field to nameField

---------

Co-authored-by: Harald Kirschner <digitarald@gmail.com>
2026-02-13 23:27:52 +00:00
Rob Lourens a4ffdcf03b Sync chatParticipantPrivate.d.ts with vscode (#3734)
* Sync chatParticipantPrivate.d.ts

* Sync ChatRequestEditorData with vscode
2026-02-13 21:07:31 +00:00
Johannes Rieken 240140ca97 Remove usages tool and related references from the codebase (#3716)
https://github.com/microsoft/vscode/issues/281980
2026-02-13 11:26:03 +00:00
Paul 8e01c02da6 protect (#3666) 2026-02-11 18:58:54 +00:00
Bhavya U 49b488717a update memory tool context (#3604)
* update memory tool to context

* Update memory paths to include '/memories/' prefix and remove unsupported repo path tests

* update memory guidelines and user instructions with conditional rendering based on memory tool availability

* remove memory tool from agent prompts snapshot

* remove memory tool from agent prompts snapshot
2026-02-10 09:42:09 +00:00
Bhavya U ff32fd61d6 Add support for Anthropic memory tool functionality and related checks (#3563)
* Add support for Anthropic memory tool functionality and related checks

* Enhance memory path validation with normalization and root check functions

* Update error message for missing memory path in view command

* Add MemoryCleanupService to manage stale memory files and integrate with MemoryTool
2026-02-09 01:35:48 +00:00
Bhavya U b596994d64 Update memory tool functionality to support local memory (#3557)
* Update memory tool functionality to support local memory

* update path validation and normalization in MemoryTool
2026-02-08 08:44:05 +00:00
Connor Peet 121ef83031 tools: avoid putting fences into file reads by default (#3528)
* tools: avoid putting fences into file reads by default

We've seen the model get confused here. Looking at vendor tools from Gemini and Codex CLIs, they don't add explicit line number messages like we do (which was motivation behind having the fences there in the first place. So let's try removing them. Controllable with EXP for sanity checking.

* tests and comments
2026-02-06 22:17:56 +00:00
Henning Dieterichs fabc136a7b Add chat.additionalReadAccessPaths setting for read-only access to external folders (#3520)
* Add chat.additionalReadAccessPaths setting for read-only access to external folders

Implements a new setting that allows users to specify folders outside the
workspace that Copilot Chat read-only tools (read_file, list_dir) can
access without requiring confirmation.

- Add github.copilot.chat.additionalReadAccessPaths setting (string array)
- Gate additional access behind a readOnly flag on assertFileOkForTool,
  isFileExternalAndNeedsConfirmation, and isDirExternalAndNeedsConfirmation
- Edit tools remain workspace-restricted (isFileOkForTool does not pass readOnly)
- .copilotignore rules are still respected for additional paths

Closes microsoft/vscode#293386

* Addresses PR feedback
2026-02-06 19:18:37 +00:00
Connor Peet bafbf12c59 pathResolver: try to resolve windows paths presented in a unix format (#3498)
* prompts: add vitest unit tests for PromptPathRepresentationService

Adds comprehensive unit test coverage for PromptPathRepresentationService
with 26 tests covering both PromptPathRepresentationService and
TestPromptPathRepresentationService:

- getFilePath() tests for file/vscode-remote/other schemes
- resolveFilePath() tests for posix/windows paths and URI parsing
- Windows-specific path handling (drive letters, UNC paths, backslashes)
- Workspace folder integration for drive letter rectification
- getExampleFilePath() tests for platform-specific output
- Round-trip conversion tests

Windows drive-letter tests are skipped on non-Windows platforms since
hasDriveLetter() uses the real OS, not the service override.

Fixes https://github.com/microsoft/vscode/issues/292422

(Commit message generated by Copilot)

* fix compile

* tests again

* fix test
2026-02-06 17:48:44 +00:00
Logan Ramos 731ade0a0d Attempt to make model service more resilient to network blips (#3523)
* Attempt to make model service more resilient to network blips

* Update src/extension/conversation/vscode-node/languageModelAccess.ts

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

* Update src/extension/prompt/vscode-node/endpointProviderImpl.ts

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-06 15:40:10 +00:00