Commit Graph

56 Commits

Author SHA1 Message Date
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
Rob Lourens 8ddd2a06e5 Disposable fixes (#3784)
Copilot-assisted
2026-02-16 23:20:55 +00:00
Ulugbek Abdullaev a8e4b9fe96 ghostText: log network requests to the log tree (#3669)
* ghostText: log network requests to the log tree

* nest requests

* Update src/platform/nesFetch/node/completionsFetchServiceImpl.ts

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

* Update src/platform/nesFetch/node/completionsFetchServiceImpl.ts

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

* address cpoilot comments

* address cpoilot comments

* Revert "Update src/platform/nesFetch/node/completionsFetchServiceImpl.ts"

This reverts commit da984b07119716d8585ca799851ea17cb5b4a7a4.

* fix tests

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-12 11:20:56 +00:00
Ulugbek Abdullaev 5e0ca23866 nes: flush copilot-nes-oct cache and run external nes stests (#3605)
* nes: flush copilot-nes-oct cache and run external nes stests

* update nes stests
2026-02-10 13:45:19 +00:00
Christof Marti a2a163471d Cleanup Response (#2876) 2026-01-15 20:28:17 +00:00
Ulugbek Abdullaev 065165159d ghost: use CompletionsFetchService (#2694)
* ghost: use CompletionsFetchService

also comes with lots of fixes in CompletionsFetchService

* ghost: stream: refactor: extract CopilotAnnotations types to platform/

* completionFetchService: remove hard-coding n=1

* support for copilot_annotations

* fix incorrect import

* fix incorrect destroy of http connection

* fix: update response accumulation logic in CompletionAccumulator

* refresh token more correctly
2026-01-15 12:37:16 +00:00
Matt Bierner c321d9b071 Add cancellation to trigger remote indexing (#2860) 2026-01-14 22:24:28 +00:00
Matt Bierner 4c06505696 Add progress messages for building external index (#2820) 2026-01-13 23:35:49 +00:00
Matt Bierner 7da3c60129 Fixes for external ingest (#2778)
* Fixes for external ingest

- Make sure we use relative paths
- Add command to clear
- Avoid requests if the index is already up to date

* Small cleanup
2026-01-10 00:14:12 +00:00
Ulugbek Abdullaev 04f265596f completionsFetchService: improve API to prep it for ghost-text use (#2693)
* fetcherService: change `FetchOptions#json` to be `unknown` instead of `any` and document it

* completionsFetchService: don't use `any`

* completionsFetchService: less logic within service

try reducing logic such that the service's easier to evolve

* completionsFetchService: refactor: cleanup

* address comments

* fix ci
2026-01-01 21:39:00 +00:00
Matt Bierner 3c8134184b Enable no-unexternalized-strings in repo (#2448)
Enables the same `no-unexternalized-strings` with have in `vscode` in this repo. This make sure we have a more consistent style across repos and when generating edits
2025-12-05 18:45:12 +00:00
Matt Bierner 4daa76719c Split up code search files (#2300) 2025-12-01 19:03:24 +00:00
Matt Bierner 79099f491d Re-work code search implementation (#2279)
* init

* Re-work code search implementation

Prepping for future work by making it easier to have individual repos in a workspace handle code search their own way. The previous implementation had gotten kind of unwieldy after we bolted on the ADO support. Extending it further would have made this even worse
2025-12-01 01:28:54 +00:00
Rob Lourens 2307f0294f Custom todo tool description for gpt models (#2274)
Fix #269031
2025-11-30 22:50:43 +00:00
Matt Bierner 6e7e60afd9 Reorganize code search repo management files (#2225)
Splitting these up and making sure we have better separation of concerns between the repo tracker and manager
2025-11-26 20:02:44 +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
Bhavya U 8208f3bd8a tools: add "Open Memory Folder" command (#1839) 2025-11-06 21:12:53 +00:00
Ulugbek Abdullaev f082551888 nes: remove old settings to configure model (#1823) 2025-11-06 14:04:18 +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
Kyle Cutler 7be42d291f Regenerate model metadata cache and fix outdated s-test (#1551)
Co-authored-by: Ulugbek Abdullaev <ulugbekna@gmail.com>
2025-10-24 15:49:26 +00:00
Logan Ramos 84b1a58984 Add resolved model (#1517) 2025-10-22 19:24:13 +00:00
Bhavya U 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
Johannes Rieken 1332cd871e make sure to cache tool calls in stests (#1397) 2025-10-17 13:06:42 +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
Rob Lourens 8c52cac169 Fixes for auto-approve blocking msbench (#1151) 2025-09-26 18:26:21 +00:00
Bhavya U 521947a5a1 Add CAPI text-3-small endpoint support for embeddings (#1037)
* Add CAPI text-3-small endpoint support for embeddings

* Update src/platform/endpoint/common/endpointProvider.ts

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

* Remove todo comment

* Update methods

* Remove unused options parameter from fetchResponseWithBatches call

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-25 09:26:43 +00:00
Rob Lourens 0044ab75e7 Clean up parameters in fetch methods just a little bit (#1031) 2025-09-12 04:41:50 +00:00
Rob Lourens 0ca1016c5e Port ensureNoDisposablesAreLeakedInTestSuite to vitest (#937)
and adopt in one test
2025-09-08 04:39:35 +00:00
Christof Marti 3b795b1e58 Extract @vscode/chat-lib (#807)
* Extract chat lib

* Extract chat lib

* Add test

* Get test working

* Simulate response

* Fix type issue

* Package

* Cleanup

* Tuck away workspace service

* Include package.json

* Ensure shim is used

* Include tiktoken files in package

* Update @vscode/copilot-api

* Ignore chat-lib
2025-08-29 14:41:27 +00:00
Matt Bierner e1d5bf35f9 Bubble up embeddings endpoint errors (#775)
Right now we return `undefined` when computing embeddings fails. I think it makes more sense to throw exceptions with the  details of why this failed so we can track these
2025-08-26 20:03:17 +00:00
Matt Bierner 3c8081656c Increase number of tokens full workspace can use (#760)
* Increase number of tokens full workspace can use

Adjusting some of the default numbers. Tool calling was ending up with a pretty small budget for `#codebase`

* Update a few more refs
2025-08-25 22:46:37 +00:00
Matt Bierner deb5d03551 Add telemetry for remote embeddings failures (#757)
We'd like to track errors with the embedding service
2025-08-25 19:52:14 +00:00
João Moreno fcb5c020b2 remove dead code (#200) 2025-08-25 15:38:14 +00:00
Rob Lourens 3177ea45f9 Add 'duration' to simulator request logs (#732)
even when cache is disabled
2025-08-23 18:55:58 +00:00
Matt Bierner db42689c5f Add caller telemetry to embeddings requests (#677)
This will help github understand load from different embeddings users
2025-08-19 23:28:08 +00:00
Matt Bierner c257f79722 Also move getting ado auth token into AdoCodeSearchService (#675)
Follow up on #673, doing the same for ado
2025-08-19 21:23:58 +00:00
Matt Bierner 88cbaa304d Move getting auth token into GithubCodeSearchService (#673)
This hides the implementation a bit better and should let us find the correct token for different repos
2025-08-19 20:40:15 +00:00
Matt Bierner 87410ce2d0 Update embedding names for simulation/test (#642) 2025-08-18 20:03:50 +00:00
SteVen Batten e18cf050d9 Support external cache layers (#572)
* support external cache layers

* cleanup

* address feedback
2025-08-18 14:36:23 +00:00
Rob Lourens e8cb541662 Make prompt_tokens_details optional (#625)
* Make prompt_tokens_details optional
gpt-oss does not send this, let's just call it optional

* Fix odd type errors
2025-08-17 22:07:20 +00:00
Matt Bierner 21aba584ae Unify embeddings paths (#595)
* Unify embeddings paths

Our code has two embeddings paths for legacy reasons:

- The capi api based one that only supports text3small. This is used everywhere except `#codebase`

- The new github embeddings endpoint based. This one supports additional embedding types and options. However it is currently only used in `#codebase`

This change switches everything to use the new github embeddings endpoint instead

* Fix static deps in tests
2025-08-14 14:34:41 +00:00
Rob Lourens bba605a8e0 Remove IntentParams and intent:true (#534)
Took a long time, this started as a PR on the old vscode-copilot repo
2025-08-09 18:43:43 +00:00
Rob Lourens fd290a0651 Implement responses API (#477)
* wip

* make it work

* error handling and retry on an invalid stateful marker

* Basic statefulMarker round-trip

* add createRequestBody on endpoints

* adopt createRequestBody in responses

* adopt generalized audience

Adopts https://github.com/microsoft/vscode/pull/259273

* Slice messages array based on stateful marker data

* Send statefulMarker via LanguageModelDataPart

* Stateful marker container value is not JSON

* Properly ignore stateful marker when requested

* add setting for byok responses api, log view

* encode model with stateful marker

* Add setting to toggle responses api truncation vs our summarization

* Fix AutoChatEndpoint after merge

* vitest

* fixup

* Try enabling response for azure

---------

Co-authored-by: Connor Peet <connor@peet.io>
Co-authored-by: Logan Ramos <loganramos@microsoft.com>
2025-08-06 17:14:06 +00:00
James Wang 733446d263 When rendering the prompts, exclude turns from the history that errored due to prompt filtration (#399)
* When rendering the prompts, exclude turns from the history that errored due to prompt filtration. This was resulting in users getting stuck in a state where all their subsequent requests were being filtered.

* Differentiate between response-filtered and prompt-filtered results (response-filtered requests should be rendered in the message history whereas prompt-filtered requests should not)
2025-07-30 19:41:25 +00:00
Connor Peet f841f8d820 tools: simplify virtual tool enablement (#396)
Make the virtual tool setting configure the threshold value, and unify
EXP behind it.
2025-07-30 00:42:51 +00:00
Connor Peet d04f262586 tools: trigger tool grouping on 128 limit automatically (#385)
Triggers tool grouping when users hit the 128 limit. Reworks an EXP
setting which allows the limit to be configurable (lowered or raised
arbitrarily high.) Users of the setting keep the existing 64 tool limit.
Will have a corresponding VS Code PR.
2025-07-28 22:30:10 +00:00
Ulugbek Abdullaev 6c7f7fbed6 logService: simplify API (#375) 2025-07-28 08:00:50 +00:00
Vritant Bhardwaj f167b31c28 Add ability to specify models through config for simulation tests (#324)
* add ability to specify modelConfig from file

* use custom model in test endpoint provider

* fix model check

* change model config to be independant from specifying model to run

* support yaml

* use readFileSync

* remove yaml parsing

* improve comment

* fix api key

* fix comment

* make opt parsing alig to comment
2025-07-23 17:03:54 +00:00
Logan Ramos 27577393b6 Allow skipping /models cache (#336) 2025-07-22 19:43:42 +00:00
Connor Peet 2732a9f48f tools: initial implementation of virtual tools (#310)
This behavior is enabled behind a setting `"github.copilot.chat.virtualTools.enabled": true,`

When enabled, if the tool count is over a threshold value, we'll group
tools into 'virtual tools'. The virtual tools act as directories that
only activate and show the tools they contain when the model calls them.
Grouping is done for an entire extension or MCP server if it presents
a small number of MCP tools, or for a categorization of tools when there
are a large number. Built-in tools are never grouped.

Expanded tool groups are automatically re-collapsed, based on LRU, if
the too limit is exceeded, or optimistically to a lower threshold during
summarization when there's going to be a cache miss anyway.

Todo:
- Better validation of LM categorization (ensure no missing tools)
- General Telemetry
- And logic to ensure that the tool limit can never be hit (heirarchal grouping)
- Explore embeddings as better pre-selection of expanded virtual tools
- Explore subagents as an alternative to expansion
- Success telemetry based on mirrored requests
2025-07-19 01:56:21 +00:00