fix: 💚 Fix Builds (#6933)

* fix: 💚 Remove clean on build

* fix: 💚 The dist directory was not getting created

* fix: 💚 Install Vite

* fix: 💚 move gui build after core

* fix:  Fix the PromptFile test to be more robust

* fix: 💚 Use the proper github secret

* fix: 💚 Pass github secret correctly to composite workflow

* fix: 💚 More token fixes

* fix: 💚 More secrets fixes

* fix: 💚 Add rimfrafSync cleanup to vscode dist like JetBrains

* build: ⚗️ See what happens if we remove the GUI build step from prepackage.js

* Revert prepackage changes

* Remove pre-package dependencies

* Put back the chdir and build from root gui

* build: 💚 Final cleanup from refactoring

* Remove deprecated isInGitHubActions check

* feat: 🏗️ VsCode Task Improvements

* fix: 🎨 Prettier

* fix: 🎨 Prettier
This commit is contained in:
Shawn Smith
2025-08-04 10:53:35 -07:00
committed by GitHub
parent e80170d5d5
commit 42ea4b2d7e
10 changed files with 136 additions and 60 deletions

View File

@@ -18,6 +18,9 @@ inputs:
description: 'Commit SHA for version modification (optional, uses first 7 chars)'
required: false
default: ''
github-token:
description: 'GitHub token for downloading ripgrep'
required: true
outputs:
target:
description: 'The target string used for the build'
@@ -83,7 +86,7 @@ runs:
npm ci
env:
# https://github.com/microsoft/vscode-ripgrep/issues/9#issuecomment-643965333
GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ inputs.github-token }}
- name: Install gui dependencies
shell: bash
@@ -98,6 +101,12 @@ runs:
npm ci
npm i vectordb
- name: Build GUI
shell: bash
run: |
cd gui
npm run build
- name: Prepackage the extension
shell: bash
run: |

View File

@@ -28,6 +28,13 @@ runs:
cd core
npm ci
- name: Install gui node_modules and build
shell: bash
run: |
cd gui
npm ci
npm run build
- name: Setup Java
uses: actions/setup-java@v4.5.0
with:

View File

@@ -80,8 +80,7 @@ jobs:
arch: ${{ matrix.arch }}
npm_config_arch: ${{ matrix.npm_config_arch }}
pre-release: false
env:
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload .vsix artifact
uses: actions/upload-artifact@v4

View File

@@ -36,8 +36,7 @@ jobs:
npm_config_arch: ${{ matrix.arch }}
pre-release: false
commit-sha: ${{ github.sha }}
env:
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload build artifact
uses: actions/upload-artifact@v4

View File

@@ -269,8 +269,7 @@ jobs:
npm_config_arch: x64
pre-release: false
commit-sha: ${{ github.sha }}
env:
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload build artifact
uses: actions/upload-artifact@v4

View File

@@ -80,8 +80,7 @@ jobs:
arch: ${{ matrix.arch }}
npm_config_arch: ${{ matrix.npm_config_arch }}
pre-release: true
env:
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload .vsix artifact
uses: actions/upload-artifact@v4

132
.vscode/tasks.json vendored
View File

@@ -12,24 +12,18 @@
"isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "new"
"group": "dev-watchers",
"panel": "dedicated",
"reveal": "always"
}
},
// Compile and bundle the extension
{
"label": "vscode-extension:build",
"dependsOn": [
// TSC type checking
"tsc:watch",
// To build the React app that is used in the extension
"vscode-extension:continue-ui:build",
// // To bundle the code the same way we do for publishing
"vscode-extension:esbuild",
// To ensure extension.js is regenerated even if
// vscode-extension:esbuild was already running in background
"vscode-extension:esbuild-notify",
// Start the React app that is used in the extension
"gui:dev"
],
"group": {
@@ -42,7 +36,15 @@
"dependsOn": ["vscode-extension:esbuild"],
"type": "npm",
"script": "esbuild-notify",
"path": "extensions/vscode"
"path": "extensions/vscode",
"presentation": {
"group": "build-tasks",
"panel": "shared",
"reveal": "silent",
"revealProblems": "onProblem",
"close": true,
"clear": true
}
},
{
"label": "vscode-extension:esbuild",
@@ -51,6 +53,11 @@
"script": "esbuild-watch",
"path": "extensions/vscode",
"isBackground": true,
"presentation": {
"group": "dev-watchers",
"panel": "dedicated",
"reveal": "silent"
},
"problemMatcher": [
{
"pattern": [
@@ -77,6 +84,11 @@
"type": "npm",
"script": "package",
"path": "extensions/vscode",
"presentation": {
"group": "build-tasks",
"panel": "shared",
"reveal": "always"
},
"problemMatcher": [
{
"pattern": [
@@ -99,7 +111,11 @@
"args": ["${workspaceFolder}/extensions/vscode/scripts/prepackage.js"],
"problemMatcher": ["$tsc"],
"presentation": {
"group": "build-tasks",
"panel": "shared",
"reveal": "silent",
"revealProblems": "onProblem",
"close": true,
"clear": true
},
"options": {
@@ -109,16 +125,18 @@
"cwd": "${workspaceFolder}/extensions/vscode"
}
},
// Install or update all dependencies for all projects in the monrepo
{
"label": "install-all-dependencies",
"type": "shell",
"windows": { "command": "./scripts/install-dependencies.ps1" },
"command": "./scripts/install-dependencies.sh",
"problemMatcher": [] // Empty so users are not prompted to select progress reporting
"problemMatcher": [],
"presentation": {
"group": "maintenance",
"panel": "shared",
"reveal": "always"
}
},
//
// Start the React App for debugging with Vite
{
"label": "gui:dev",
"type": "shell",
@@ -128,6 +146,16 @@
},
"args": ["run", "dev"],
"isBackground": true,
"runOptions": {
"instanceLimit": 1
},
"presentation": {
"group": "dev-watchers",
"panel": "dedicated",
"reveal": "always",
"focus": false,
"showReuseMessage": false
},
"problemMatcher": [
{
"pattern": [
@@ -146,14 +174,17 @@
}
]
},
//
// esbuild for the core binary
{
"label": "binary:esbuild",
"type": "shell",
"command": "npm",
"args": ["run", "esbuild"],
"problemMatcher": [],
"presentation": {
"group": "build-tasks",
"panel": "shared",
"reveal": "always"
},
"options": {
"cwd": "binary"
}
@@ -164,6 +195,11 @@
"command": "npm",
"args": ["run", "start", "--", "--no-open"],
"problemMatcher": [],
"presentation": {
"group": "docs",
"panel": "dedicated",
"reveal": "always"
},
"options": {
"cwd": "docs"
}
@@ -173,7 +209,12 @@
"type": "shell",
"command": "node",
"args": ["${workspaceFolder}/scripts/uninstall.js"],
"problemMatcher": []
"problemMatcher": [],
"presentation": {
"group": "maintenance",
"panel": "shared",
"reveal": "always"
}
},
{
"label": "refresh-dependencies:core",
@@ -185,6 +226,9 @@
"cwd": "${workspaceFolder}/core"
},
"presentation": {
"group": "maintenance",
"panel": "shared",
"reveal": "silent",
"close": true
}
},
@@ -198,6 +242,9 @@
"cwd": "${workspaceFolder}/extensions/vscode"
},
"presentation": {
"group": "maintenance",
"panel": "shared",
"reveal": "silent",
"close": true
}
},
@@ -211,6 +258,9 @@
"cwd": "${workspaceFolder}/gui"
},
"presentation": {
"group": "maintenance",
"panel": "shared",
"reveal": "silent",
"close": true
}
},
@@ -222,35 +272,45 @@
"refresh-dependencies:vscode"
],
"type": "shell",
"problemMatcher": []
"problemMatcher": [],
"presentation": {
"group": "maintenance",
"panel": "shared",
"reveal": "always"
}
},
{
"label": "Build Continue packages",
"label": "continue-packages:build",
"type": "shell",
"command": "node ./scripts/build-packages.js",
"isBackground": true,
"problemMatcher": {
"pattern": {
"regexp": "__DUMMY_PATTERN_THAT_NEVER_MATCHES__",
"file": 1
},
"background": {
"activeOnStart": true,
"beginsPattern": ".",
"endsPattern": "."
}
},
"problemMatcher": [],
"presentation": {
"reveal": "silent",
"panel": "shared"
"group": "build-tasks",
"panel": "shared",
"reveal": "always",
"close": true,
"revealProblems": "onProblem"
}
},
{
"label": "vscode-extension:build-with-packages",
// "dependsOn": ["vscode-extension:build"],
"dependsOn": ["Build Continue packages", "vscode-extension:build"],
"dependsOn": ["continue-packages:build", "vscode-extension:build"],
"type": "shell",
"problemMatcher": []
"command": "echo",
"args": ["Build with packages completed"],
"problemMatcher": [],
"dependsOrder": "sequence",
"runOptions": {
"instanceLimit": 1,
"reevaluateOnRerun": true
},
"presentation": {
"group": "build-tasks",
"panel": "shared",
"reveal": "silent",
"close": true,
"focus": false
}
}
]
}

View File

@@ -42,11 +42,25 @@ describe("Prompt file", () => {
"terminal",
"tree",
];
for (const provider of providers) {
await editor.typeText("@" + provider.slice(0, 2));
await editor.typeText(Key.ENTER);
// Type the @ symbol to trigger completion
await editor.typeText("@");
// Wait a moment for the completion to appear
await new Promise((resolve) => setTimeout(resolve, 500));
// Type the first few characters
await editor.typeText(provider.slice(0, 2));
// Wait for completion popup to update
await new Promise((resolve) => setTimeout(resolve, 300));
// Use Tab to accept completion instead of Enter
await editor.typeText(Key.TAB);
const text = await editor.getText();
expect(text).equals("@" + provider);
expect(text).to.include("@" + provider);
await editor.clearText();
}

View File

@@ -55,8 +55,6 @@ console.log("[info] Using target: ", target);
const exe = os === "win32" ? ".exe" : "";
const isInGitHubAction = !!process.env.GITHUB_ACTIONS;
const isArmTarget =
target === "darwin-arm64" ||
target === "linux-arm64" ||
@@ -86,15 +84,6 @@ void (async () => {
process.chdir(path.join(continueDir, "gui"));
if (isInGitHubAction) {
const guiBuildStart = Date.now();
console.log(`[timer] Starting GUI build at ${new Date().toISOString()}`);
execCmdSync("npm run build");
console.log(
`[timer] GUI build completed in ${Date.now() - guiBuildStart}ms`,
);
}
// Copy over the dist folder to the JetBrains extension //
const intellijExtensionWebviewPath = path.join(
"..",
@@ -140,6 +129,7 @@ void (async () => {
// Then copy over the dist folder to the VSCode extension //
const vscodeGuiPath = path.join("../extensions/vscode/gui");
rimrafSync(vscodeGuiPath);
fs.mkdirSync(vscodeGuiPath, { recursive: true });
const vscodeCopyStart = Date.now();
console.log(`[timer] Starting VSCode copy at ${new Date().toISOString()}`);

View File

@@ -86,7 +86,7 @@ async function main() {
await buildPackagesInParallel(["fetch", "config-yaml", "llm-info"]);
// Phase 3: Build packages that depend on other local packages
await buildPackagesInParallel(["openai-adapters", "continue-sdk"], true);
await buildPackagesInParallel(["openai-adapters", "continue-sdk"]);
console.log("🎉 All packages built successfully!");
} catch (error) {