Skip to content

Commit 76f3de2

Browse files
committed
Refactor chat and test infrastructure, add new features
Major update to chat features and related infrastructure: introduces new content parts, session operation logging, and agent session controls. Refactors and extends chat session, agent, and tool invocation logic. Updates test and build pipelines for improved sanity test handling and validation. Adds new CSS theme files, utilities, and accessibility improvements. Updates documentation and learnings, and makes various bug fixes and enhancements across chat, terminal, and theme services.
1 parent 0dace8d commit 76f3de2

333 files changed

Lines changed: 15069 additions & 2772 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/copilot-instructions.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,3 +137,6 @@ function f(x: number, y: string): void { }
137137
- When adding file watching, prefer correlated file watchers (via fileService.createWatcher) to shared ones.
138138
- When adding tooltips to UI elements, prefer the use of IHoverService service.
139139
- Do not duplicate code. Always look for existing utility functions, helpers, or patterns in the codebase before implementing new functionality. Reuse and extend existing code whenever possible.
140+
141+
## Learnings
142+
- Minimize the amount of assertions in tests. Prefer one snapshot-style `assert.deepStrictEqual` over multiple precise assertions, as they are much more difficult to understand and to update.

.github/instructions/learnings.instructions.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,21 @@ It is a meta-instruction file.
88

99
Structure of learnings:
1010
* Each instruction file has a "Learnings" section.
11-
* Each learning has a counter that indicates how often that learning was useful (initially 1).
1211
* Each learning has a 1-4 sentences description of the learning.
1312

1413
Example:
1514
```markdown
1615
## Learnings
17-
* Prefer `const` over `let` whenever possible (1)
18-
* Avoid `any` type (3)
16+
* Prefer `const` over `let` whenever possible
17+
* Avoid `any` type
1918
```
2019

2120
When the user tells you "learn!", you should:
2221
* extract a learning from the recent conversation
2322
* identify the problem that you created
2423
* identify why it was a problem
2524
* identify how you were told to fix it/how the user fixed it
25+
* reflect over it, maybe it can be generalized? Avoid too specific learnings.
2626
* create a learning (1-4 sentences) from that
2727
* Write this out to the user and reflect over these sentences
2828
* then, add the reflected learning to the "Learnings" section of the most appropriate instruction file
29-
30-
31-
Important: Whenever a learning was really useful, increase the counter!!
32-
When a learning was not useful and just caused more problems, decrease the counter.

.npmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
disturl="https://electronjs.org/headers"
22
target="39.2.7"
3-
ms_build_id="12953945"
3+
ms_build_id="13098910"
44
runtime="electron"
55
build_from_source="true"
66
legacy-peer-deps="true"

.vscode/notebooks/api.github-issues

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{
88
"kind": 2,
99
"language": "github-issues",
10-
"value": "$REPO=repo:microsoft/vscode\n$MILESTONE=milestone:\"October 2025\""
10+
"value": "$REPO=repo:microsoft/vscode\n$MILESTONE=milestone:\"January 2026\""
1111
},
1212
{
1313
"kind": 1,

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,6 @@
210210
],
211211
"azureMcp.serverMode": "all",
212212
"azureMcp.readOnly": true,
213-
"chat.tools.terminal.outputLocation": "none",
213+
"chat.tools.terminal.outputLocation": "chat",
214214
"debug.breakpointsView.presentation": "tree"
215215
}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright [yyyy] [name of copyright owner]
189+
Copyright 2024 machineGPT
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

build/.moduleignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ native-is-elevated/src/**
7575
native-is-elevated/deps/**
7676
!native-is-elevated/build/Release/*.node
7777

78-
native-watchdog/binding.gyp
79-
native-watchdog/build/**
80-
native-watchdog/src/**
81-
!native-watchdog/build/Release/*.node
78+
@vscode/native-watchdog/binding.gyp
79+
@vscode/native-watchdog/build/**
80+
@vscode/native-watchdog/src/**
81+
!@vscode/native-watchdog/build/Release/*.node
8282

8383
@vscode/vsce-sign/**
8484
!@vscode/vsce-sign/src/main.d.ts
Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,72 @@
11
parameters:
2-
- name: commit
2+
- name: name
33
type: string
4-
- name: quality
4+
- name: displayName
55
type: string
66
- name: poolName
77
type: string
88
- name: os
99
type: string
10+
- name: args
11+
type: string
12+
default: ""
1013

1114
jobs:
12-
- job: ${{ parameters.os }}
13-
displayName: ${{ parameters.os }} Sanity Tests
15+
- job: ${{ parameters.name }}
16+
displayName: ${{ parameters.displayName }}
1417
pool:
1518
name: ${{ parameters.poolName }}
1619
os: ${{ parameters.os }}
1720
timeoutInMinutes: 30
1821
variables:
1922
SANITY_TEST_LOGS: $(Build.SourcesDirectory)/.build/sanity-test-logs
23+
LOG_FILE: $(SANITY_TEST_LOGS)/results.xml
2024
templateContext:
2125
outputs:
2226
- output: pipelineArtifact
2327
targetPath: $(SANITY_TEST_LOGS)
24-
artifactName: sanity-test-logs-${{ lower(parameters.os) }}-$(System.JobAttempt)
25-
displayName: Publish Sanity Test Logs
28+
artifactName: sanity-test-logs-${{ parameters.name }}-$(System.JobAttempt)
29+
displayName: Sanity Tests Logs
2630
sbomEnabled: false
2731
isProduction: false
2832
condition: succeededOrFailed()
2933
steps:
30-
- checkout: self
34+
- template: ./checkout.yml@self
3135

3236
- task: NodeTool@0
3337
inputs:
3438
versionSource: fromFile
3539
versionFilePath: .nvmrc
3640
displayName: Install Node.js
3741

38-
- ${{ if eq(parameters.os, 'windows') }}:
39-
- script: |
40-
mkdir "$(SANITY_TEST_LOGS)"
41-
displayName: Create Logs Directory
42+
- bash: |
43+
npm config set registry "$(NPM_REGISTRY)"
44+
echo "##vso[task.setvariable variable=NPMRC_PATH]$(npm config get userconfig)"
45+
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
46+
displayName: Configure NPM Registry
4247
43-
- ${{ else }}:
44-
- script: |
45-
mkdir -p "$(SANITY_TEST_LOGS)"
46-
displayName: Create Logs Directory
48+
- task: npmAuthenticate@0
49+
inputs:
50+
workingFile: $(NPMRC_PATH)
51+
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
52+
displayName: Authenticate with NPM Registry
4753

48-
- script: npm install
54+
- script: npm ci
55+
workingDirectory: ./test/sanity
4956
displayName: Install Dependencies
50-
workingDirectory: $(Build.SourcesDirectory)/test/sanity
5157

52-
- script: npm run sanity-test -- --commit ${{ parameters.commit }} --quality ${{ parameters.quality }} --verbose --test-results $(SANITY_TEST_LOGS)/sanity-test.xml
58+
- script: npm run compile
59+
workingDirectory: ./test/sanity
60+
displayName: Compile Sanity Tests
61+
62+
- script: npm run start -- -c $(BUILD_COMMIT) -q $(BUILD_QUALITY) -t $(LOG_FILE) -v ${{ parameters.args }}
63+
workingDirectory: ./test/sanity
5364
displayName: Run Sanity Tests
5465

5566
- task: PublishTestResults@2
5667
inputs:
5768
testResultsFormat: JUnit
58-
testResultsFiles: $(SANITY_TEST_LOGS)/sanity-test.xml
59-
testRunTitle: ${{ parameters.os }} Sanity Tests
69+
testResultsFiles: $(LOG_FILE)
70+
testRunTitle: ${{ parameters.displayName }}
6071
condition: succeededOrFailed()
6172
displayName: Publish Test Results

build/azure-pipelines/product-compile.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,23 @@ jobs:
100100
GITHUB_TOKEN: "$(github-distro-mixin-password)"
101101
displayName: Compile & Hygiene
102102

103+
- script: |
104+
set -e
105+
106+
[ -d "out-build" ] || { echo "ERROR: out-build folder is missing" >&2; exit 1; }
107+
[ -n "$(find out-build -mindepth 1 2>/dev/null | head -1)" ] || { echo "ERROR: out-build folder is empty" >&2; exit 1; }
108+
echo "out-build exists and is not empty"
109+
110+
ls -d out-vscode-* >/dev/null 2>&1 || { echo "ERROR: No out-vscode-* folders found" >&2; exit 1; }
111+
for folder in out-vscode-*; do
112+
[ -d "$folder" ] || { echo "ERROR: $folder is missing" >&2; exit 1; }
113+
[ -n "$(find "$folder" -mindepth 1 2>/dev/null | head -1)" ] || { echo "ERROR: $folder is empty" >&2; exit 1; }
114+
echo "$folder exists and is not empty"
115+
done
116+
117+
echo "All required compilation folders checked."
118+
displayName: Validate compilation folders
119+
103120
- script: |
104121
set -e
105122
npm run compile

build/azure-pipelines/product-sanity-tests.yml

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,37 @@ pr: none
33
trigger: none
44

55
parameters:
6-
- name: commit
7-
displayName: Commit
6+
- name: BUILD_COMMIT
7+
displayName: Published Build Commit
88
type: string
9-
- name: quality
10-
displayName: Quality
9+
10+
- name: BUILD_QUALITY
11+
displayName: Published Build Quality
1112
type: string
1213
default: insider
1314
values:
1415
- exploration
1516
- insider
1617
- stable
1718

19+
- name: NPM_REGISTRY
20+
displayName: Custom NPM Registry URL
21+
type: string
22+
default: "https://pkgs.dev.azure.com/monacotools/Monaco/_packaging/vscode/npm/registry/"
23+
1824
variables:
1925
- name: skipComponentGovernanceDetection
2026
value: true
2127
- name: Codeql.SkipTaskAutoInjection
2228
value: true
29+
- name: BUILD_COMMIT
30+
value: ${{ parameters.BUILD_COMMIT }}
31+
- name: BUILD_QUALITY
32+
value: ${{ parameters.BUILD_QUALITY }}
33+
- name: NPM_REGISTRY
34+
value: ${{ parameters.NPM_REGISTRY }}
2335

24-
name: "$(Date:yyyyMMdd).$(Rev:r) (${{ parameters.quality }})"
36+
name: "$(Date:yyyyMMdd).$(Rev:r) (${{ parameters.BUILD_QUALITY }} ${{ parameters.BUILD_COMMIT }})"
2537

2638
resources:
2739
repositories:
@@ -47,25 +59,35 @@ extends:
4759
sourceAnalysisPool: 1es-windows-2022-x64
4860
createAdoIssuesForJustificationsForDisablement: false
4961
stages:
50-
- stage: SanityTests
62+
- stage: sanity_tests
63+
displayName: Run Sanity Tests
5164
jobs:
5265
- template: build/azure-pipelines/common/sanity-tests.yml@self
5366
parameters:
54-
commit: ${{ parameters.commit }}
55-
quality: ${{ parameters.quality }}
67+
name: Windows_x64
68+
displayName: Windows x64 Sanity Tests
69+
poolName: 1es-windows-2022-x64
70+
os: windows
71+
72+
- template: build/azure-pipelines/common/sanity-tests.yml@self
73+
parameters:
74+
name: Windows_arm64
75+
displayName: Windows arm64 Sanity Tests (no runtime)
5676
poolName: 1es-windows-2022-x64
5777
os: windows
78+
args: --no-runtime-check --grep "win32-arm64"
5879

5980
- template: build/azure-pipelines/common/sanity-tests.yml@self
6081
parameters:
61-
commit: ${{ parameters.commit }}
62-
quality: ${{ parameters.quality }}
63-
poolName: 1es-ubuntu-22.04-x64
64-
os: linux
82+
name: macOS_x64
83+
displayName: MacOS x64 Sanity Tests (no runtime)
84+
poolName: AcesShared
85+
os: macOS
86+
args: --no-runtime-check --grep "darwin-x64"
6587

6688
- template: build/azure-pipelines/common/sanity-tests.yml@self
6789
parameters:
68-
commit: ${{ parameters.commit }}
69-
quality: ${{ parameters.quality }}
90+
name: macOS_arm64
91+
displayName: MacOS arm64 Sanity Tests
7092
poolName: AcesShared
7193
os: macOS

0 commit comments

Comments
 (0)