Skip to content

Commit ab5683d

Browse files
authored
Merge branch 'main' into justin/jirachi
2 parents 0a504dc + 76800fc commit ab5683d

File tree

393 files changed

+26827
-7212
lines changed

Some content is hidden

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

393 files changed

+26827
-7212
lines changed

.esbuild.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ const baseNodeBuildOptions = {
3939
'zeromq',
4040
'electron', // this is for simulation workbench,
4141
'sqlite3',
42+
'node-pty', // Required by @github/copilot
43+
'@github/copilot',
4244
...(isDev ? [] : ['dotenv', 'source-map-support'])
4345
],
4446
platform: 'node',
@@ -170,6 +172,7 @@ const nodeExtHostBuildOptions = {
170172
{ in: './src/platform/diff/node/diffWorkerMain.ts', out: 'diffWorker' },
171173
{ in: './src/platform/tfidf/node/tfidfWorker.ts', out: 'tfidfWorker' },
172174
{ in: './src/extension/onboardDebug/node/copilotDebugWorker/index.ts', out: 'copilotDebugCommand' },
175+
{ in: './src/extension/chatSessions/vscode-node/copilotCLIShim.ts', out: 'copilotCLIShim' },
173176
{ in: './src/test-extension.ts', out: 'test-extension' },
174177
{ in: './src/sanity-test-extension.ts', out: 'sanity-test-extension' },
175178
],

.eslint-ignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ test/scenarios/**
1212
.eslintplugin/**
1313
chat-lib/**
1414
test/aml/out/**
15+
.vscode-test/**
1516

1617
# ignore vs
1718
src/util/vs/**

.github/copilot-instructions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,8 @@ function f(x: number, y: string): void { }
257257
- Do not introduce new `types` or `values` to the global namespace
258258
- Use proper types. Do not use `any` unless absolutely necessary.
259259
- Use `readonly` whenever possible.
260+
- Avoid casts in TypeScript unless absolutely necessary. If you get type errors after your changes, look up the types of the variables involved and set up a proper system of types and interfaces instead of adding type casts.
261+
- Do not use `any` or `unknown` as the type for variables, parameters, or return values unless absolutely necessary. If they need type annotations, they should have proper types or interfaces defined.
260262

261263
## Key APIs and Integrations
262264

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Copilot Setup Steps
2+
3+
# Automatically run the setup steps when they are changed to allow for easy validation, and
4+
# allow manual testing through the repository's "Actions" tab
5+
on:
6+
workflow_dispatch:
7+
push:
8+
paths:
9+
- .github/workflows/copilot-setup-steps.yml
10+
pull_request:
11+
paths:
12+
- .github/workflows/copilot-setup-steps.yml
13+
14+
jobs:
15+
copilot-setup-steps:
16+
name: Setup Development Environment
17+
runs-on: vscode-large-runners
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
with:
22+
lfs: true
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: '22.14.x'
28+
29+
- name: Setup Python
30+
uses: actions/setup-python@v5
31+
with:
32+
python-version: '3.12'
33+
architecture: 'x64'
34+
35+
- name: Setup .NET
36+
uses: actions/setup-dotnet@v4
37+
with:
38+
dotnet-version: '10.0'
39+
40+
- name: Install setuptools
41+
run: pip install setuptools
42+
43+
- name: Restore build cache
44+
uses: actions/cache/restore@v4
45+
id: build-cache
46+
with:
47+
key: build_cache-${{ hashFiles('build/.cachesalt', 'package-lock.json') }}
48+
path: .build/build_cache
49+
50+
- name: Extract build cache
51+
if: steps.build-cache.outputs.cache-hit == 'true'
52+
run: tar -xzf .build/build_cache/cache.tgz
53+
54+
- name: Install dependencies
55+
if: steps.build-cache.outputs.cache-hit != 'true'
56+
run: npm ci
57+
58+
- name: Create build cache archive
59+
if: steps.build-cache.outputs.cache-hit != 'true'
60+
run: |
61+
set -e
62+
mkdir -p .build
63+
node build/listBuildCacheFiles.js .build/build_cache_list.txt
64+
mkdir -p .build/build_cache
65+
tar -czf .build/build_cache/cache.tgz --files-from .build/build_cache_list.txt
66+
67+
- name: Verify installation
68+
run: |
69+
node --version
70+
npm --version
71+
python --version
72+
dotnet --version

.vscode/launch.json

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,49 @@
297297
"presentation": {
298298
"group": "2_launch"
299299
}
300-
}
300+
},
301+
{
302+
"name": "Attach to Extension Host - Code OSS",
303+
"type": "node",
304+
"request": "attach",
305+
"restart": true,
306+
"timeout": 0,
307+
"port": 5870,
308+
"sourceMaps": true,
309+
"outFiles": [
310+
"${workspaceFolder}/../vscode/out/**/*.js",
311+
"${workspaceFolder}/../vscode/extensions/*/out/**/*.js",
312+
"${workspaceFolder}/dist/**/*.js",
313+
"!**/node_modules/**"
314+
],
315+
"presentation": {
316+
"group": "2_launch"
317+
}
318+
},
319+
{
320+
"name": "Run Completions-Core Extension Tests",
321+
"type": "extensionHost",
322+
"request": "launch",
323+
"args": [
324+
"--extensionDevelopmentPath=${workspaceFolder}",
325+
"--extensionTestsPath=${workspaceFolder}/src/extension/completions-core/extension/test/run",
326+
"--disable-extensions"
327+
],
328+
"env": {
329+
"TSX_TSCONFIG_PATH": "${workspaceFolder}/tsconfig.json",
330+
"VITEST": "true"
331+
},
332+
"internalConsoleOptions": "openOnSessionStart",
333+
"outFiles": [
334+
"${workspaceFolder}/**/*.ts",
335+
"${workspaceFolder}/dist/**/*.js",
336+
"!**/node_modules/**"
337+
],
338+
"autoAttachChildProcesses": true,
339+
"presentation": {
340+
"group": "1_launch"
341+
}
342+
},
301343
],
302344
"compounds": [
303345
{
@@ -312,4 +354,4 @@
312354
}
313355
}
314356
]
315-
}
357+
}

.vscodeignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,14 @@ assets/walkthroughs/**
1515
!dist/diffWorker.js
1616
!dist/webview.js
1717
!dist/copilotDebugCommand.js
18+
!dist/copilotCLIShim.js
1819
!dist/cli.js
1920
!node_modules/@vscode/copilot-typescript-server-plugin/package.json
2021
!node_modules/@vscode/copilot-typescript-server-plugin/dist/*.js
22+
!node_modules/@github/copilot/**/package.json
23+
node_modules/@github/copilot/index.js
24+
!node_modules/@github/copilot/sdk/*.js
25+
!node_modules/@github/copilot/node_modules/**/*.js
2126
!CHANGELOG.md
2227
!README.md
2328
!package.json

0 commit comments

Comments
 (0)