Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
445 commits
Select commit Hold shift + click to select a range
259fb4a
Implement auto mode refresh (#722)
lramos15 Aug 22, 2025
ed4b22a
Let's revisit AI actions submenu (microsoft/vscode#255962) (#723)
bpasero Aug 22, 2025
c662172
Ensure notebook tool fails with descriptive error for model to unders…
DonJayamanne Aug 22, 2025
9d452d9
Ship completions code (#724)
alexdima Aug 22, 2025
10de094
Treat LM api request from core differently (#725)
lramos15 Aug 22, 2025
62000f3
Remove stale context key (#726)
lramos15 Aug 22, 2025
37bb43a
Revert engine bump (#728)
roblourens Aug 22, 2025
968594a
Add prompt-tsx instructions (#727)
digitarald Aug 22, 2025
c0d33fb
tools: allow the replace_string tool to create non-existent files (#729)
connor4312 Aug 22, 2025
a9b3df4
More responses API work (#730)
roblourens Aug 23, 2025
cd340ec
Fix "report feedback" bad formatting of tool results (#731)
roblourens Aug 23, 2025
f9bf02b
Add 'duration' to simulator request logs (#732)
roblourens Aug 23, 2025
b533be2
Enable claude code agents (#734)
roblourens Aug 24, 2025
8ab3698
fix - update title for documentation generation (#735)
bpasero Aug 24, 2025
5d12ea6
Remove dupe tool name (#736)
roblourens Aug 24, 2025
d9e963e
Adopt canUseTool for claude code (#737)
roblourens Aug 24, 2025
2e232c0
Add tests to anthropicMessagesToRawMessages, move to common (#738)
roblourens Aug 24, 2025
d83c8b6
General cleanup for agents/ (#739)
roblourens Aug 24, 2025
a084f4b
Additional telemetry for Notebook NES (#740)
DonJayamanne Aug 25, 2025
7021d4c
Update vscode version in package-lock.json (#741)
DonJayamanne Aug 25, 2025
d0c5c42
actions - rename to "Review" to align with code actions (#742)
bpasero Aug 25, 2025
6c9b6f7
nes: fix: dispose RejectionCollector (#744)
ulugbekna Aug 25, 2025
d27ac4e
nes: feat: enable emit-fast-cursor-change by default (#743)
ulugbekna Aug 25, 2025
cdf17c9
Align API with copilot client (#745)
dbaeumer Aug 25, 2025
e1f6dc4
Add telemetry data for Notebook Edits (#747)
DonJayamanne Aug 25, 2025
8e8b97f
nes: clean up enforcing minimum response delay and cancellation handl…
ulugbekna Aug 25, 2025
cacf214
nes: do not enforce minimum response delay for NES in 2 cases (#748)
ulugbekna Aug 25, 2025
e9ebf2f
Move to latest completion core (#749)
dbaeumer Aug 25, 2025
70d9251
nes: add a setting to auto-expand edit window to N lines after NES wa…
ulugbekna Aug 25, 2025
0e52974
update completions core version (#751)
benibenj Aug 25, 2025
e828cb9
remove dead code (#200)
joaomoreno Aug 25, 2025
bba7cf6
Update ExP Service to have user account based filters (#620)
sbatten Aug 25, 2025
5ce03a7
debug chat replay with replay intent (#693)
amunger Aug 25, 2025
dffa018
Fix bad use of ServicesAccessor after await (#755)
roblourens Aug 25, 2025
020eea6
Have apply patch apply to BYOK (#756)
lramos15 Aug 25, 2025
bb3dc7d
revert prompt change (#754)
amunger Aug 25, 2025
e7494e4
Add telemetry for remote embeddings failures (#757)
mjbvz Aug 25, 2025
e076081
remove condition for TodoListToolInstructions rendering and add clar…
bhavyaus Aug 25, 2025
0dd5acb
Log embedding type (#758)
mjbvz Aug 25, 2025
362c105
update completionsCore (#759)
benibenj Aug 25, 2025
af29d90
Increase number of tokens full workspace can use (#760)
mjbvz Aug 25, 2025
7d0e778
Add encrypted thinking delta and clean up services (#733)
karthiknadig Aug 25, 2025
1d28d18
Avoid unhandled rejections in aml tests (#762)
roblourens Aug 25, 2025
0f74ae3
For new notebooks uses create file if edit does not exist (#763)
DonJayamanne Aug 26, 2025
07d73ab
Include CC cli.js in the vsix (#752)
roblourens Aug 26, 2025
04310c2
Fix initialize not awaiting properly (#768)
mjbvz Aug 26, 2025
9603f54
Add telemetry on ado remote index status requests (#761)
mjbvz Aug 26, 2025
ad29db9
Provide notebook contents on creation (#766)
DonJayamanne Aug 26, 2025
1bad2e8
Ensure we have just one selection in notebooks (#683)
DonJayamanne Aug 26, 2025
3f481c9
Ensure notebook cell id is mandatory in edit tool (#770)
DonJayamanne Aug 26, 2025
2d736ee
update completions core version (#771)
benibenj Aug 26, 2025
dace894
Straighten out body.reasoning handling (#764)
roblourens Aug 26, 2025
36a6526
ext: update thinking part shape for responses api (#765)
justschen Aug 26, 2025
e2bf65c
Add fake tool to enable editing (#774)
roblourens Aug 26, 2025
2f3fb40
trace edits and log into the debug logs (#773)
amunger Aug 26, 2025
cfe564a
Add telemetry flag for API type (#776)
roblourens Aug 26, 2025
7741544
Bubble up embeddings endpoint errors (#775)
mjbvz Aug 26, 2025
e32765a
Add excludes and groupId (#777)
benibenj Aug 26, 2025
055c656
More strict conditions for using new Jupyter Notebook tool (#767)
DonJayamanne Aug 27, 2025
9de2f11
Telemetry to determine if NES completion for active doc (#779)
DonJayamanne Aug 27, 2025
0978a93
Streamline toolsets, cleanup tool descriptions (#780)
roblourens Aug 27, 2025
fb48bc6
Move notebook cell marker telemetry (#782)
DonJayamanne Aug 27, 2025
877f964
Ignore NES edits with Notebook Cell Markers (#785)
DonJayamanne Aug 27, 2025
0f7549f
nes: include recording as is in issue report (#786)
ulugbekna Aug 27, 2025
c987c09
nes: fix: don't retry if the edit window was already expanded (#787)
ulugbekna Aug 27, 2025
c8466aa
tree sitter: fix stack overflow when running queries (#788)
ulugbekna Aug 27, 2025
12bd91b
nes: language context: include opportunity ID in the language context…
ulugbekna Aug 27, 2025
099fa66
add tool and other metadata (#789)
zhichli Aug 27, 2025
4a7b499
Gemini -> Google (#790)
lramos15 Aug 27, 2025
bcdec39
Remove findTestFiles (#791)
roblourens Aug 27, 2025
f57a143
Add clearer telemetry on type of embedding used for workspace search …
mjbvz Aug 27, 2025
f0c0742
Update to consume latest chat provider API (#793)
lramos15 Aug 27, 2025
5cffebb
Implement ChatSessionItemProvider (#781)
roblourens Aug 27, 2025
52dbe79
replace (#794)
zhichli Aug 27, 2025
5338bf6
Don't block firing onDidAuthenticationChange if ado has changed (#796)
mjbvz Aug 27, 2025
9a38483
account for log structure changes (#795)
amunger Aug 27, 2025
48ced0b
Add more logging and exec time telemetry for ado code search (#798)
mjbvz Aug 27, 2025
4374ddc
Remove redundant newNotebook.enabled experiment setting (#797)
DonJayamanne Aug 27, 2025
c6ecec0
add privateUri field for optional internal routing (#799)
Yoyokrazy Aug 27, 2025
b1aac0e
Fix missing reasoning summary text from encrypted content parts (#801)
roblourens Aug 28, 2025
b40d720
Don't create repo tracker if code search is disabled (#800)
mjbvz Aug 28, 2025
626f335
Additional notebook NES telemetry (#802)
DonJayamanne Aug 28, 2025
8254f14
Experiment for enhanced next edit suggestions in notebooks (#804)
DonJayamanne Aug 28, 2025
9a05257
Separate feature flag for displaying Next Editor NES (#805)
DonJayamanne Aug 28, 2025
3a2deae
Remove redundant notebook exp (#803)
DonJayamanne Aug 28, 2025
c43beb8
Add onDidChangeTextEditorSelection textdocument manager (#806)
DonJayamanne Aug 28, 2025
3d49483
Add TextEditorSelectionChangeKind, TextDocumentChangeReason into vsco…
DonJayamanne Aug 28, 2025
1c78de7
Revert "Don't create repo tracker if code search is disabled (#800)" …
alexdima Aug 28, 2025
a918b36
Minor refactoring for easier testing (#810)
DonJayamanne Aug 28, 2025
9ba51f8
Simple unit tests for InlineEditTriggerer (#812)
DonJayamanne Aug 28, 2025
7c24d3f
Reenable sanity test (#813)
roblourens Aug 28, 2025
9a441d7
Add REST rate limit logging (#814)
alexr00 Aug 28, 2025
f10424d
Add copilot extension version filters (#815)
benibenj Aug 28, 2025
ff7a64c
Reapply #800 (#816)
mjbvz Aug 28, 2025
8f35b67
Render auto mode discount (#818)
lramos15 Aug 28, 2025
2c56070
Fix passing toolid via metadata (#820)
karthiknadig Aug 28, 2025
1416aa9
handle array type thinking (#821)
justschen Aug 28, 2025
c13d398
Add conditional display for interactive session in workspace , vscode…
bhavyaus Aug 29, 2025
9d00e07
re-skip sanity test (#823)
roblourens Aug 29, 2025
4fe338b
defaultValue in configuration can be `undefined` (#824)
DonJayamanne Aug 29, 2025
78100aa
Add experimental prompts for Grok Code models and update related conf…
bhavyaus Aug 29, 2025
d392d0f
/tests: do not edit files when in panel chat (Ask mode shouldn't edit…
ulugbekna Aug 29, 2025
e6755c9
Wrap completions core events to avoid tweaking their names (#827)
alexdima Aug 29, 2025
3a80053
Bump completions core sha (#828)
alexdima Aug 29, 2025
07cf385
Reduce code in `/shims/` and rely on code coming in from vscode (#784)
alexdima Aug 29, 2025
21c47ce
Extract @vscode/chat-lib (#807)
chrmarti Aug 29, 2025
904106f
Chat - update pipeline template (#834)
lszomoru Aug 29, 2025
cfed3e2
update config service when exp changes (#817)
sbatten Aug 29, 2025
e2f72ef
fix completionsCoreVersion field (#831)
benibenj Aug 29, 2025
3c6be7d
Parallelize some of the initial copilot token fetch (#835)
lramos15 Aug 29, 2025
1181c50
Reuse more code from vscode (#836)
alexdima Aug 29, 2025
6a0f6fe
Support excluding a provider when using nes (#837)
benibenj Aug 29, 2025
4a3b8de
Remove experimental setting for retrying after filtered response (#830)
jwangxx Aug 29, 2025
3d0862d
nes: create a setting to allow/disallow whitespace-only NES (#838)
ulugbekna Aug 29, 2025
2098944
Fix dependencies (#839)
chrmarti Aug 29, 2025
23e70d1
add sku data to github telemetry (#819)
24anisha Aug 29, 2025
4443e6e
Refactor edit file instructions for clarity and efficiency in Default…
bhavyaus Aug 29, 2025
2891f6d
Fix Claude Code new session (#842)
roblourens Aug 29, 2025
d5d2996
do not allow thought arrays for completions api (#840)
justschen Aug 29, 2025
fdceffc
Run without actual token (#843)
chrmarti Aug 29, 2025
2337648
Additional Notebook NES telemetry (#845)
DonJayamanne Aug 30, 2025
9dc5148
Remove experiment for applying patches to notebooks (#846)
DonJayamanne Aug 30, 2025
8698932
Update notebook nes telemetry to track cell index for Next Edit (#847)
DonJayamanne Aug 30, 2025
e8f5127
Load claude code session history, format tool results (#848)
roblourens Aug 30, 2025
f70b8af
Install Node.js 22.x (#849)
chrmarti Aug 30, 2025
699d261
Stream tool invocations from claude code, improve confirmations (#850)
roblourens Aug 30, 2025
d8fc61a
Support # file references in claude code session (#851)
roblourens Aug 31, 2025
d331443
Clean up LanguageModelServer a little (#852)
roblourens Aug 31, 2025
7b03d82
Nicer rendering for some CC tools (#853)
roblourens Aug 31, 2025
7bedb8f
Fix chat-lib build (#854)
chrmarti Aug 31, 2025
8192930
Add CC prompt hint about markdown rendering (#856)
roblourens Aug 31, 2025
cba1ac2
CC fixes (#857)
roblourens Aug 31, 2025
018376a
Add execute_prompt and execute_task tools (#858)
roblourens Sep 1, 2025
acb3979
Add support for fetching release notes by version and update VscodePr…
bhavyaus Sep 1, 2025
63dd3ad
Enable command based on setting (#860)
DonJayamanne Sep 1, 2025
868c9b9
Review individual file changes (#295)
chrmarti Sep 1, 2025
a19ec39
Clean up code review names (#861)
chrmarti Sep 1, 2025
5a1be9a
Fix proposal version (#864)
chrmarti Sep 1, 2025
c7bcdc1
update completions contribution (#863)
benibenj Sep 1, 2025
4bc3820
Clean up code review progress (#862)
chrmarti Sep 1, 2025
0280f29
Omit parentheses (#865)
chrmarti Sep 1, 2025
2a464a5
Add setting for review agent (#866)
chrmarti Sep 1, 2025
772753a
auto-approve MultiEdit tool calls (#867)
roblourens Sep 1, 2025
e0f45f5
CC- Strip chat attachments from loaded sessions (#868)
roblourens Sep 1, 2025
5213a46
Adjust token usage for context window size and clean up types (#869)
roblourens Sep 1, 2025
1b3a215
Enable the passing sanity tests (#855)
roblourens Sep 1, 2025
04c6f72
Fix IParsedRequest types (#870)
roblourens Sep 1, 2025
8198b86
Support related extensions filters and completions experiment flags (…
benibenj Sep 1, 2025
07c9847
update completions core (#873)
benibenj Sep 1, 2025
5f487c9
Add INativeEnvService to avoid 'os' module import, cleanup tests (#872)
roblourens Sep 1, 2025
32ca853
Refactor TodoListToolInstructions to enhance clarity and guidance on …
bhavyaus Sep 2, 2025
7458275
Make completions model available (#876)
benibenj Sep 2, 2025
745efc2
Disallow importing straight from /extHostTypes/ and avoid instanceof …
alexdima Sep 2, 2025
85061be
nes: don't use spread operator to avoid stack overflow (#879)
ulugbekna Sep 2, 2025
fcae85d
update completions core version (#880)
benibenj Sep 3, 2025
ee0d614
Add missing methods (#881)
chrmarti Sep 3, 2025
06eeb44
Change reasoning default (#884)
roblourens Sep 3, 2025
5251976
Pass proper header to auto mode (#882)
lramos15 Sep 3, 2025
dd3ef47
Make claude code settings not "internal" (#885)
roblourens Sep 3, 2025
5487ce4
update configurations on exp sync (#883)
benibenj Sep 3, 2025
a2ec8e9
Make sure `isCopilotIgnored` checks for workspace all go through our …
mjbvz Sep 3, 2025
5c21047
Limit returned diff size (#887)
mjbvz Sep 3, 2025
ba5c075
prompts: include mcp server instructions in codex-style gpt prompt (#…
connor4312 Sep 3, 2025
f667d24
Fix loading some claude sessions (#889)
roblourens Sep 3, 2025
caaf0c3
edits: adjust confirmations for system files and outside the workspac…
connor4312 Sep 3, 2025
9b0c8e4
edits: support relative globs in chat.tools.edits.autoApprove (#892)
connor4312 Sep 3, 2025
87c08f0
Telemetry for claude code requests (#893)
roblourens Sep 4, 2025
60a4302
Revert notebook toolset change (#894)
roblourens Sep 4, 2025
6531820
Don't load invalid cc summaries part 2 (#895)
roblourens Sep 4, 2025
c669d5d
Custom instructions not being picked up in Code Review and Comment Fe…
aeschli Sep 4, 2025
844b2b8
Consume new unification vscode API when available (#897)
alexdima Sep 4, 2025
d836be4
Intercept the exp storage and refuse to use the cache if the extensio…
alexdima Sep 4, 2025
8ac54c7
Dbaeumer/bare-frog-silver (#899)
dbaeumer Sep 4, 2025
42292f0
Fixes usage of this before super. (#901)
hediet Sep 4, 2025
e0519fa
Don't pass session token to refresh if expired (#900)
lramos15 Sep 4, 2025
edd9c6a
Sanitize values (#902)
chrmarti Sep 4, 2025
259419a
Dispose diff review registration when setting is disabled (#903)
chrmarti Sep 4, 2025
f525e74
only use java imports in pre release (#905)
benibenj Sep 4, 2025
2738ac3
update completions core version to align with copilot extension (#907)
benibenj Sep 4, 2025
93b0cc1
Dump users into add model quick pick for custom oai (#906)
lramos15 Sep 4, 2025
d71a4e8
Retry with first fetcher to avoid fallback on resume (#909)
chrmarti Sep 4, 2025
98c1dfc
Consume changed API shape (#910)
lramos15 Sep 4, 2025
a70e78b
edits: fix create file being hidden (#912)
connor4312 Sep 4, 2025
54f7e8d
Fix responses API (#914)
roblourens Sep 5, 2025
eb88c4b
Refine gpt-5 agent prompt instructions for clarity and concisenes (#915)
bhavyaus Sep 5, 2025
67907c6
bump version (#917)
sandy081 Sep 5, 2025
87ca5be
Remove dead command (#918)
lramos15 Sep 5, 2025
25e5b4f
Enable fallback on parallel request (#919)
chrmarti Sep 5, 2025
6f683c9
nes: send telemetry for errors that can be thrown from NextEditProvid…
ulugbekna Sep 5, 2025
e1e8fbc
Add auto mode exp (#922)
lramos15 Sep 5, 2025
da9c96e
edits: consider symlinks when guarding edits to files (#913)
connor4312 Sep 5, 2025
1f4df0e
Fix issues with initial OAI Compatible flow (#924)
lramos15 Sep 5, 2025
54f6f25
Update GPT-5 agent prompt instructions with specific handling for 'gp…
bhavyaus Sep 5, 2025
4e57645
Make sure we close the chunk db (#911)
mjbvz Sep 5, 2025
fcb0404
Explicitly dispose of the SimulationWorkspace (#929)
mjbvz Sep 6, 2025
43fa099
I don't know why this was public (#932)
roblourens Sep 6, 2025
20580cb
Clarify EditedFileEvents (#931)
roblourens Sep 7, 2025
ba01af8
Add a bunch of readonly (#933)
roblourens Sep 7, 2025
2d4c178
Add refresh button to CC sessions (#934)
roblourens Sep 8, 2025
64f9a97
Add reasoningEffort/Summary telemetry (#936)
roblourens Sep 8, 2025
3398bdd
Port ensureNoDisposablesAreLeakedInTestSuite to vitest (#937)
roblourens Sep 8, 2025
6ef1162
Tweak LM server debugname (#938)
roblourens Sep 8, 2025
ae37f9c
Move to new @vscode/tree-sitter-wasm version (#939)
dbaeumer Sep 8, 2025
7ff6360
nes: xtab: refactor: extract determining prompt options (#942)
ulugbekna Sep 8, 2025
73f6438
nes: cleanup: remove summarized* telemetry because we don't use summa…
ulugbekna Sep 8, 2025
922cd8b
fix: update auto model description to reflect accurate request rate (…
isidorn Sep 8, 2025
097ec33
Rerun fallbacks (#945)
chrmarti Sep 8, 2025
78df245
Ensure-deps should use `npm ci` (#947)
karthiknadig Sep 8, 2025
badc927
Add log for editor version + extension version (#948)
lramos15 Sep 8, 2025
94839c8
Fix response handling in GHRepoService and add types to prevent futur…
TylerLeonhardt Sep 8, 2025
a71fc65
Allow forcing the dev integration (#928)
lramos15 Sep 8, 2025
64f708c
Don't create repo tracker after disposal (#930)
mjbvz Sep 8, 2025
f37ac67
tools: coerce stringified json in place of objects in tool calls (#949)
connor4312 Sep 8, 2025
cc4d151
Only show the prompt for the focused window or the next focused (#955)
TylerLeonhardt Sep 8, 2025
297950e
edits: exp to update apply_patch instructions for 5 (#954)
connor4312 Sep 8, 2025
6c1cb4b
Don't index files outside of the workspace (#957)
mjbvz Sep 9, 2025
41c62a8
nes: cleanup NextEditProvider a little (#960)
ulugbekna Sep 9, 2025
8727e61
Add exp settings for existing shared settings (#956)
chrmarti Sep 9, 2025
3803870
Move to latest completions-core (#964)
dbaeumer Sep 9, 2025
d255a59
Remove expensive EOL diff check (#966)
DonJayamanne Sep 9, 2025
19d8d23
Fix: Sanitize entire embedded value (#961)
chrmarti Sep 9, 2025
e424c19
For https://github.com/microsoft/vscode/issues/265820 in main (#971)
hediet Sep 9, 2025
d221873
add session id and tracking id to github telemetry (#973)
benibenj Sep 9, 2025
b5f5799
nes: have two settings that allow to tweak delay on rebased and subse…
ulugbekna Sep 9, 2025
3138e34
nes: don't send error telemetry but normal (#976)
ulugbekna Sep 9, 2025
2b2ae0c
fix launch config (#977)
joaomoreno Sep 9, 2025
5520acb
Surface ITelemetrySender (#979)
chrmarti Sep 9, 2025
5d57757
edits: support multi replace string for Grok (#981)
connor4312 Sep 9, 2025
23f09b9
edits: fix multi replace string enabled with edits off (#982)
connor4312 Sep 9, 2025
b65e653
Add missing dependency (#985)
chrmarti Sep 9, 2025
2ddaf12
enable image uploads by default for everyone (#988)
justschen Sep 9, 2025
37b4318
Yemohyle/dedup messages telemetry (#952)
yemohyleyemohyle Sep 9, 2025
ce0fac9
Yemohyle/edit feedback msft internal (#984)
yemohyleyemohyle Sep 9, 2025
2efa53f
Nudge model to avoid giving notebook JSON into edit tool (#997)
DonJayamanne Sep 10, 2025
ab89433
tools: support new data type for MCP resource linkes (#995)
connor4312 Sep 10, 2025
22541e4
nes: refactor: make `getUserPrompt` leaner to make it more testable (…
ulugbekna Sep 10, 2025
09fdd23
VSCodeWorkspace cleanup (#1004)
hediet Sep 10, 2025
d33fb89
nes: refactor: abstract computing minimum response delay (#1005)
ulugbekna Sep 10, 2025
eed24b1
tracer: add `subNoEntry` (#1006)
ulugbekna Sep 10, 2025
e65df90
nes: fix: persist shouldExpandEditWindow until we issue a request and…
ulugbekna Sep 10, 2025
bb62f6f
nes: feat: make edit-would-undo-insertion filter exp-configurable (#1…
ulugbekna Sep 10, 2025
57f551c
add build task info to custom instructions for `vscode-copilot-chat` …
meganrogge Sep 10, 2025
d1cf042
tools: fix usages tool not find symbols from other files (#1014)
connor4312 Sep 10, 2025
64c749c
Add completionTokens to telemetry (#1016)
roblourens Sep 10, 2025
3552ad7
Git - add context menu action to resolve merge conflicts (#1011)
lszomoru Sep 11, 2025
22f9697
update contributing.md (#1017)
bpasero Sep 11, 2025
db7ed74
enable auto only when editor preview features are ON (#999)
isidorn Sep 11, 2025
8c318fc
chat - towards experimental anonymous access (#972)
bpasero Sep 11, 2025
05181a1
Upstream merges for 1.104.0
timtmok Sep 17, 2025
7d7d253
Fix REH build
timtmok Sep 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
28 changes: 23 additions & 5 deletions .esbuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const baseNodeBuildOptions = {
mainFields: ["module", "main"], // needed for jsonc-parser,
define: {
'process.env.APPLICATIONINSIGHTS_CONFIGURATION_CONTENT': '"{}"'
}
},
} satisfies esbuild.BuildOptions;

const nodeExtHostTestGlobs = [
Expand All @@ -68,7 +68,7 @@ const testBundlePlugin: esbuild.Plugin = {
return { path: path.resolve(args.path) };
});
build.onLoad({ filter: /[\/\\]test-extension\.ts$/ }, async args => {
let files = await glob(nodeExtHostTestGlobs, { cwd: REPO_ROOT, posix: true });
let files = await glob(nodeExtHostTestGlobs, { cwd: REPO_ROOT, posix: true, ignore: ['src/extension/completions-core/**/*'] });
files = files.map(f => path.posix.relative('src', f));
if (files.length === 0) {
throw new Error('No extension tests found');
Expand Down Expand Up @@ -98,7 +98,7 @@ const sanityTestBundlePlugin: esbuild.Plugin = {
return { path: path.resolve(args.path) };
});
build.onLoad({ filter: /[\/\\]sanity-test-extension\.ts$/ }, async args => {
let files = await glob(nodeExtHostSanityTestGlobs, { cwd: REPO_ROOT, posix: true });
let files = await glob(nodeExtHostSanityTestGlobs, { cwd: REPO_ROOT, posix: true, ignore: ['src/extension/completions-core/**/*'] });
files = files.map(f => path.posix.relative('src', f));
if (files.length === 0) {
throw new Error('No extension tests found');
Expand All @@ -114,6 +114,23 @@ const sanityTestBundlePlugin: esbuild.Plugin = {
}
};

const importMetaPlugin: esbuild.Plugin = {
name: 'claudeCodeImportMetaPlugin',
setup(build) {
// Handle import.meta.url in @anthropic-ai/claude-code package
build.onLoad({ filter: /node_modules[\/\\]@anthropic-ai[\/\\]claude-code[\/\\].*\.mjs$/ }, async (args) => {
const contents = await fs.promises.readFile(args.path, 'utf8');
return {
contents: contents.replace(
/import\.meta\.url/g,
'require("url").pathToFileURL(__filename).href'
),
loader: 'js'
};
});
}
};

const shimVsCodeTypesPlugin: esbuild.Plugin = {
name: 'shimVsCodeTypesPlugin',
setup(build) {
Expand Down Expand Up @@ -160,7 +177,7 @@ const nodeExtHostBuildOptions = {
{ in: './src/sanity-test-extension.ts', out: 'sanity-test-extension' },
],
loader: { '.ps1': 'text' },
plugins: [testBundlePlugin, sanityTestBundlePlugin],
plugins: [testBundlePlugin, sanityTestBundlePlugin, importMetaPlugin],
external: [
...baseNodeBuildOptions.external,
'vscode'
Expand Down Expand Up @@ -221,7 +238,7 @@ const nodeSimulationWorkbenchUIBuildOptions = {
'child_process',
'http',
'assert',
]
],
} satisfies esbuild.BuildOptions;

async function typeScriptServerPluginPackageJsonInstall(): Promise<void> {
Expand Down Expand Up @@ -326,6 +343,7 @@ async function main() {
`**/*.w.json`,
'**/*.sqlite',
'**/*.sqlite-journal',
'test/aml/out/**'
]
});
rebuild();
Expand Down
4 changes: 4 additions & 0 deletions .eslint-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ test/simulation/fixtures/**
test/scenarios/**
.simulation/**
.eslintplugin/**
chat-lib/**

# ignore vs
src/util/vs/**
Expand All @@ -26,3 +27,6 @@ src/extension/typescriptContext/serverPlugin/dist/**

# Ignore Built test-extension
.vscode/extensions/test-extension/dist/**

# Ignore completions-core
src/extension/completions-core/**
17 changes: 17 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@ This is the **GitHub Copilot Chat** extension for Visual Studio Code - a VS Code
- **Vitest**: Unit testing framework
- **Python**: For notebooks integration and ML evaluation scripts

## Validating changes

You MUST check compilation output before running ANY script or declaring work complete!

1. **ALWAYS** check the `start-watch-tasks` watch task output for compilation errors
2. **NEVER** use the `compile` task as a way to check if everything is working properly
3. **FIX** all compilation errors before moving forward

### TypeScript compilation steps
- Monitor the `start-watch-tasks` task outputs for real-time compilation errors as you make changes
- This task runs `npm: watch:tsc-extension`,`npm: watch:tsc-extension-web`, `npm: watch:tsc-simulation-workbench`, and `npm: watch:esbuild` to incrementally compile the project
- Start the task if it's not already running in the background

## Project Architecture

### Top-Level Directory Structure
Expand Down Expand Up @@ -319,3 +332,7 @@ The extension uses numerous proposed VS Code APIs for advanced functionality:
- **Configuration**: Modify `package.json` contributions for VS Code integration

This extension is a complex, multi-layered system that provides comprehensive AI assistance within VS Code. Understanding the service architecture, contribution system, and separation between platform and extension layers is crucial for making effective changes.

## Best Practices
- Use services and dependency injection whenever possible instead of using node or vscode APIs directly. For example, use `IFileService` instead of node's `fs`.
- Always use the URI type instead of using string file paths. There are many helpers available for working with URIs.
167 changes: 167 additions & 0 deletions .github/instructions/prompt-tsx.instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
---
applyTo: '**/*.tsx'
description: Prompt-TSX coding guidelines
---

Guidelines for TSX files using [prompt-tsx](https://github.com/microsoft/vscode-prompt-tsx) focusing on specific patterns and token budget management for AI prompt engineering.

## Component Structure

### Base Pattern
- Extend `PromptElement<Props>` or `PromptElement<Props, State>` for all prompt components
- Props interfaces must extend `BasePromptElementProps`

```tsx
interface MyPromptProps extends BasePromptElementProps {
readonly userQuery: string;
}

class MyPrompt extends PromptElement<MyPromptProps> {
render() {
return (
<>
<SystemMessage priority={1000}>...</SystemMessage>
<UserMessage priority={900}>{this.props.userQuery}</UserMessage>
</>
);
}
}
```

### Async Components
- The `render` method can be async for components that need to perform async operations
- All async work should be done directly in the `render` method

```tsx
class FileContextPrompt extends PromptElement<FileContextProps> {
async render() {
const fileContent = await readFileAsync(this.props.filePath);
return (
<>
<SystemMessage priority={1000}>File content:</SystemMessage>
<UserMessage priority={900}>{fileContent}</UserMessage>
</>
);
}
}
```

## Prompt-Specific JSX

### Line Breaks
- **CRITICAL**: Use `<br />` for line breaks - newlines are NOT preserved in JSX
- Never rely on whitespace or string literal newlines

```tsx
// ✅ Correct
<SystemMessage>
You are an AI assistant.<br />
Follow these guidelines.<br />
</SystemMessage>

// ❌ Wrong - newlines will be collapsed
<SystemMessage>
You are an AI assistant.
Follow these guidelines.
</SystemMessage>
```

## Priority System

### Priority Values
- Higher numbers = higher priority (like z-index)
- Use consistent ranges:
- System messages: 1000
- User queries: 900
- Recent history: 700-800
- Context/attachments: 600-700
- Background info: 0-500

```tsx
<SystemMessage priority={1000}>...</SystemMessage>
<UserMessage priority={900}>{query}</UserMessage>
<HistoryMessages priority={700} />
<ContextualData priority={500} />
```

### Flex Properties for Token Budget
- `flexGrow={1}` - expand to fill remaining token space
- `flexReserve` - reserve tokens before rendering
- `passPriority` - pass-through containers that don't affect child priorities

```tsx
<FileContext priority={70} flexGrow={1} files={this.props.files} />
<History passPriority older={0} newer={80} flexGrow={2} flexReserve="/5" />
```

## Content Handling

### TextChunk for Truncation
- Use `TextChunk` for content that may exceed token budget
- Set `breakOn` patterns for intelligent truncation

```tsx
<TextChunk breakOnWhitespace priority={100}>
{longUserQuery}
</TextChunk>

<TextChunk breakOn=" " priority={80}>
{documentContent}
</TextChunk>
```

### Tag Component for Structured Content
- Use `Tag` for XML-like structured content with attributes
- Validates tag names and properly formats attributes

```tsx
<Tag name="attachments" attrs={{ id: variableName, type: "file" }}>
{content}
</Tag>
```

## References and Metadata

### Prompt References
- Use `<references>` for tracking variable usage
- Use `<meta>` for metadata that survives pruning

```tsx
<references value={[new PromptReference({ variableName })]} />
<meta value={new ToolResultMetadata(id, result)} />
```

### Keep-With Pattern
- Use `useKeepWith()` for content that should be pruned together

```tsx
const KeepWith = useKeepWith();
return (
<>
<KeepWith priority={2}>
<ToolCallRequest>...</ToolCallRequest>
</KeepWith>
<KeepWith priority={1}>
<ToolCallResponse>...</ToolCallResponse>
</KeepWith>
</>
);
```

## Token Budget Management

### Sizing-Aware Rendering
- Use `PromptSizing` parameter for budget-aware content generation
- Implement cooperative token usage

```tsx
async render(sizing: PromptSizing): Promise<PromptPiece> {
const content = await this.generateContent(sizing.tokenBudget);
return <>{content}</>;
}
```

### Performance
- Avoid expensive work in `render` methods when possible
- Cache computations when appropriate
- Use async `render` for all async operations
14 changes: 14 additions & 0 deletions .github/instructions/vitest-unit-tests.instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
applyTo: '**/*.spec.ts'
description: Vitest unit testing guidelines
---

Guidelines for writing unit tests using Vitest. These tests are `*.spec.ts`

## Best Practices

- Use proper mocks when possible rather than ad-hoc objects injected as dependencies. For example, call `createExtensionUnitTestingServices` to get some mock services, and `IInstantiationService` to create instances with those mocks.
- If there is no preexisting implementation of a service that is appropriate to reuse in the test, then you can create a simple mock or stub implementation.
- Avoid casting to `any` whenever possible.
- When asked to write new tests, add tests for things that are interesting and nontrivial. Don't add a test that just verifies that a setter/getter work.
- Prefer the runTests tool to run tests over a terminal command.
13 changes: 10 additions & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ jobs:
python-version: '3.12'
architecture: 'x64'

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0'

- name: Install setuptools
run: pip install setuptools

Expand Down Expand Up @@ -116,9 +121,6 @@ jobs:
mkdir -p .build/build_cache
tar -czf .build/build_cache/cache.tgz --files-from .build/build_cache_list.txt

- name: Install dotnet cli
run: npm run setup:dotnet

- name: TypeScript type checking
run: npm run typecheck

Expand Down Expand Up @@ -171,6 +173,11 @@ jobs:
python-version: '3.12'
architecture: 'x64'

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0'

- name: Install setuptools
run: pip install setuptools

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ coverage/
test/simulation/cache/_base.sqlite

test/aml/out
src/extension/completions-core
33 changes: 33 additions & 0 deletions .mocha-multi-reporters.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
const path = require('path');

// In CI, the name of the NPM command that was run is used to generate a unique
// filename for the JUnit report. The name we give it is then used as the test
// bundle name in DataDog.
const commandToBundleName = {
isolatedProxyTests: 'IsolatedProxy',
reverseProxyTests: 'ReverseProxy',
test: 'LSPClient',
'test:agent': 'Agent',
'test:lib': 'Lib',
'test:lib-e2e': 'LibEndToEnd',
};

const config = {
reporterEnabled: 'spec',
};

if (process.env.CI) {
const bundleName = commandToBundleName[process.env.npm_lifecycle_event] || 'Unit';
config.reporterEnabled += ', mocha-junit-reporter';
config.mochaJunitReporterReporterOptions = {
testCaseSwitchClassnameAndName: true,
testsuitesTitle: `Copilot ${bundleName} Tests`,
mochaFile: path.resolve(__dirname, `test-results-${bundleName}.xml`),
};
}

module.exports = config;
Loading
Loading