From 68ef7cdffc1d136a0b19476650d4b8408702fb04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Moreno?= Date: Thu, 19 Mar 2026 11:23:38 +0100 Subject: [PATCH] add copilot compilation in main build tasks Co-authored-by: Copilot --- .../inline-copilot.instructions.md | 10 +++++++ .vscode/tasks.json | 30 +++++++++++++++++-- build/hygiene.ts | 3 ++ build/npm/dirs.ts | 1 + extensions/copilot | 2 +- package.json | 5 +++- 6 files changed, 47 insertions(+), 4 deletions(-) create mode 100644 .github/instructions/inline-copilot.instructions.md diff --git a/.github/instructions/inline-copilot.instructions.md b/.github/instructions/inline-copilot.instructions.md new file mode 100644 index 00000000000..9a087bdcd6c --- /dev/null +++ b/.github/instructions/inline-copilot.instructions.md @@ -0,0 +1,10 @@ +--- +description: Useful context to use when talking about inlining Copilot Chat with VS Code. +applyTo: '**' +--- + +We are working on inlining Copilot Chat into VS Code. This means we want to ship Copilot Chat as a built-in experience in VS Code, without requiring users to install a separate extension. This will allow us to reach more users and provide a more seamless experience. + +We need to figure out the build pipelines, the local dev setup and the UX around running VS Code with Copilot Chat as builtin. + +We've done the first step: simply add the vscode-copilot-chat repository as a submodule to extensions/copilot. diff --git a/.vscode/tasks.json b/.vscode/tasks.json index acf4a6fc5d3..c880e595e15 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -88,12 +88,25 @@ } } }, + { + "type": "npm", + "script": "watch-copilotd", + "label": "Copilot - Build", + "isBackground": true, + "presentation": { + "reveal": "never", + "group": "buildWatchers", + "close": false + }, + "problemMatcher": "$esbuild-watch" + }, { "label": "VS Code - Build", "dependsOn": [ "Core - Transpile", "Core - Typecheck", - "Ext - Build" + "Ext - Build", + "Copilot - Build" ], "group": { "kind": "build", @@ -137,12 +150,25 @@ }, "problemMatcher": "$tsc" }, + { + "type": "npm", + "script": "kill-watch-copilotd", + "label": "Kill Copilot - Build", + "group": "build", + "presentation": { + "reveal": "never", + "group": "buildKillers", + "close": true + }, + "problemMatcher": "$esbuild" + }, { "label": "Kill VS Code - Build", "dependsOn": [ "Kill Core - Transpile", "Kill Core - Typecheck", - "Kill Ext - Build" + "Kill Ext - Build", + "Kill Copilot - Build" ], "group": "build", "problemMatcher": [] diff --git a/build/hygiene.ts b/build/hygiene.ts index 936b0cbe630..c633c8ff72b 100644 --- a/build/hygiene.ts +++ b/build/hygiene.ts @@ -238,6 +238,9 @@ function createGitIndexVinyls(paths: string[]): Promise { return c(null); } else if (err) { return e(err); + } else if (stat.isDirectory()) { + // ignore submodules in pre-commit hygiene (git diff --cached reports them as paths) + return c(null); } cp.exec( diff --git a/build/npm/dirs.ts b/build/npm/dirs.ts index b56884af25c..450a109d835 100644 --- a/build/npm/dirs.ts +++ b/build/npm/dirs.ts @@ -14,6 +14,7 @@ export const dirs = [ 'build/vite', 'extensions', 'extensions/configuration-editing', + 'extensions/copilot', 'extensions/css-language-features', 'extensions/css-language-features/server', 'extensions/debug-auto-launch', diff --git a/extensions/copilot b/extensions/copilot index 3f242510d24..d6ea4bb008e 160000 --- a/extensions/copilot +++ b/extensions/copilot @@ -1 +1 @@ -Subproject commit 3f242510d241acfe0927ba118abed80478f50577 +Subproject commit d6ea4bb008e343170aa5ccaedcb757fc1291b2a2 diff --git a/package.json b/package.json index e30e79e0f4f..4811bd9de09 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "postinstall": "node build/npm/postinstall.ts", "compile": "npm run gulp compile", "compile-check-ts-native": "tsgo --project ./src/tsconfig.json --noEmit --skipLibCheck", - "watch": "npm-run-all2 -lp watch-client-transpile watch-client watch-extensions", + "watch": "npm-run-all2 -lp watch-client-transpile watch-client watch-extensions watch-copilot", "watchd": "deemon npm run watch", "watch-webd": "deemon npm run watch-web", "kill-watchd": "deemon --kill npm run watch", @@ -38,6 +38,9 @@ "watch-extensions": "npm run gulp watch-extensions watch-extension-media", "watch-extensionsd": "deemon npm run watch-extensions", "kill-watch-extensionsd": "deemon --kill npm run watch-extensions", + "watch-copilot": "npm --prefix extensions/copilot run watch", + "watch-copilotd": "deemon npm run watch-copilot", + "kill-watch-copilotd": "deemon --kill npm run watch-copilot", "precommit": "node --experimental-strip-types build/hygiene.ts", "gulp": "node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js", "electron": "node build/lib/electron.ts",