Reapply "feat: enhance oneper utility and refactor build system for commit SHA versioning" (#6811)

This reverts commit 880786b66f.
This commit is contained in:
Patrick Erichsen 2025-07-28 14:15:49 -07:00
parent d5a4c66605
commit 81dd2c3112
31 changed files with 707 additions and 939 deletions

View file

@ -0,0 +1,204 @@
name: Build VS Code Extension
on:
workflow_call:
inputs:
platforms:
description: "JSON array of platform configurations (defaults to all platforms)"
required: false
type: string
default: |
[
{
"os": "windows-latest",
"platform": "win32",
"arch": "x64",
"npm_config_arch": "x64"
},
{
"os": "windows-latest",
"platform": "win32",
"arch": "arm64",
"npm_config_arch": "arm"
},
{
"os": "ubuntu-latest",
"platform": "linux",
"arch": "x64",
"npm_config_arch": "x64"
},
{
"os": "ubuntu-latest",
"platform": "linux",
"arch": "arm64",
"npm_config_arch": "arm64"
},
{
"os": "ubuntu-latest",
"platform": "linux",
"arch": "armhf",
"npm_config_arch": "arm"
},
{
"os": "ubuntu-latest",
"platform": "alpine",
"arch": "x64",
"npm_config_arch": "x64"
},
{
"os": "macos-13",
"platform": "darwin",
"arch": "x64",
"npm_config_arch": "x64"
},
{
"os": "macos-13",
"platform": "darwin",
"arch": "arm64",
"npm_config_arch": "arm64"
}
]
pre-release:
description: "Whether to build as pre-release"
required: false
type: boolean
default: false
commit-sha:
description: "Commit SHA for version modification (optional, uses first 7 chars)"
required: false
type: string
jobs:
build:
strategy:
matrix:
include: ${{ fromJson(inputs.platforms) }}
runs-on: ${{ matrix.os }}
steps:
# 1. Check-out repository
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # This ensures all tags are fetched
# 2. Install npm dependencies
- name: Use Node.js from .nvmrc
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: Cache extension node_modules
uses: actions/cache@v4
with:
path: extensions/vscode/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('extensions/vscode/package-lock.json') }}
- name: Cache core node_modules
uses: actions/cache@v4
with:
path: core/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('core/package-lock.json') }}
- name: Cache gui node_modules
uses: actions/cache@v4
with:
path: gui/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('gui/package-lock.json') }}
# Build all packages using the authoritative build script
- name: Build packages (Windows)
run: ./scripts/build-packages.ps1
if: matrix.os == 'windows-latest'
- name: Build packages (Linux/macOS)
run: ./scripts/build-packages.sh
if: matrix.os != 'windows-latest'
- name: Install extension Dependencies
run: |
cd extensions/vscode
npm ci
env:
# https://github.com/microsoft/vscode-ripgrep/issues/9#issuecomment-643965333
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
- name: Install gui Dependencies
run: |
cd gui
npm ci
# npm ci doesn't end up capturing the @lancedb/... dep because it's not in the package-lock.json
- name: Install Core Dependencies
run: |
cd core
npm ci
npm i vectordb
# 2.5. Pre package
- name: Set var for environment info
shell: pwsh
run: echo "target=${{ matrix.platform }}-${{ matrix.arch }}" >> $env:GITHUB_ENV
- name: Prepackage the extension
run: |
cd extensions/vscode
npm run prepackage -- --target ${{ env.target }}
# 3. Re-install esbuild (for cases that we force installed for another arch in prepackage.js)
- name: Re-install esbuild
run: |
cd extensions/vscode
npm install -f esbuild
# 3.5. Modify version with commit SHA
- name: Modify package.json version with commit SHA
if: inputs.commit-sha != ''
run: |
cd extensions/vscode
# Get current version from package.json
CURRENT_VERSION=$(node -p "require('./package.json').version")
# Create new version with short commit SHA (first 7 chars)
COMMIT_SHORT="${{ inputs.commit-sha }}"
NEW_VERSION="${CURRENT_VERSION}-${COMMIT_SHORT:0:7}"
echo "📝 Updating package.json version from $CURRENT_VERSION to $NEW_VERSION"
# Update version in package.json
sed -i.bak "s/\"version\": \"$CURRENT_VERSION\"/\"version\": \"$NEW_VERSION\"/" package.json
# Remove backup file
rm -f package.json.bak
# Verify the change
echo "✅ New version: $(node -p "require('./package.json').version")"
# 4. Package the extension
- name: Package extension (build artifacts)
run: |
cd extensions/vscode
npm run package
- name: Package extension (.vsix files)
run: |
cd extensions/vscode
if [ "${{ inputs.pre-release }}" = "true" ]; then
npx vsce package --pre-release --no-dependencies --target ${{ env.target }}
else
npx vsce package --no-dependencies --target ${{ env.target }}
fi
shell: bash
# 5. Upload build artifacts (for e2e tests)
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: vscode-extension-build-${{ runner.os }}
path: extensions/vscode/build
# 6. Upload .vsix artifacts (for releases and downloading)
- name: Upload .vsix artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.target }}-vsix
path: "extensions/vscode/*.vsix"

30
.github/workflows/main-build.yaml vendored Normal file
View file

@ -0,0 +1,30 @@
name: Build Extension on Main
on:
push:
branches:
- main
jobs:
build:
uses: ./.github/workflows/build-vscode-extension.yml
with:
# Build only for macOS latest and Ubuntu latest
platforms: |
[
{
"os": "ubuntu-latest",
"platform": "linux",
"arch": "x64",
"npm_config_arch": "x64"
},
{
"os": "macos-latest",
"platform": "darwin",
"arch": "arm64",
"npm_config_arch": "arm64"
}
]
pre-release: false
commit-sha: ${{ github.sha }}
secrets: inherit

View file

@ -29,44 +29,15 @@ jobs:
build:
needs: check_release_name
if: needs.check_release_name.outputs.should_run == 'true' || github.event_name == 'workflow_dispatch'
strategy:
matrix:
include:
- os: windows-latest
platform: win32
arch: x64
npm_config_arch: x64
- os: windows-latest
platform: win32
arch: arm64
npm_config_arch: arm
- os: ubuntu-latest
platform: linux
arch: x64
npm_config_arch: x64
- os: ubuntu-latest
platform: linux
arch: arm64
npm_config_arch: arm64
- os: ubuntu-latest
platform: linux
arch: armhf
npm_config_arch: arm
- os: ubuntu-latest
platform: alpine
arch: x64
npm_config_arch: x64
- os: macos-13
platform: darwin
arch: x64
npm_config_arch: x64
- os: macos-13
platform: darwin
arch: arm64
npm_config_arch: arm64
runs-on: ${{ matrix.os }}
uses: ./.github/workflows/build-vscode-extension.yml
with:
# Uses default platforms (all supported platforms)
pre-release: false
secrets: inherit
check-version:
runs-on: ubuntu-latest
steps:
# 1. Check-out repository
- name: Checkout
uses: actions/checkout@v4
with:
@ -80,107 +51,6 @@ jobs:
cd extensions/vscode
node scripts/versionCheck.js
# 2. Install npm dependencies
- name: Use Node.js from .nvmrc
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: Cache extension node_modules
uses: actions/cache@v3
with:
path: extensions/vscode/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('extensions/vscode/package-lock.json') }}
- name: Cache core node_modules
uses: actions/cache@v3
with:
path: core/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('core/package-lock.json') }}
- name: Cache gui node_modules
uses: actions/cache@v3
with:
path: gui/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('gui/package-lock.json') }}
- name: Build packages (Windows)
run: ./scripts/build-packages.ps1
if: matrix.os == 'windows-latest'
- name: Build packages (Unix)
run: ./scripts/build-packages.sh
if: matrix.os != 'windows-latest'
- name: Install extension Dependencies
run: |
cd extensions/vscode
npm ci
env:
# https://github.com/microsoft/vscode-ripgrep/issues/9#issuecomment-643965333
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
- name: Install gui Dependencies
run: |
cd gui
npm ci
# npm ci doesn't end up capturing the @lancedb/... dep because it's not in the package-lock.json
- name: Install Core Dependencies
run: |
cd core
npm ci
npm i vectordb
# - name: Run core tests
# run: |
# cd core
# npm run test
# env:
# OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
# 2.5. Pre package
- name: Set var for environment info
shell: pwsh
run: echo "target=${{ matrix.platform }}-${{ matrix.arch }}" >> $env:GITHUB_ENV
- name: Prepackage the extension
run: |
cd extensions/vscode
npm run prepackage -- --target ${{ env.target }}
# 3. Re-install esbuild (for cases that we force installed for another arch in prepackage.js)
- name: Re-install esbuild
run: |
cd extensions/vscode
npm install -f esbuild
# 4. Run tests for the extension
# - name: Install Xvfb for Linux and run tests
# run: |
# sudo apt-get install -y xvfb # Install Xvfb
# Xvfb :99 & # Start Xvfb
# export DISPLAY=:99 # Export the display number to the environment
# cd extensions/vscode
# npm run test
# if: matrix.os == 'ubuntu-latest'
# - name: Run extension tests
# run: |
# cd extensions/vscode
# npm run test
# if: matrix.os != 'ubuntu-latest'
# 5. Package the extension
- name: Package the extension
run: cd extensions/vscode && npx vsce package --no-dependencies --target ${{ env.target }}
# 6. Upload the .vsix as an artifact
- uses: actions/upload-artifact@v4
with:
name: ${{ env.target }}-vsix
path: "extensions/vscode/*.vsix"
release:
permissions:
contents: write

View file

@ -48,12 +48,9 @@ jobs:
- name: Check code formatting with Prettier
run: npx prettier --check "**/*.{js,jsx,ts,tsx,json,css,md}" --ignore-path .gitignore --ignore-path .prettierignore
install-config-yaml:
build-packages:
needs: install-root
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@ -61,55 +58,11 @@ jobs:
with:
node-version-file: ".nvmrc"
- uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }}
- uses: actions/cache@v4
id: config-yaml-cache
with:
path: packages/config-yaml/node_modules
key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }}
- name: Install config-yaml dependencies
if: steps.config-yaml-cache.outputs.cache-hit != 'true'
run: |
cd packages/config-yaml
npm ci
install-openai-adapters:
needs: install-root
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }}
- uses: actions/cache@v4
id: openai-adapters-cache
with:
path: packages/openai-adapters/node_modules
key: ${{ runner.os }}-openai-adapters-node-modules-${{ hashFiles('packages/openai-adapters/package-lock.json') }}
- name: Install openai-adapters dependencies
if: steps.openai-adapters-cache.outputs.cache-hit != 'true'
run: |
cd packages/openai-adapters
npm ci
- name: Build packages (Unix)
run: ./scripts/build-packages.sh
config-yaml-checks:
needs: install-config-yaml
needs: build-packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@ -123,19 +76,13 @@ jobs:
path: node_modules
key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }}
- uses: actions/cache@v4
id: config-yaml-cache
with:
path: packages/config-yaml/node_modules
key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }}
- name: Build and check config-yaml
- name: Build packages and check config-yaml
run: |
./scripts/build-packages.sh
cd packages/config-yaml
npx tsc --noEmit
# Tests are currently failing, commenting out for now
# npm test
npm run build
# npm test
install-core:
needs: install-root
@ -169,7 +116,7 @@ jobs:
npm ci
core-checks:
needs: [install-core, install-config-yaml, install-openai-adapters]
needs: install-core
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@ -179,38 +126,21 @@ jobs:
node-version-file: ".nvmrc"
- uses: actions/cache@v4
id: root-cache
with:
path: node_modules
key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }}
- uses: actions/cache@v4
id: core-cache
with:
path: core/node_modules
key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }}
- uses: actions/cache@v4
id: config-yaml-cache
with:
path: packages/config-yaml/node_modules
key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }}
- uses: actions/cache@v4
id: openai-adapters-cache
with:
path: packages/openai-adapters/node_modules
key: ${{ runner.os }}-openai-adapters-node-modules-${{ hashFiles('packages/openai-adapters/package-lock.json') }}
- name: Build config-yaml
- name: Build packages and install core dependencies
run: |
cd packages/config-yaml
npm run build
./scripts/build-packages.sh
cd core
npm ci
- name: Build openai-adapters
run: |
cd packages/openai-adapters
npm run build
- name: Type check and lint
run: |
cd core
@ -220,8 +150,7 @@ jobs:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
install-gui:
needs:
[install-root, install-core, install-config-yaml, install-openai-adapters]
needs: [install-root, install-core]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@ -246,33 +175,15 @@ jobs:
path: gui/node_modules
key: ${{ runner.os }}-gui-node-modules-${{ hashFiles('gui/package-lock.json') }}
- uses: actions/cache@v4
id: config-yaml-cache
with:
path: packages/config-yaml/node_modules
key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }}
- uses: actions/cache@v4
id: openai-adapters-cache
with:
path: packages/openai-adapters/node_modules
key: ${{ runner.os }}-openai-adapters-node-modules-${{ hashFiles('packages/openai-adapters/package-lock.json') }}
- name: Build config-yaml
- name: Build packages and install dependencies
run: |
cd packages/config-yaml
npm run build
- name: Build openai-adapters
run: |
cd packages/openai-adapters
npm run build
- name: Install gui dependencies
if: steps.gui-cache.outputs.cache-hit != 'true'
run: |
cd gui
npm ci
./scripts/build-packages.sh
if [ "${{ steps.gui-cache.outputs.cache-hit }}" != "true" ]; then
cd core
npm ci
cd ../gui
npm ci
fi
gui-checks:
needs: install-gui
@ -294,32 +205,17 @@ jobs:
key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }}
- uses: actions/cache@v4
id: gui-cache
with:
path: gui/node_modules
key: ${{ runner.os }}-gui-node-modules-${{ hashFiles('gui/package-lock.json') }}
- uses: actions/cache@v4
id: openai-adapters-cache
with:
path: packages/openai-adapters/node_modules
key: ${{ runner.os }}-openai-adapters-node-modules-${{ hashFiles('packages/openai-adapters/package-lock.json') }}
- uses: actions/cache@v4
id: config-yaml-cache
with:
path: packages/config-yaml/node_modules
key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }}
- name: Build config-yaml
- name: Build packages and install dependencies
run: |
cd packages/config-yaml
npm run build
- name: Build openai-adapters
run: |
cd packages/openai-adapters
npm run build
./scripts/build-packages.sh
cd core
npm ci
cd ../gui
npm ci
- name: Type check and lint
run: |
@ -328,8 +224,7 @@ jobs:
npm run lint
binary-checks:
needs:
[install-root, install-core, install-config-yaml, install-openai-adapters]
needs: [install-root, install-core]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@ -354,33 +249,15 @@ jobs:
path: binary/node_modules
key: ${{ runner.os }}-binary-node-modules-${{ hashFiles('binary/package-lock.json') }}
- uses: actions/cache@v4
id: config-yaml-cache
with:
path: packages/config-yaml/node_modules
key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }}
- uses: actions/cache@v4
id: openai-adapters-cache
with:
path: packages/openai-adapters/node_modules
key: ${{ runner.os }}-openai-adapters-node-modules-${{ hashFiles('packages/openai-adapters/package-lock.json') }}
- name: Build config-yaml
- name: Build packages and install dependencies
run: |
cd packages/config-yaml
npm run build
- name: Build openai-adapters
run: |
cd packages/openai-adapters
npm run build
- name: Install binary dependencies
if: steps.binary-cache.outputs.cache-hit != 'true'
run: |
cd binary
npm ci
./scripts/build-packages.sh
if [ "${{ steps.binary-cache.outputs.cache-hit }}" != "true" ]; then
cd core
npm ci
cd ../binary
npm ci
fi
- name: Type check
run: |
@ -388,8 +265,7 @@ jobs:
npx tsc --noEmit
install-vscode:
needs:
[install-root, install-core, install-config-yaml, install-openai-adapters]
needs: [install-root, install-core]
runs-on: ${{ matrix.os }}
strategy:
matrix:
@ -417,33 +293,15 @@ jobs:
path: extensions/vscode/node_modules
key: ${{ runner.os }}-vscode-node-modules-${{ hashFiles('extensions/vscode/package-lock.json') }}
- uses: actions/cache@v4
id: config-yaml-cache
with:
path: packages/config-yaml/node_modules
key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }}
- uses: actions/cache@v4
id: openai-adapters-cache
with:
path: packages/openai-adapters/node_modules
key: ${{ runner.os }}-openai-adapters-node-modules-${{ hashFiles('packages/openai-adapters/package-lock.json') }}
- name: Build config-yaml
- name: Build packages and install dependencies
run: |
cd packages/config-yaml
npm run build
- name: Build openai-adapters
run: |
cd packages/openai-adapters
npm run build
- name: Install vscode dependencies
if: steps.vscode-cache.outputs.cache-hit != 'true'
run: |
cd extensions/vscode
npm ci
./scripts/build-packages.sh
if [ "${{ steps.vscode-cache.outputs.cache-hit }}" != "true" ]; then
cd core
npm ci
cd ../extensions/vscode
npm ci
fi
env:
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
@ -473,27 +331,15 @@ jobs:
path: extensions/vscode/node_modules
key: ${{ runner.os }}-vscode-node-modules-${{ hashFiles('extensions/vscode/package-lock.json') }}
- uses: actions/cache@v4
id: config-yaml-cache
with:
path: packages/config-yaml/node_modules
key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }}
- uses: actions/cache@v4
id: openai-adapters-cache
with:
path: packages/openai-adapters/node_modules
key: ${{ runner.os }}-openai-adapters-node-modules-${{ hashFiles('packages/openai-adapters/package-lock.json') }}
- name: Build config-yaml
- name: Build packages and install dependencies
run: |
cd packages/config-yaml
npm run build
- name: Build openai-adapters
run: |
cd packages/openai-adapters
npm run build
./scripts/build-packages.sh
cd core
npm ci
cd ../extensions/vscode
npm ci
env:
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
- name: Type check and lint
run: |
@ -508,7 +354,7 @@ jobs:
npm run vitest
core-tests:
needs: [install-core, install-config-yaml, install-openai-adapters]
needs: install-core
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@ -522,27 +368,11 @@ jobs:
path: core/node_modules
key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }}
- uses: actions/cache@v4
id: config-yaml-cache
with:
path: packages/config-yaml/node_modules
key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }}
- uses: actions/cache@v4
id: openai-adapters-cache
with:
path: packages/openai-adapters/node_modules
key: ${{ runner.os }}-openai-adapters-node-modules-${{ hashFiles('packages/openai-adapters/package-lock.json') }}
- name: Build config-yaml
- name: Build packages and install core dependencies
run: |
cd packages/config-yaml
npm run build
- name: Build openai-adapters
run: |
cd packages/openai-adapters
npm run build
./scripts/build-packages.sh
cd core
npm ci
- name: Run core tests
run: |
@ -569,23 +399,13 @@ jobs:
with:
node-version-file: ".nvmrc"
- uses: actions/cache@v4
with:
path: core/node_modules
key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }}
- name: Install dependencies
run: |
cd packages/config-yaml
npm ci
- name: Run config-yaml tests
- name: Build packages and run tests
run: |
./scripts/build-packages.sh
cd packages/config-yaml
npm test
openai-adapters-tests:
needs: install-openai-adapters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@ -599,14 +419,9 @@ jobs:
path: node_modules
key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }}
- uses: actions/cache@v4
id: openai-adapters-cache
with:
path: packages/openai-adapters/node_modules
key: ${{ runner.os }}-openai-adapters-node-modules-${{ hashFiles('packages/openai-adapters/package-lock.json') }}
- name: Run openai-adapters tests
- name: Build packages and run tests
run: |
./scripts/build-packages.sh
cd packages/openai-adapters
npm test
env:
@ -623,7 +438,7 @@ jobs:
vscode-get-test-file-matrix:
runs-on: ubuntu-latest
needs: [install-root, install-vscode, install-config-yaml]
needs: [install-root, install-vscode]
outputs:
test_file_matrix: ${{ steps.vscode-get-test-file-matrix.outputs.test_file_matrix }}
steps:
@ -635,21 +450,13 @@ jobs:
path: extensions/vscode/node_modules
key: ${{ runner.os }}-vscode-node-modules-${{ hashFiles('extensions/vscode/package-lock.json') }}
- uses: actions/cache@v4
id: config-yaml-cache
with:
path: packages/config-yaml/node_modules
key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }}
- name: Build config-yaml
run: |
cd packages/config-yaml
npm run build
- name: Get test files
- name: Build packages and get test files
id: vscode-get-test-file-matrix
run: |
cd extensions/vscode
./scripts/build-packages.sh
cd core
npm ci
cd ../extensions/vscode
npm ci
npm run e2e:compile
if [[ "${{ github.event.pull_request.head.repo.fork }}" == "true" || "${{ github.actor }}" == "dependabot[bot]" ]]; then
@ -671,78 +478,32 @@ jobs:
echo "Test files: ${{ steps.vscode-get-test-file-matrix.outputs.test_file_matrix }}"
vscode-package-extension:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
needs:
[
install-vscode,
install-core,
install-config-yaml,
install-openai-adapters,
]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- uses: actions/cache@v4
id: vscode-node-modules-cache
with:
path: extensions/vscode/node_modules
key: ${{ runner.os }}-vscode-node-modules-${{ hashFiles('extensions/vscode/package-lock.json') }}
- uses: actions/cache@v4
id: core-node-modules-cache
with:
path: core/node_modules
key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }}
- uses: actions/cache@v4
id: config-yaml-cache
with:
path: packages/config-yaml/node_modules
key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }}
- uses: actions/cache@v4
id: openai-adapters-cache
with:
path: packages/openai-adapters/node_modules
key: ${{ runner.os }}-openai-adapters-node-modules-${{ hashFiles('packages/openai-adapters/package-lock.json') }}
- name: Build config-yaml
run: |
cd packages/config-yaml
npm run build
- name: Build openai-adapters
run: |
cd packages/openai-adapters
npm run build
- name: Package extension
run: |
cd extensions/vscode
npm run package
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: vscode-extension-build-${{ runner.os }}
path: extensions/vscode/build
needs: [install-vscode, install-core]
uses: ./.github/workflows/build-vscode-extension.yml
with:
# Limited platforms for faster PR checks
platforms: |
[
{
"os": "ubuntu-latest",
"platform": "linux",
"arch": "x64",
"npm_config_arch": "x64"
},
{
"os": "macos-13",
"platform": "darwin",
"arch": "x64",
"npm_config_arch": "x64"
}
]
pre-release: false
commit-sha: ${{ github.sha }}
secrets: inherit
vscode-download-e2e-dependencies:
runs-on: ubuntu-latest
needs:
[
install-vscode,
install-core,
install-config-yaml,
install-openai-adapters,
]
needs: [install-vscode, install-core]
steps:
- uses: actions/checkout@v4
@ -762,22 +523,15 @@ jobs:
path: extensions/vscode/e2e/storage
key: ${{ runner.os }}-vscode-storage-${{ hashFiles('extensions/vscode/package-lock.json') }}
- uses: actions/cache@v4
id: config-yaml-cache
with:
path: packages/config-yaml/node_modules
key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }}
- name: Build config-yaml
- name: Build packages and download e2e dependencies
run: |
cd packages/config-yaml
npm run build
- name: Download Dependencies
if: steps.storage-cache.outputs.cache-hit != 'true'
run: |
cd extensions/vscode
npm run e2e:ci:download
./scripts/build-packages.sh
if [ "${{ steps.storage-cache.outputs.cache-hit }}" != "true" ]; then
cd core
npm ci
cd ../extensions/vscode
npm run e2e:ci:download
fi
- name: Upload e2e dependencies
uses: actions/upload-artifact@v4
@ -794,8 +548,6 @@ jobs:
vscode-package-extension,
install-vscode,
install-core,
install-config-yaml,
install-openai-adapters,
]
runs-on: ubuntu-latest
# Tests requiring secrets need approval from maintainers
@ -836,27 +588,11 @@ jobs:
name: vscode-e2e-dependencies
path: extensions/vscode/e2e/storage
- uses: actions/cache@v4
id: config-yaml-cache
with:
path: packages/config-yaml/node_modules
key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }}
- uses: actions/cache@v4
id: openai-adapters-cache
with:
path: packages/openai-adapters/node_modules
key: ${{ runner.os }}-openai-adapters-node-modules-${{ hashFiles('packages/openai-adapters/package-lock.json') }}
- name: Build config-yaml
- name: Build packages and install core dependencies
run: |
cd packages/config-yaml
npm run build
- name: Build openai-adapters
run: |
cd packages/openai-adapters
npm run build
./scripts/build-packages.sh
cd core
npm ci
- name: Fix VSCode binary permissions
run: |
@ -921,8 +657,7 @@ jobs:
path: extensions/vscode/e2e.log
gui-tests:
needs:
[install-gui, install-core, install-config-yaml, install-openai-adapters]
needs: [install-gui, install-core]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@ -932,7 +667,6 @@ jobs:
node-version-file: ".nvmrc"
- uses: actions/cache@v4
id: gui-cache
with:
path: gui/node_modules
key: ${{ runner.os }}-gui-node-modules-${{ hashFiles('gui/package-lock.json') }}
@ -942,31 +676,13 @@ jobs:
path: core/node_modules
key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }}
- uses: actions/cache@v4
id: config-yaml-cache
with:
path: packages/config-yaml/node_modules
key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }}
- uses: actions/cache@v4
id: openai-adapters-cache
with:
path: packages/openai-adapters/node_modules
key: ${{ runner.os }}-openai-adapters-node-modules-${{ hashFiles('packages/openai-adapters/package-lock.json') }}
- name: Build config-yaml
- name: Build packages and install dependencies
run: |
cd packages/config-yaml
npm run build
- name: Build openai-adapters
run: |
cd packages/openai-adapters
npm run build
- name: Install GUI dependencies
if: steps.gui-cache.outputs.cache-hit != 'true'
run: cd gui && npm ci
./scripts/build-packages.sh
cd core
npm ci
cd ../gui
npm ci
env:
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
@ -976,8 +692,7 @@ jobs:
npm test
jetbrains-tests:
needs:
[install-root, core-checks, install-config-yaml, install-openai-adapters]
needs: [install-root, core-checks]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@ -986,27 +701,11 @@ jobs:
path: core/node_modules
key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }}
- uses: actions/cache@v4
id: config-yaml-cache
with:
path: packages/config-yaml/node_modules
key: ${{ runner.os }}-config-yaml-node-modules-${{ hashFiles('packages/config-yaml/package-lock.json') }}
- uses: actions/cache@v4
id: openai-adapters-cache
with:
path: packages/openai-adapters/node_modules
key: ${{ runner.os }}-openai-adapters-node-modules-${{ hashFiles('packages/openai-adapters/package-lock.json') }}
- name: Build config-yaml
- name: Build packages and install core dependencies
run: |
cd packages/config-yaml
npm run build
- name: Build openai-adapters
run: |
cd packages/openai-adapters
npm run build
./scripts/build-packages.sh
cd core
npm ci
- name: Setup Java
uses: actions/setup-java@v4.5.0
@ -1121,8 +820,7 @@ jobs:
- gui-tests
- jetbrains-tests
- config-yaml-checks
- install-config-yaml
- install-openai-adapters
- build-packages
- openai-adapters-tests
steps:

View file

@ -29,152 +29,11 @@ jobs:
build:
needs: check_release_name
if: needs.check_release_name.outputs.should_run == 'true' || github.event_name == 'workflow_dispatch'
strategy:
matrix:
include:
- os: windows-latest
platform: win32
arch: x64
npm_config_arch: x64
- os: windows-latest
platform: win32
arch: arm64
npm_config_arch: arm
- os: ubuntu-latest
platform: linux
arch: x64
npm_config_arch: x64
- os: ubuntu-latest
platform: linux
arch: arm64
npm_config_arch: arm64
- os: ubuntu-latest
platform: linux
arch: armhf
npm_config_arch: arm
- os: ubuntu-latest
platform: alpine
arch: x64
npm_config_arch: x64
- os: macos-13
platform: darwin
arch: x64
npm_config_arch: x64
- os: macos-13
platform: darwin
arch: arm64
npm_config_arch: arm64
runs-on: ${{ matrix.os }}
steps:
# 1. Check-out repository
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # This ensures all tags are fetched
- name: Checkout tag
run: git checkout ${GITHUB_REF#refs/tags/}
# 2. Install npm dependencies
- name: Use Node.js from .nvmrc
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: Cache extension node_modules
uses: actions/cache@v3
with:
path: extensions/vscode/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('extensions/vscode/package-lock.json') }}
- name: Cache core node_modules
uses: actions/cache@v3
with:
path: core/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('core/package-lock.json') }}
- name: Cache gui node_modules
uses: actions/cache@v3
with:
path: gui/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('gui/package-lock.json') }}
- name: Build packages (Windows)
run: ./scripts/build-packages.ps1
if: matrix.os == 'windows-latest'
- name: Build packages (Unix)
run: ./scripts/build-packages.sh
if: matrix.os != 'windows-latest'
- name: Install extension Dependencies
run: |
cd extensions/vscode
npm ci
env:
# https://github.com/microsoft/vscode-ripgrep/issues/9#issuecomment-643965333
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
- name: Install gui Dependencies
run: |
cd gui
npm ci
# npm ci doesn't end up capturing the @lancedb/... dep because it's not in the package-lock.json
- name: Install Core Dependencies
run: |
cd core
npm ci
npm i vectordb
# - name: Run core tests
# run: |
# cd core
# npm run test
# env:
# OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
# 2.5. Pre package
- name: Set var for environment info
shell: pwsh
run: echo "target=${{ matrix.platform }}-${{ matrix.arch }}" >> $env:GITHUB_ENV
- name: Prepackage the extension
run: |
cd extensions/vscode
npm run prepackage -- --target ${{ env.target }}
# 3. Re-install esbuild (for cases that we force installed for another arch in prepackage.js)
- name: Re-install esbuild
run: |
cd extensions/vscode
npm install -f esbuild
# 4. Run tests for the extension
# - name: Install Xvfb for Linux and run tests
# run: |
# sudo apt-get install -y xvfb # Install Xvfb
# Xvfb :99 & # Start Xvfb
# export DISPLAY=:99 # Export the display number to the environment
# cd extensions/vscode
# npm run test
# if: matrix.os == 'ubuntu-latest'
# - name: Run extension tests
# run: |
# cd extensions/vscode
# npm run test
# if: matrix.os != 'ubuntu-latest'
# 5. Package the extension
- name: Package the extension
run: cd extensions/vscode && npx vsce package --pre-release --no-dependencies --target ${{ env.target }}
# 6. Upload the .vsix as an artifact
- uses: actions/upload-artifact@v4
with:
name: ${{ env.target }}-vsix
path: "extensions/vscode/*.vsix"
uses: ./.github/workflows/build-vscode-extension.yml
with:
# Uses default platforms (all supported platforms)
pre-release: true
secrets: inherit
release:
permissions:

6
.vscode/launch.json vendored
View file

@ -12,13 +12,13 @@
"cwd": "${workspaceFolder}/extensions/vscode",
"args": [
// Pass a directory to manually test in
"${workspaceFolder}/manual-testing-sandbox",
"${workspaceFolder}/manual-testing-sandbox/test.js",
"${workspaceFolder}/core",
"${workspaceFolder}/package.json",
"--extensionDevelopmentPath=${workspaceFolder}/extensions/vscode"
],
"pauseForSourceMap": false,
"outFiles": ["${workspaceFolder}/extensions/vscode/out/extension.js"],
"preLaunchTask": "vscode-extension:build",
"preLaunchTask": "vscode-extension:build-with-packages",
"env": {
// "CONTROL_PLANE_ENV": "local",
"CONTINUE_GLOBAL_DIR": "${workspaceFolder}/extensions/.continue-debug"

17
.vscode/tasks.json vendored
View file

@ -223,6 +223,23 @@
],
"type": "shell",
"problemMatcher": []
},
{
"label": "build-packages",
"type": "shell",
"windows": { "command": "./scripts/build-packages.ps1" },
"command": "./scripts/build-packages.sh",
"problemMatcher": [],
"presentation": {
"reveal": "silent",
"panel": "shared"
}
},
{
"label": "vscode-extension:build-with-packages",
"dependsOn": ["build-packages", "vscode-extension:build"],
"type": "shell",
"problemMatcher": []
}
]
}

View file

@ -7,7 +7,7 @@ export default {
"ts-jest",
{
useESM: true,
useIsolatedModules: true,
isolatedModules: true,
tsconfig: {
experimentalDecorators: true,
emitDecoratorMetadata: true,

View file

@ -450,8 +450,9 @@ describe("Retry Functionality", () => {
expect(result).toBe("success");
// Should be capped at maxDelay (200ms) not header value (10000ms)
expect(delays[0]).toBeGreaterThan(190);
expect(delays[0]).toBeLessThan(210);
// Jitter is applied before maxDelay cap, so delay should never exceed maxDelay
expect(delays[0]).toBeGreaterThanOrEqual(190);
expect(delays[0]).toBeLessThanOrEqual(200);
});
it("should handle case-insensitive header names", async () => {

View file

@ -149,10 +149,10 @@ function calculateDelay(
delayMs = Number(retryAfter) * 1000;
}
// Respect maxDelay and add small jitter to spread requests
const cappedDelay = Math.min(delayMs, maxDelay);
// Apply small jitter to spread requests, then respect maxDelay as hard limit
const jitterMultiplier = 1 + (Math.random() * 0.1 - 0.05); // Small jitter ±5%
return Math.max(0, Math.floor(cappedDelay * jitterMultiplier));
const jitteredDelay = delayMs * jitterMultiplier;
return Math.max(0, Math.floor(Math.min(jitteredDelay, maxDelay)));
}
}

69
core/package-lock.json generated
View file

@ -14,8 +14,8 @@
"@aws-sdk/credential-providers": "^3.778.0",
"@continuedev/config-types": "^1.0.13",
"@continuedev/config-yaml": "file:../packages/config-yaml",
"@continuedev/fetch": "^1.0.14",
"@continuedev/llm-info": "^1.0.8",
"@continuedev/fetch": "file:../packages/fetch",
"@continuedev/llm-info": "file:../packages/llm-info",
"@continuedev/openai-adapters": "file:../packages/openai-adapters",
"@modelcontextprotocol/sdk": "^1.12.0",
"@mozilla/readability": "^0.5.0",
@ -38,6 +38,7 @@
"handlebars": "^4.7.8",
"http-proxy-agent": "^7.0.1",
"https-proxy-agent": "^7.0.3",
"iconv-lite": "^0.6.3",
"ignore": "^5.3.1",
"is-localhost-ip": "^2.0.0",
"jinja-js": "0.1.8",
@ -145,7 +146,7 @@
"version": "1.0.96",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-types": "^1.0.14",
"@continuedev/config-types": "file:../config-types",
"yaml": "^2.6.1",
"zod": "^3.24.2"
},
@ -167,17 +168,44 @@
"zod-to-json-schema": "^3.24.5"
}
},
"../packages/fetch": {
"name": "@continuedev/fetch",
"version": "1.0.15",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-types": "file:../config-types",
"follow-redirects": "^1.15.6",
"http-proxy-agent": "^7.0.2",
"https-proxy-agent": "^7.0.5",
"node-fetch": "^3.3.2"
},
"devDependencies": {
"@types/follow-redirects": "^1.14.4",
"typescript": "^5.0.0",
"vitest": "^3.2.0"
}
},
"../packages/llm-info": {
"name": "@continuedev/llm-info",
"version": "1.0.9",
"license": "Apache-2.0",
"devDependencies": {
"@types/node": "^22.15.29",
"typescript": "^5.5.2"
}
},
"../packages/openai-adapters": {
"name": "@continuedev/openai-adapters",
"version": "1.0.45",
"version": "1.0.46",
"license": "Apache-2.0",
"dependencies": {
"@aws-sdk/client-bedrock-runtime": "^3.842.0",
"@aws-sdk/credential-providers": "^3.840.0",
"@continuedev/config-types": "^1.0.5",
"@continuedev/config-yaml": "^1.0.51",
"@continuedev/fetch": "^1.0.15",
"@continuedev/config-types": "file:../config-types",
"@continuedev/config-yaml": "file:../config-yaml",
"@continuedev/fetch": "file:../fetch",
"dotenv": "^16.5.0",
"google-auth-library": "^10.1.0",
"json-schema": "^0.4.0",
"node-fetch": "^3.3.2",
"openai": "^4.104.0",
@ -185,13 +213,20 @@
"zod": "^3.24.2"
},
"devDependencies": {
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/commit-analyzer": "^13.0.1",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^11.0.3",
"@semantic-release/npm": "^12.0.2",
"@semantic-release/release-notes-generator": "^14.0.3",
"@types/follow-redirects": "^1.14.4",
"@types/jest": "^29.5.14",
"@types/json-schema": "^7.0.15",
"cross-env": "^7.0.3",
"semantic-release": "^24.2.7",
"ts-jest": "^29.2.3",
"ts-node": "^10.9.2",
"vitest": "^1.6.1"
"vitest": "^3.2.4"
}
},
"node_modules/@75lb/deep-merge": {
@ -2918,22 +2953,12 @@
"link": true
},
"node_modules/@continuedev/fetch": {
"version": "1.0.14",
"resolved": "https://registry.npmjs.org/@continuedev/fetch/-/fetch-1.0.14.tgz",
"integrity": "sha512-r/CUwW0tt7VrjLVNeowA281aq7VQvToE+Ro9+0EhfINBMNre4eU2MbNOgbRmYCr5VkIuSnltPUDI357Kns7uCw==",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-types": "^1.0.5",
"follow-redirects": "^1.15.6",
"http-proxy-agent": "^7.0.2",
"https-proxy-agent": "^7.0.5",
"node-fetch": "^3.3.2"
}
"resolved": "../packages/fetch",
"link": true
},
"node_modules/@continuedev/llm-info": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/@continuedev/llm-info/-/llm-info-1.0.8.tgz",
"integrity": "sha512-/htL7p4li3zQSwn9bXkI23WRpZNklWTPzRSSG3Fd5gvYW8cizjhlf7OzeDdKxBfi1S0lpqMm0VwHlx3KjMKLpw=="
"resolved": "../packages/llm-info",
"link": true
},
"node_modules/@continuedev/openai-adapters": {
"resolved": "../packages/openai-adapters",

View file

@ -54,8 +54,8 @@
"@aws-sdk/credential-providers": "^3.778.0",
"@continuedev/config-types": "^1.0.13",
"@continuedev/config-yaml": "file:../packages/config-yaml",
"@continuedev/fetch": "^1.0.14",
"@continuedev/llm-info": "^1.0.8",
"@continuedev/fetch": "file:../packages/fetch",
"@continuedev/llm-info": "file:../packages/llm-info",
"@continuedev/openai-adapters": "file:../packages/openai-adapters",
"@modelcontextprotocol/sdk": "^1.12.0",
"@mozilla/readability": "^0.5.0",

View file

@ -1,16 +1,16 @@
{
"name": "continue",
"version": "1.1.68",
"version": "1.1.67",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "continue",
"version": "1.1.68",
"version": "1.1.67",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-types": "^1.0.14",
"@continuedev/fetch": "^1.0.10",
"@continuedev/config-types": "file:../../packages/config-types",
"@continuedev/fetch": "file:../../packages/fetch",
"@electron/rebuild": "^3.2.10",
"@reduxjs/toolkit": "^1.9.3",
"@vscode/ripgrep": "^1.15.9",
@ -105,8 +105,8 @@
"@aws-sdk/credential-providers": "^3.778.0",
"@continuedev/config-types": "^1.0.13",
"@continuedev/config-yaml": "file:../packages/config-yaml",
"@continuedev/fetch": "^1.0.14",
"@continuedev/llm-info": "^1.0.8",
"@continuedev/fetch": "file:../packages/fetch",
"@continuedev/llm-info": "file:../packages/llm-info",
"@continuedev/openai-adapters": "file:../packages/openai-adapters",
"@modelcontextprotocol/sdk": "^1.12.0",
"@mozilla/readability": "^0.5.0",
@ -129,6 +129,7 @@
"handlebars": "^4.7.8",
"http-proxy-agent": "^7.0.1",
"https-proxy-agent": "^7.0.3",
"iconv-lite": "^0.6.3",
"ignore": "^5.3.1",
"is-localhost-ip": "^2.0.0",
"jinja-js": "0.1.8",
@ -142,7 +143,7 @@
"node-html-markdown": "^1.3.0",
"ollama": "^0.4.6",
"onnxruntime-node": "1.14.0",
"openai": "^4.76.0",
"openai": "^4.104.0",
"p-limit": "^6.1.0",
"partial-json": "^0.1.7",
"pg": "^8.11.3",
@ -207,6 +208,41 @@
"node": ">=20.19.0"
}
},
"../../packages/config-types": {
"name": "@continuedev/config-types",
"version": "1.0.14",
"license": "Apache-2.0",
"dependencies": {
"zod": "^3.24.2"
},
"devDependencies": {
"@types/node": "^20.11.19",
"typescript": "^5.5.2"
}
},
"../../packages/fetch": {
"name": "@continuedev/fetch",
"version": "1.0.15",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-types": "file:../config-types",
"follow-redirects": "^1.15.6",
"http-proxy-agent": "^7.0.2",
"https-proxy-agent": "^7.0.5",
"node-fetch": "^3.3.2"
},
"devDependencies": {
"@types/follow-redirects": "^1.14.4",
"typescript": "^5.0.0",
"vitest": "^3.2.0"
}
},
"../packages/config-types": {
"extraneous": true
},
"../packages/fetch": {
"extraneous": true
},
"node_modules/@75lb/deep-merge": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@75lb/deep-merge/-/deep-merge-1.1.2.tgz",
@ -702,25 +738,12 @@
}
},
"node_modules/@continuedev/config-types": {
"version": "1.0.14",
"resolved": "https://registry.npmjs.org/@continuedev/config-types/-/config-types-1.0.14.tgz",
"integrity": "sha512-PVHyHPyRXd2QsaNgnCpiKYU3uHFTlyuQSkqE8OwrBmQqO6/TXUVIr/2EGtyIZGrml4Y+rGMSH40WU4/0t4SGpQ==",
"dependencies": {
"zod": "^3.23.8"
}
"resolved": "../../packages/config-types",
"link": true
},
"node_modules/@continuedev/fetch": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/@continuedev/fetch/-/fetch-1.0.10.tgz",
"integrity": "sha512-RBUXtm/VDz+9Itgw+CxrHXwVXoHCAedGzPOgA7gS5HZ9lObaeCJgEfzmfbln1ocFsfqSFmn5X5wSE7DHgfxpVA==",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-types": "^1.0.5",
"follow-redirects": "^1.15.6",
"http-proxy-agent": "^7.0.2",
"https-proxy-agent": "^7.0.5",
"node-fetch": "^3.3.2"
}
"resolved": "../../packages/fetch",
"link": true
},
"node_modules/@electron/node-gyp": {
"version": "10.2.0-electron.1",
@ -16741,14 +16764,6 @@
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/zod": {
"version": "3.23.8",
"resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz",
"integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==",
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}
}
}
}

View file

@ -717,8 +717,8 @@
"vscode-extension-tester": "^8.14.1"
},
"dependencies": {
"@continuedev/config-types": "^1.0.14",
"@continuedev/fetch": "^1.0.10",
"@continuedev/config-types": "file:../../packages/config-types",
"@continuedev/fetch": "file:../../packages/fetch",
"@electron/rebuild": "^3.2.10",
"@reduxjs/toolkit": "^1.9.3",
"@vscode/ripgrep": "^1.15.9",

9
gui/package-lock.json generated
View file

@ -116,8 +116,8 @@
"@aws-sdk/credential-providers": "^3.778.0",
"@continuedev/config-types": "^1.0.13",
"@continuedev/config-yaml": "file:../packages/config-yaml",
"@continuedev/fetch": "^1.0.14",
"@continuedev/llm-info": "^1.0.8",
"@continuedev/fetch": "file:../packages/fetch",
"@continuedev/llm-info": "file:../packages/llm-info",
"@continuedev/openai-adapters": "file:../packages/openai-adapters",
"@modelcontextprotocol/sdk": "^1.12.0",
"@mozilla/readability": "^0.5.0",
@ -140,6 +140,7 @@
"handlebars": "^4.7.8",
"http-proxy-agent": "^7.0.1",
"https-proxy-agent": "^7.0.3",
"iconv-lite": "^0.6.3",
"ignore": "^5.3.1",
"is-localhost-ip": "^2.0.0",
"jinja-js": "0.1.8",
@ -153,7 +154,7 @@
"node-html-markdown": "^1.3.0",
"ollama": "^0.4.6",
"onnxruntime-node": "1.14.0",
"openai": "^4.76.0",
"openai": "^4.104.0",
"p-limit": "^6.1.0",
"partial-json": "^0.1.7",
"pg": "^8.11.3",
@ -223,7 +224,7 @@
"version": "1.0.96",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-types": "^1.0.14",
"@continuedev/config-types": "file:../config-types",
"yaml": "^2.6.1",
"zod": "^3.24.2"
},

2
package-lock.json generated
View file

@ -1,5 +1,5 @@
{
"name": "wt-openai-adapters-tests",
"name": "continue",
"lockfileVersion": 3,
"requires": true,
"packages": {

View file

@ -205,7 +205,7 @@ export type DevData = z.infer<typeof devDataSchema>;
export const siteIndexingConfigSchema = z.object({
startUrl: z.string(),
// rootUrl: z.string(),
rootUrl: z.string().optional(),
title: z.string(),
maxDepth: z.number().optional(),
faviconUrl: z.string().optional(),

View file

@ -9,7 +9,7 @@
"version": "1.0.96",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-types": "^1.0.14",
"@continuedev/config-types": "file:../config-types",
"yaml": "^2.6.1",
"zod": "^3.24.2"
},
@ -31,6 +31,18 @@
"zod-to-json-schema": "^3.24.5"
}
},
"../config-types": {
"name": "@continuedev/config-types",
"version": "1.0.14",
"license": "Apache-2.0",
"dependencies": {
"zod": "^3.24.2"
},
"devDependencies": {
"@types/node": "^20.11.19",
"typescript": "^5.5.2"
}
},
"node_modules/@ampproject/remapping": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz",
@ -558,12 +570,8 @@
}
},
"node_modules/@continuedev/config-types": {
"version": "1.0.14",
"resolved": "https://registry.npmjs.org/@continuedev/config-types/-/config-types-1.0.14.tgz",
"integrity": "sha512-PVHyHPyRXd2QsaNgnCpiKYU3uHFTlyuQSkqE8OwrBmQqO6/TXUVIr/2EGtyIZGrml4Y+rGMSH40WU4/0t4SGpQ==",
"dependencies": {
"zod": "^3.23.8"
}
"resolved": "../config-types",
"link": true
},
"node_modules/@cspotcode/source-map-support": {
"version": "0.8.1",

View file

@ -23,7 +23,7 @@
"author": "Continue Dev, Inc.",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-types": "^1.0.14",
"@continuedev/config-types": "file:../config-types",
"yaml": "^2.6.1",
"zod": "^3.24.2"
},

View file

@ -23,7 +23,7 @@
"version": "1.0.96",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-types": "^1.0.14",
"@continuedev/config-types": "file:../config-types",
"yaml": "^2.6.1",
"zod": "^3.24.2"
},

View file

@ -4,6 +4,7 @@
"description": "SDK Generator for Continue.dev",
"type": "module",
"scripts": {
"build": "echo 'No build step needed'",
"generate-client:typescript": "openapi-generator-cli generate -i ./openapi.yaml -g typescript-fetch -o ./typescript/api -c ./openapi-generator-config.json",
"generate-client:python": "openapi-generator-cli generate -i ./openapi.yaml -g python -o ./python/api -c ./openapi-generator-config.json",
"generate-client:ALL": "npm run generate-client:typescript && npm run generate-client:python",
@ -20,4 +21,4 @@
"devDependencies": {
"typescript": "^5.0.0"
}
}
}

View file

@ -9,7 +9,7 @@
"version": "1.0.16",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-types": "^1.0.5",
"@continuedev/config-types": "file:../config-types",
"follow-redirects": "^1.15.6",
"http-proxy-agent": "^7.0.2",
"https-proxy-agent": "^7.0.5",
@ -17,17 +17,26 @@
},
"devDependencies": {
"@types/follow-redirects": "^1.14.4",
"typescript": "^5.0.0",
"vitest": "^3.2.0"
}
},
"node_modules/@continuedev/config-types": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/@continuedev/config-types/-/config-types-1.0.5.tgz",
"integrity": "sha512-Uv3JWKmpgSo9cMhZb2hWoJgR2ezuAn3CenEziWT/5d7mddPLzvuuHgFX6aDjLVVMojS1ul0rpfAd2LGxEb6nDQ==",
"../config-types": {
"name": "@continuedev/config-types",
"version": "1.0.14",
"license": "Apache-2.0",
"dependencies": {
"zod": "^3.23.8"
"zod": "^3.24.2"
},
"devDependencies": {
"@types/node": "^20.11.19",
"typescript": "^5.5.2"
}
},
"node_modules/@continuedev/config-types": {
"resolved": "../config-types",
"link": true
},
"node_modules/@esbuild/aix-ppc64": {
"version": "0.25.5",
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.5.tgz",
@ -1350,6 +1359,20 @@
"node": ">=14.0.0"
}
},
"node_modules/typescript": {
"version": "5.8.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
"integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
"dev": true,
"license": "Apache-2.0",
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=14.17"
}
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
@ -1585,14 +1608,6 @@
"engines": {
"node": ">=8"
}
},
"node_modules/zod": {
"version": "3.23.8",
"resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz",
"integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==",
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}
}
}
}

View file

@ -12,7 +12,7 @@
"author": "Nate Sesti and Ty Dunn",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-types": "^1.0.5",
"@continuedev/config-types": "file:../config-types",
"follow-redirects": "^1.15.6",
"http-proxy-agent": "^7.0.2",
"https-proxy-agent": "^7.0.5",
@ -20,6 +20,7 @@
},
"devDependencies": {
"@types/follow-redirects": "^1.14.4",
"typescript": "^5.0.0",
"vitest": "^3.2.0"
}
}

View file

@ -43,7 +43,7 @@ export const Gemini: ModelProvider = {
contextLength: 1048576,
maxCompletionTokens: 8192,
mediaTypes: AllMediaTypes,
regex: /gemini-2\.0-flash/i,
regex: /^gemini-2\.0-flash$/i,
recommendedFor: ["chat"],
},
{
@ -54,7 +54,7 @@ export const Gemini: ModelProvider = {
contextLength: 1048576,
maxCompletionTokens: 8192,
mediaTypes: AllMediaTypes,
regex: /gemini-2\.0-flash-lite/i,
regex: /^gemini-2\.0-flash-lite$/i,
recommendedFor: ["chat"],
},
{
@ -86,7 +86,7 @@ export const Gemini: ModelProvider = {
contextLength: 1048576,
maxCompletionTokens: 8192,
mediaTypes: AllMediaTypes,
regex: /gemini-2\.0-flash-exp/i,
regex: /^gemini-2\.0-flash-exp$/i,
recommendedFor: ["chat"],
},
{

View file

@ -11,9 +11,9 @@
"dependencies": {
"@aws-sdk/client-bedrock-runtime": "^3.842.0",
"@aws-sdk/credential-providers": "^3.840.0",
"@continuedev/config-types": "^1.0.5",
"@continuedev/config-yaml": "^1.0.51",
"@continuedev/fetch": "^1.0.16",
"@continuedev/config-types": "file:../config-types",
"@continuedev/config-yaml": "file:../config-yaml",
"@continuedev/fetch": "file:../fetch",
"dotenv": "^16.5.0",
"google-auth-library": "^10.1.0",
"json-schema": "^0.4.0",
@ -39,6 +39,65 @@
"vitest": "^3.2.4"
}
},
"../config-types": {
"name": "@continuedev/config-types",
"version": "1.0.14",
"license": "Apache-2.0",
"dependencies": {
"zod": "^3.24.2"
},
"devDependencies": {
"@types/node": "^20.11.19",
"typescript": "^5.5.2"
}
},
"../config-yaml": {
"name": "@continuedev/config-yaml",
"version": "1.0.96",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-types": "file:../config-types",
"yaml": "^2.6.1",
"zod": "^3.24.2"
},
"bin": {
"config-yaml": "dist/cli.js"
},
"devDependencies": {
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^9.2.6",
"@semantic-release/npm": "^10.0.6",
"@types/jest": "^29.5.14",
"@types/node": "^20.0.0",
"cross-env": "^7.0.3",
"jest": "^29.7.0",
"semantic-release": "^21.1.2",
"ts-jest": "^29.2.3",
"ts-node": "^10.9.2",
"zod-to-json-schema": "^3.24.5"
}
},
"../fetch": {
"name": "@continuedev/fetch",
"version": "1.0.15",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-types": "file:../config-types",
"follow-redirects": "^1.15.6",
"http-proxy-agent": "^7.0.2",
"https-proxy-agent": "^7.0.5",
"node-fetch": "^3.3.2"
},
"devDependencies": {
"@types/follow-redirects": "^1.14.4",
"typescript": "^5.0.0",
"vitest": "^3.2.0"
}
},
"../packages/fetch": {
"extraneous": true
},
"node_modules/@ampproject/remapping": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz",
@ -1333,35 +1392,16 @@
}
},
"node_modules/@continuedev/config-types": {
"version": "1.0.14",
"resolved": "https://registry.npmjs.org/@continuedev/config-types/-/config-types-1.0.14.tgz",
"integrity": "sha512-PVHyHPyRXd2QsaNgnCpiKYU3uHFTlyuQSkqE8OwrBmQqO6/TXUVIr/2EGtyIZGrml4Y+rGMSH40WU4/0t4SGpQ==",
"dependencies": {
"zod": "^3.23.8"
}
"resolved": "../config-types",
"link": true
},
"node_modules/@continuedev/config-yaml": {
"version": "1.0.68",
"resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.68.tgz",
"integrity": "sha512-rCegSGkv7Ws7LLnYVVGwXsoVZFpNFJnG6b1dVrj/u+2ZsFdA2leQUNtFGoeE/ixyfhUfBpMlgjEyPrmmy7gLjw==",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-types": "^1.0.14",
"yaml": "^2.6.1",
"zod": "^3.24.2"
}
"resolved": "../config-yaml",
"link": true
},
"node_modules/@continuedev/fetch": {
"version": "1.0.16",
"resolved": "https://registry.npmjs.org/@continuedev/fetch/-/fetch-1.0.16.tgz",
"integrity": "sha512-LSjVbTKA+UwqCjV8x45sfJQGtG/iekkqCYpSJsakY0ruad807swwEuuui5luuYVUhJAZZpVfZzeJArHfjiJJSw==",
"dependencies": {
"@continuedev/config-types": "^1.0.5",
"follow-redirects": "^1.15.6",
"http-proxy-agent": "^7.0.2",
"https-proxy-agent": "^7.0.5",
"node-fetch": "^3.3.2"
}
"resolved": "../fetch",
"link": true
},
"node_modules/@cspotcode/source-map-support": {
"version": "0.8.1",
@ -5857,25 +5897,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/follow-redirects": {
"version": "1.15.6",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
"integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==",
"funding": [
{
"type": "individual",
"url": "https://github.com/sponsors/RubenVerborgh"
}
],
"engines": {
"node": ">=4.0"
},
"peerDependenciesMeta": {
"debug": {
"optional": true
}
}
},
"node_modules/form-data": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
@ -6302,6 +6323,7 @@
"version": "7.0.2",
"resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz",
"integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==",
"dev": true,
"dependencies": {
"agent-base": "^7.1.0",
"debug": "^4.3.4"
@ -13209,6 +13231,9 @@
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz",
"integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==",
"dev": true,
"optional": true,
"peer": true,
"bin": {
"yaml": "bin.mjs"
},

View file

@ -14,9 +14,9 @@
"dependencies": {
"@aws-sdk/client-bedrock-runtime": "^3.842.0",
"@aws-sdk/credential-providers": "^3.840.0",
"@continuedev/config-types": "^1.0.5",
"@continuedev/config-yaml": "^1.0.51",
"@continuedev/fetch": "^1.0.16",
"@continuedev/config-types": "file:../config-types",
"@continuedev/config-yaml": "file:../config-yaml",
"@continuedev/fetch": "file:../fetch",
"dotenv": "^16.5.0",
"google-auth-library": "^10.1.0",
"json-schema": "^0.4.0",

View file

@ -1,13 +1,43 @@
# Use npm ci in CI, npm install in development
if ($env:CI -eq "true") {
$npmInstallCmd = "npm ci"
} else {
$npmInstallCmd = "npm install"
}
Push-Location packages
Push-Location "openai-adapters"
npm ci
# Phase 1: Build config-types (foundation - no dependencies)
Push-Location "config-types"
& cmd /c $npmInstallCmd
npm run build
Pop-Location
# Phase 2: Build packages that depend on config-types
Push-Location "fetch"
& cmd /c $npmInstallCmd
npm run build
Pop-Location
Push-Location "config-yaml"
npm ci
& cmd /c $npmInstallCmd
npm run build
Pop-Location
Pop-Location
Push-Location "llm-info"
& cmd /c $npmInstallCmd
npm run build
Pop-Location
# Phase 3: Build packages that depend on other local packages
Push-Location "openai-adapters"
& cmd /c $npmInstallCmd
npm run build
Pop-Location
Push-Location "continue-sdk"
& cmd /c $npmInstallCmd
npm run build
Pop-Location
Pop-Location

View file

@ -1,13 +1,45 @@
# Build @continuedev packages for monorepo style linking
# Use npm ci in CI, npm install in development
if [ "$CI" = "true" ]; then
NPM_INSTALL_CMD="npm ci"
else
NPM_INSTALL_CMD="npm install"
fi
cd packages
cd openai-adapters
npm ci
# Phase 1: Build config-types (foundation - no dependencies)
cd config-types
$NPM_INSTALL_CMD
npm run build
cd ..
cd config-yaml
npm ci
# Phase 2: Build packages that depend on config-types
cd fetch
$NPM_INSTALL_CMD
npm run build
cd ..
cd config-yaml
$NPM_INSTALL_CMD
npm run build
cd ..
cd llm-info
$NPM_INSTALL_CMD
npm run build
cd ..
# Phase 3: Build packages that depend on other local packages
cd openai-adapters
rm -rf node_modules
$NPM_INSTALL_CMD
npm run build
cd ..
cd continue-sdk
rm -rf node_modules
$NPM_INSTALL_CMD
npm run build
cd ..

View file

@ -76,41 +76,8 @@ if (($null -eq $node)) {
Write-Host "`nInstalling root-level dependencies..." -ForegroundColor White
npm install
Write-Host "`nBuilding config-types..." -ForegroundColor White
Push-Location packages/config-types
npm install
npm run build
Pop-Location
Write-Host "`nBuilding fetch..." -ForegroundColor White
Push-Location packages/fetch
npm install
npm run build
Pop-Location
Write-Host "`nBuilding llm-info..." -ForegroundColor White
Push-Location packages/llm-info
npm install
npm run build
Pop-Location
Write-Host "`nBuilding config-yaml..." -ForegroundColor White
Push-Location packages/config-yaml
npm install
npm run build
Pop-Location
Write-Host "`nBuilding openai-adapters..." -ForegroundColor White
Push-Location packages/openai-adapters
npm install
npm run build
Pop-Location
Write-Host "`nBuilding hub..." -ForegroundColor White
Push-Location packages/hub
npm install
npm run build
Pop-Location
Write-Host "`nBuilding packages (fetch, openai-adapters, config-yaml)..." -ForegroundColor White
& .\scripts\build-packages.ps1
Write-Host "`nInstalling Core extension dependencies..." -ForegroundColor White
Push-Location core

View file

@ -30,41 +30,8 @@ fi
echo "Installing root-level dependencies..."
npm install
echo "Building config-types..."
pushd packages/config-types
npm install
npm run build
popd
echo "Building fetch..."
pushd packages/fetch
npm install
npm run build
popd
echo "Building llm-info..."
pushd packages/llm-info
npm install
npm run build
popd
echo "Building config-yaml..."
pushd packages/config-yaml
npm install
npm run build
popd
echo "Building openai-adapters..."
pushd packages/openai-adapters
npm install
npm run build
popd
echo "Building hub..."
pushd packages/hub
npm install
npm run build
popd
echo "Building packages (fetch, openai-adapters, config-yaml)..."
./scripts/build-packages.sh
echo "Installing Core extension dependencies..."
pushd core

View file

@ -74,6 +74,7 @@ ensure_oneper_dir() {
fi
}
install_from_pr() {
local pr_number=$1
local platform=${2:-$(detect_os)} # Auto-detect OS if not specified
@ -153,17 +154,17 @@ install_from_pr() {
exit 1
fi
# Extract version from the original VSIX filename (e.g., continue-1.1.66.vsix -> 1.1.66)
# Extract full version from the original VSIX filename (e.g., continue-1.1.66-a1b2c3d.vsix -> 1.1.66-a1b2c3d)
local original_filename=$(basename "$vsix_file")
local version=$(echo "$original_filename" | sed 's/continue-\(.*\)\.vsix/\1/')
local full_version=$(echo "$original_filename" | sed 's/continue-\(.*\)\.vsix/\1/')
if [ -z "$version" ]; then
if [ -z "$full_version" ]; then
echo "⚠️ Could not extract version from filename: $original_filename"
version="unknown"
full_version="unknown-pr${pr_number}"
fi
# Create new VSIX name with version and PR number
local target_path="$ONEPER_DIR/continue-${version}-${pr_number}.vsix"
# Use the full version (which includes commit SHA) for the target filename
local target_path="$ONEPER_DIR/continue-${full_version}.vsix"
# Check if file already exists and notify about overwrite
if [ -f "$target_path" ]; then
@ -181,6 +182,7 @@ install_from_pr() {
if code --install-extension "$target_path"; then
echo "✅ Successfully installed Continue extension from PR #$pr_number"
echo "📄 VSIX file saved to: $target_path"
echo "🔖 Extension version: ${full_version} (includes commit SHA)"
echo ""
echo "💡 To use the new extension version, reload your VS Code window:"
echo " • Press Ctrl+Shift+P (Cmd+Shift+P on Mac)"