From 880786b66fea10fa3c758f20d5ac79f64e230623 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Mon, 28 Jul 2025 08:07:06 -0700 Subject: [PATCH] Revert "feat: enhance oneper utility and refactor build system for commit SHA versioning" (#6811) --- .github/workflows/build-vscode-extension.yml | 204 ------- .github/workflows/main-build.yaml | 30 -- .github/workflows/main.yaml | 146 ++++- .github/workflows/pr_checks.yaml | 538 +++++++++++++++---- .github/workflows/preview.yaml | 151 +++++- .vscode/launch.json | 6 +- .vscode/tasks.json | 17 - core/jest.config.js | 2 +- core/llm/utils/retry.test.ts | 5 +- core/llm/utils/retry.ts | 6 +- core/package-lock.json | 69 +-- core/package.json | 4 +- extensions/vscode/package-lock.json | 79 ++- extensions/vscode/package.json | 4 +- gui/package-lock.json | 9 +- package-lock.json | 2 +- packages/config-types/src/index.ts | 2 +- packages/config-yaml/package-lock.json | 22 +- packages/config-yaml/package.json | 2 +- packages/continue-sdk/package-lock.json | 9 +- packages/continue-sdk/package.json | 3 +- packages/fetch/package-lock.json | 45 +- packages/fetch/package.json | 3 +- packages/llm-info/src/providers/gemini.ts | 6 +- packages/openai-adapters/package-lock.json | 120 ++--- packages/openai-adapters/package.json | 6 +- scripts/build-packages.ps1 | 38 +- scripts/build-packages.sh | 46 +- scripts/install-dependencies.ps1 | 37 +- scripts/install-dependencies.sh | 37 +- scripts/oneper | 14 +- 31 files changed, 945 insertions(+), 717 deletions(-) delete mode 100644 .github/workflows/build-vscode-extension.yml delete mode 100644 .github/workflows/main-build.yaml diff --git a/.github/workflows/build-vscode-extension.yml b/.github/workflows/build-vscode-extension.yml deleted file mode 100644 index fd959807e..000000000 --- a/.github/workflows/build-vscode-extension.yml +++ /dev/null @@ -1,204 +0,0 @@ -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" diff --git a/.github/workflows/main-build.yaml b/.github/workflows/main-build.yaml deleted file mode 100644 index de22d6c53..000000000 --- a/.github/workflows/main-build.yaml +++ /dev/null @@ -1,30 +0,0 @@ -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 \ No newline at end of file diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index a8abf6cb3..ce1e59e66 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -29,15 +29,44 @@ jobs: build: needs: check_release_name if: needs.check_release_name.outputs.should_run == 'true' || github.event_name == 'workflow_dispatch' - 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 + 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: @@ -51,6 +80,107 @@ 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 diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index 9733f856c..b4333890d 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -48,9 +48,12 @@ jobs: - name: Check code formatting with Prettier run: npx prettier --check "**/*.{js,jsx,ts,tsx,json,css,md}" --ignore-path .gitignore --ignore-path .prettierignore - build-packages: + install-config-yaml: needs: install-root - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] steps: - uses: actions/checkout@v4 @@ -58,11 +61,55 @@ jobs: with: node-version-file: ".nvmrc" - - name: Build packages (Unix) - run: ./scripts/build-packages.sh + - 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 config-yaml-checks: - needs: build-packages + needs: install-config-yaml runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -76,13 +123,19 @@ jobs: path: node_modules key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} - - name: Build packages and check config-yaml + - 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 run: | - ./scripts/build-packages.sh cd packages/config-yaml npx tsc --noEmit # Tests are currently failing, commenting out for now - # npm test + # npm test + npm run build install-core: needs: install-root @@ -116,7 +169,7 @@ jobs: npm ci core-checks: - needs: install-core + needs: [install-core, install-config-yaml, install-openai-adapters] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -126,21 +179,38 @@ 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') }} - - name: Build packages and install core dependencies - run: | - ./scripts/build-packages.sh - cd core - npm ci + - 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: Type check and lint run: | cd core @@ -150,7 +220,8 @@ jobs: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} install-gui: - needs: [install-root, install-core] + needs: + [install-root, install-core, install-config-yaml, install-openai-adapters] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -175,15 +246,33 @@ jobs: path: gui/node_modules key: ${{ runner.os }}-gui-node-modules-${{ hashFiles('gui/package-lock.json') }} - - name: Build packages and install dependencies + - 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: | - ./scripts/build-packages.sh - if [ "${{ steps.gui-cache.outputs.cache-hit }}" != "true" ]; then - cd core - npm ci - cd ../gui - npm ci - fi + 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 gui-checks: needs: install-gui @@ -205,17 +294,32 @@ 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') }} - - name: Build packages and install dependencies + - 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 run: | - ./scripts/build-packages.sh - cd core - npm ci - cd ../gui - npm ci + cd packages/config-yaml + npm run build + + - name: Build openai-adapters + run: | + cd packages/openai-adapters + npm run build - name: Type check and lint run: | @@ -224,7 +328,8 @@ jobs: npm run lint binary-checks: - needs: [install-root, install-core] + needs: + [install-root, install-core, install-config-yaml, install-openai-adapters] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -249,15 +354,33 @@ jobs: path: binary/node_modules key: ${{ runner.os }}-binary-node-modules-${{ hashFiles('binary/package-lock.json') }} - - name: Build packages and install dependencies + - 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: | - ./scripts/build-packages.sh - if [ "${{ steps.binary-cache.outputs.cache-hit }}" != "true" ]; then - cd core - npm ci - cd ../binary - npm ci - fi + 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 - name: Type check run: | @@ -265,7 +388,8 @@ jobs: npx tsc --noEmit install-vscode: - needs: [install-root, install-core] + needs: + [install-root, install-core, install-config-yaml, install-openai-adapters] runs-on: ${{ matrix.os }} strategy: matrix: @@ -293,15 +417,33 @@ jobs: path: extensions/vscode/node_modules key: ${{ runner.os }}-vscode-node-modules-${{ hashFiles('extensions/vscode/package-lock.json') }} - - name: Build packages and install dependencies + - 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: | - ./scripts/build-packages.sh - if [ "${{ steps.vscode-cache.outputs.cache-hit }}" != "true" ]; then - cd core - npm ci - cd ../extensions/vscode - npm ci - fi + 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 env: GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} @@ -331,15 +473,27 @@ jobs: path: extensions/vscode/node_modules key: ${{ runner.os }}-vscode-node-modules-${{ hashFiles('extensions/vscode/package-lock.json') }} - - name: Build packages and install dependencies + - 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: | - ./scripts/build-packages.sh - cd core - npm ci - cd ../extensions/vscode - npm ci - env: - GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} + cd packages/config-yaml + npm run build + + - name: Build openai-adapters + run: | + cd packages/openai-adapters + npm run build - name: Type check and lint run: | @@ -354,7 +508,7 @@ jobs: npm run vitest core-tests: - needs: install-core + needs: [install-core, install-config-yaml, install-openai-adapters] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -368,11 +522,27 @@ jobs: path: core/node_modules key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} - - name: Build packages and install core dependencies + - 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: | - ./scripts/build-packages.sh - cd core - npm ci + cd packages/config-yaml + npm run build + + - name: Build openai-adapters + run: | + cd packages/openai-adapters + npm run build - name: Run core tests run: | @@ -399,13 +569,23 @@ jobs: with: node-version-file: ".nvmrc" - - name: Build packages and run tests + - 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 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 @@ -419,9 +599,14 @@ jobs: path: node_modules key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} - - name: Build packages and run tests + - 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 run: | - ./scripts/build-packages.sh cd packages/openai-adapters npm test env: @@ -438,7 +623,7 @@ jobs: vscode-get-test-file-matrix: runs-on: ubuntu-latest - needs: [install-root, install-vscode] + needs: [install-root, install-vscode, install-config-yaml] outputs: test_file_matrix: ${{ steps.vscode-get-test-file-matrix.outputs.test_file_matrix }} steps: @@ -450,13 +635,21 @@ jobs: path: extensions/vscode/node_modules key: ${{ runner.os }}-vscode-node-modules-${{ hashFiles('extensions/vscode/package-lock.json') }} - - name: Build packages and get test files + - 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 id: vscode-get-test-file-matrix run: | - ./scripts/build-packages.sh - cd core - npm ci - cd ../extensions/vscode + cd extensions/vscode npm ci npm run e2e:compile if [[ "${{ github.event.pull_request.head.repo.fork }}" == "true" || "${{ github.actor }}" == "dependabot[bot]" ]]; then @@ -478,32 +671,78 @@ jobs: echo "Test files: ${{ steps.vscode-get-test-file-matrix.outputs.test_file_matrix }}" vscode-package-extension: - 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 + 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 vscode-download-e2e-dependencies: runs-on: ubuntu-latest - needs: [install-vscode, install-core] + needs: + [ + install-vscode, + install-core, + install-config-yaml, + install-openai-adapters, + ] steps: - uses: actions/checkout@v4 @@ -523,15 +762,22 @@ jobs: path: extensions/vscode/e2e/storage key: ${{ runner.os }}-vscode-storage-${{ hashFiles('extensions/vscode/package-lock.json') }} - - name: Build packages and download e2e dependencies + - 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: | - ./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 + 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 - name: Upload e2e dependencies uses: actions/upload-artifact@v4 @@ -548,6 +794,8 @@ 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 @@ -588,11 +836,27 @@ jobs: name: vscode-e2e-dependencies path: extensions/vscode/e2e/storage - - name: Build packages and install core dependencies + - 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: | - ./scripts/build-packages.sh - cd core - npm ci + cd packages/config-yaml + npm run build + + - name: Build openai-adapters + run: | + cd packages/openai-adapters + npm run build - name: Fix VSCode binary permissions run: | @@ -657,7 +921,8 @@ jobs: path: extensions/vscode/e2e.log gui-tests: - needs: [install-gui, install-core] + needs: + [install-gui, install-core, install-config-yaml, install-openai-adapters] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -667,6 +932,7 @@ 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') }} @@ -676,13 +942,31 @@ jobs: path: core/node_modules key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} - - name: Build packages and install dependencies + - 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: | - ./scripts/build-packages.sh - cd core - npm ci - cd ../gui - npm ci + 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 env: GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} @@ -692,7 +976,8 @@ jobs: npm test jetbrains-tests: - needs: [install-root, core-checks] + needs: + [install-root, core-checks, install-config-yaml, install-openai-adapters] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -701,11 +986,27 @@ jobs: path: core/node_modules key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} - - name: Build packages and install core dependencies + - 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: | - ./scripts/build-packages.sh - cd core - npm ci + cd packages/config-yaml + npm run build + + - name: Build openai-adapters + run: | + cd packages/openai-adapters + npm run build - name: Setup Java uses: actions/setup-java@v4.5.0 @@ -820,7 +1121,8 @@ jobs: - gui-tests - jetbrains-tests - config-yaml-checks - - build-packages + - install-config-yaml + - install-openai-adapters - openai-adapters-tests steps: diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 54d737e45..3ef4920ed 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -29,11 +29,152 @@ jobs: build: needs: check_release_name if: needs.check_release_name.outputs.should_run == 'true' || github.event_name == 'workflow_dispatch' - uses: ./.github/workflows/build-vscode-extension.yml - with: - # Uses default platforms (all supported platforms) - pre-release: true - secrets: inherit + 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" release: permissions: diff --git a/.vscode/launch.json b/.vscode/launch.json index 7d8624157..53632f8d2 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -12,13 +12,13 @@ "cwd": "${workspaceFolder}/extensions/vscode", "args": [ // Pass a directory to manually test in - "${workspaceFolder}/core", - "${workspaceFolder}/package.json", + "${workspaceFolder}/manual-testing-sandbox", + "${workspaceFolder}/manual-testing-sandbox/test.js", "--extensionDevelopmentPath=${workspaceFolder}/extensions/vscode" ], "pauseForSourceMap": false, "outFiles": ["${workspaceFolder}/extensions/vscode/out/extension.js"], - "preLaunchTask": "vscode-extension:build-with-packages", + "preLaunchTask": "vscode-extension:build", "env": { // "CONTROL_PLANE_ENV": "local", "CONTINUE_GLOBAL_DIR": "${workspaceFolder}/extensions/.continue-debug" diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 9cb87f64c..5b0636368 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -223,23 +223,6 @@ ], "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": [] } ] } diff --git a/core/jest.config.js b/core/jest.config.js index 2fcbc3c5c..e4464b264 100644 --- a/core/jest.config.js +++ b/core/jest.config.js @@ -7,7 +7,7 @@ export default { "ts-jest", { useESM: true, - isolatedModules: true, + useIsolatedModules: true, tsconfig: { experimentalDecorators: true, emitDecoratorMetadata: true, diff --git a/core/llm/utils/retry.test.ts b/core/llm/utils/retry.test.ts index 111463a0d..665e010c1 100644 --- a/core/llm/utils/retry.test.ts +++ b/core/llm/utils/retry.test.ts @@ -450,9 +450,8 @@ describe("Retry Functionality", () => { expect(result).toBe("success"); // Should be capped at maxDelay (200ms) not header value (10000ms) - // Jitter is applied before maxDelay cap, so delay should never exceed maxDelay - expect(delays[0]).toBeGreaterThanOrEqual(190); - expect(delays[0]).toBeLessThanOrEqual(200); + expect(delays[0]).toBeGreaterThan(190); + expect(delays[0]).toBeLessThan(210); }); it("should handle case-insensitive header names", async () => { diff --git a/core/llm/utils/retry.ts b/core/llm/utils/retry.ts index dce06ef5c..416851378 100644 --- a/core/llm/utils/retry.ts +++ b/core/llm/utils/retry.ts @@ -149,10 +149,10 @@ function calculateDelay( delayMs = Number(retryAfter) * 1000; } - // Apply small jitter to spread requests, then respect maxDelay as hard limit + // Respect maxDelay and add small jitter to spread requests + const cappedDelay = Math.min(delayMs, maxDelay); const jitterMultiplier = 1 + (Math.random() * 0.1 - 0.05); // Small jitter ±5% - const jitteredDelay = delayMs * jitterMultiplier; - return Math.max(0, Math.floor(Math.min(jitteredDelay, maxDelay))); + return Math.max(0, Math.floor(cappedDelay * jitterMultiplier)); } } diff --git a/core/package-lock.json b/core/package-lock.json index a864be394..d2afa4b76 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -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": "file:../packages/fetch", - "@continuedev/llm-info": "file:../packages/llm-info", + "@continuedev/fetch": "^1.0.14", + "@continuedev/llm-info": "^1.0.8", "@continuedev/openai-adapters": "file:../packages/openai-adapters", "@modelcontextprotocol/sdk": "^1.12.0", "@mozilla/readability": "^0.5.0", @@ -38,7 +38,6 @@ "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", @@ -146,7 +145,7 @@ "version": "1.0.96", "license": "Apache-2.0", "dependencies": { - "@continuedev/config-types": "file:../config-types", + "@continuedev/config-types": "^1.0.14", "yaml": "^2.6.1", "zod": "^3.24.2" }, @@ -168,44 +167,17 @@ "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.46", + "version": "1.0.45", "license": "Apache-2.0", "dependencies": { "@aws-sdk/client-bedrock-runtime": "^3.842.0", "@aws-sdk/credential-providers": "^3.840.0", - "@continuedev/config-types": "file:../config-types", - "@continuedev/config-yaml": "file:../config-yaml", - "@continuedev/fetch": "file:../fetch", + "@continuedev/config-types": "^1.0.5", + "@continuedev/config-yaml": "^1.0.51", + "@continuedev/fetch": "^1.0.15", "dotenv": "^16.5.0", - "google-auth-library": "^10.1.0", "json-schema": "^0.4.0", "node-fetch": "^3.3.2", "openai": "^4.104.0", @@ -213,20 +185,13 @@ "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": "^3.2.4" + "vitest": "^1.6.1" } }, "node_modules/@75lb/deep-merge": { @@ -2953,12 +2918,22 @@ "link": true }, "node_modules/@continuedev/fetch": { - "resolved": "../packages/fetch", - "link": true + "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" + } }, "node_modules/@continuedev/llm-info": { - "resolved": "../packages/llm-info", - "link": true + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@continuedev/llm-info/-/llm-info-1.0.8.tgz", + "integrity": "sha512-/htL7p4li3zQSwn9bXkI23WRpZNklWTPzRSSG3Fd5gvYW8cizjhlf7OzeDdKxBfi1S0lpqMm0VwHlx3KjMKLpw==" }, "node_modules/@continuedev/openai-adapters": { "resolved": "../packages/openai-adapters", diff --git a/core/package.json b/core/package.json index cebf2c189..13830d83b 100644 --- a/core/package.json +++ b/core/package.json @@ -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": "file:../packages/fetch", - "@continuedev/llm-info": "file:../packages/llm-info", + "@continuedev/fetch": "^1.0.14", + "@continuedev/llm-info": "^1.0.8", "@continuedev/openai-adapters": "file:../packages/openai-adapters", "@modelcontextprotocol/sdk": "^1.12.0", "@mozilla/readability": "^0.5.0", diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 9483160c6..8780ab1e2 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,16 +1,16 @@ { "name": "continue", - "version": "1.1.67", + "version": "1.1.63", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "1.1.67", + "version": "1.1.63", "license": "Apache-2.0", "dependencies": { - "@continuedev/config-types": "file:../../packages/config-types", - "@continuedev/fetch": "file:../../packages/fetch", + "@continuedev/config-types": "^1.0.14", + "@continuedev/fetch": "^1.0.10", "@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": "file:../packages/fetch", - "@continuedev/llm-info": "file:../packages/llm-info", + "@continuedev/fetch": "^1.0.14", + "@continuedev/llm-info": "^1.0.8", "@continuedev/openai-adapters": "file:../packages/openai-adapters", "@modelcontextprotocol/sdk": "^1.12.0", "@mozilla/readability": "^0.5.0", @@ -129,7 +129,6 @@ "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", @@ -143,7 +142,7 @@ "node-html-markdown": "^1.3.0", "ollama": "^0.4.6", "onnxruntime-node": "1.14.0", - "openai": "^4.104.0", + "openai": "^4.76.0", "p-limit": "^6.1.0", "partial-json": "^0.1.7", "pg": "^8.11.3", @@ -208,41 +207,6 @@ "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", @@ -738,12 +702,25 @@ } }, "node_modules/@continuedev/config-types": { - "resolved": "../../packages/config-types", - "link": true + "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" + } }, "node_modules/@continuedev/fetch": { - "resolved": "../../packages/fetch", - "link": true + "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" + } }, "node_modules/@electron/node-gyp": { "version": "10.2.0-electron.1", @@ -16764,6 +16741,14 @@ "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" + } } } } diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 907e84eb6..84548ae67 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -717,8 +717,8 @@ "vscode-extension-tester": "^8.14.1" }, "dependencies": { - "@continuedev/config-types": "file:../../packages/config-types", - "@continuedev/fetch": "file:../../packages/fetch", + "@continuedev/config-types": "^1.0.14", + "@continuedev/fetch": "^1.0.10", "@electron/rebuild": "^3.2.10", "@reduxjs/toolkit": "^1.9.3", "@vscode/ripgrep": "^1.15.9", diff --git a/gui/package-lock.json b/gui/package-lock.json index ce7be87e5..d611543e2 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -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": "file:../packages/fetch", - "@continuedev/llm-info": "file:../packages/llm-info", + "@continuedev/fetch": "^1.0.14", + "@continuedev/llm-info": "^1.0.8", "@continuedev/openai-adapters": "file:../packages/openai-adapters", "@modelcontextprotocol/sdk": "^1.12.0", "@mozilla/readability": "^0.5.0", @@ -140,7 +140,6 @@ "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", @@ -154,7 +153,7 @@ "node-html-markdown": "^1.3.0", "ollama": "^0.4.6", "onnxruntime-node": "1.14.0", - "openai": "^4.104.0", + "openai": "^4.76.0", "p-limit": "^6.1.0", "partial-json": "^0.1.7", "pg": "^8.11.3", @@ -224,7 +223,7 @@ "version": "1.0.96", "license": "Apache-2.0", "dependencies": { - "@continuedev/config-types": "file:../config-types", + "@continuedev/config-types": "^1.0.14", "yaml": "^2.6.1", "zod": "^3.24.2" }, diff --git a/package-lock.json b/package-lock.json index b4289d422..0a2538840 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "continue", + "name": "wt-openai-adapters-tests", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/packages/config-types/src/index.ts b/packages/config-types/src/index.ts index 11c1ca20c..fbc2d45fc 100644 --- a/packages/config-types/src/index.ts +++ b/packages/config-types/src/index.ts @@ -205,7 +205,7 @@ export type DevData = z.infer; export const siteIndexingConfigSchema = z.object({ startUrl: z.string(), - rootUrl: z.string().optional(), + // rootUrl: z.string(), title: z.string(), maxDepth: z.number().optional(), faviconUrl: z.string().optional(), diff --git a/packages/config-yaml/package-lock.json b/packages/config-yaml/package-lock.json index 0689fc256..51091ea04 100644 --- a/packages/config-yaml/package-lock.json +++ b/packages/config-yaml/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.96", "license": "Apache-2.0", "dependencies": { - "@continuedev/config-types": "file:../config-types", + "@continuedev/config-types": "^1.0.14", "yaml": "^2.6.1", "zod": "^3.24.2" }, @@ -31,18 +31,6 @@ "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", @@ -570,8 +558,12 @@ } }, "node_modules/@continuedev/config-types": { - "resolved": "../config-types", - "link": true + "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" + } }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", diff --git a/packages/config-yaml/package.json b/packages/config-yaml/package.json index ae0dd6d42..e0cb53693 100644 --- a/packages/config-yaml/package.json +++ b/packages/config-yaml/package.json @@ -23,7 +23,7 @@ "author": "Continue Dev, Inc.", "license": "Apache-2.0", "dependencies": { - "@continuedev/config-types": "file:../config-types", + "@continuedev/config-types": "^1.0.14", "yaml": "^2.6.1", "zod": "^3.24.2" }, diff --git a/packages/continue-sdk/package-lock.json b/packages/continue-sdk/package-lock.json index 7bae25f24..e95db526f 100644 --- a/packages/continue-sdk/package-lock.json +++ b/packages/continue-sdk/package-lock.json @@ -20,10 +20,10 @@ }, "../config-yaml": { "name": "@continuedev/config-yaml", - "version": "1.0.96", + "version": "1.0.88", "license": "Apache-2.0", "dependencies": { - "@continuedev/config-types": "file:../config-types", + "@continuedev/config-types": "^1.0.14", "yaml": "^2.6.1", "zod": "^3.24.2" }, @@ -31,15 +31,10 @@ "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" diff --git a/packages/continue-sdk/package.json b/packages/continue-sdk/package.json index fe08d0c05..1a450621e 100644 --- a/packages/continue-sdk/package.json +++ b/packages/continue-sdk/package.json @@ -4,7 +4,6 @@ "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", @@ -21,4 +20,4 @@ "devDependencies": { "typescript": "^5.0.0" } -} \ No newline at end of file +} diff --git a/packages/fetch/package-lock.json b/packages/fetch/package-lock.json index 09d2ca96f..b832b32fd 100644 --- a/packages/fetch/package-lock.json +++ b/packages/fetch/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.15", "license": "Apache-2.0", "dependencies": { - "@continuedev/config-types": "file:../config-types", + "@continuedev/config-types": "^1.0.5", "follow-redirects": "^1.15.6", "http-proxy-agent": "^7.0.2", "https-proxy-agent": "^7.0.5", @@ -17,25 +17,16 @@ }, "devDependencies": { "@types/follow-redirects": "^1.14.4", - "typescript": "^5.0.0", "vitest": "^3.2.0" } }, - "../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/@continuedev/config-types": { - "resolved": "../config-types", - "link": true + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@continuedev/config-types/-/config-types-1.0.5.tgz", + "integrity": "sha512-Uv3JWKmpgSo9cMhZb2hWoJgR2ezuAn3CenEziWT/5d7mddPLzvuuHgFX6aDjLVVMojS1ul0rpfAd2LGxEb6nDQ==", + "dependencies": { + "zod": "^3.23.8" + } }, "node_modules/@esbuild/aix-ppc64": { "version": "0.25.5", @@ -1359,20 +1350,6 @@ "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", @@ -1608,6 +1585,14 @@ "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" + } } } } diff --git a/packages/fetch/package.json b/packages/fetch/package.json index 28148204c..5cd0a38e4 100644 --- a/packages/fetch/package.json +++ b/packages/fetch/package.json @@ -12,7 +12,7 @@ "author": "Nate Sesti and Ty Dunn", "license": "Apache-2.0", "dependencies": { - "@continuedev/config-types": "file:../config-types", + "@continuedev/config-types": "^1.0.5", "follow-redirects": "^1.15.6", "http-proxy-agent": "^7.0.2", "https-proxy-agent": "^7.0.5", @@ -20,7 +20,6 @@ }, "devDependencies": { "@types/follow-redirects": "^1.14.4", - "typescript": "^5.0.0", "vitest": "^3.2.0" } } diff --git a/packages/llm-info/src/providers/gemini.ts b/packages/llm-info/src/providers/gemini.ts index 43eb8532b..214ad1299 100644 --- a/packages/llm-info/src/providers/gemini.ts +++ b/packages/llm-info/src/providers/gemini.ts @@ -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"], }, { diff --git a/packages/openai-adapters/package-lock.json b/packages/openai-adapters/package-lock.json index 1aec0451a..250fc80b5 100644 --- a/packages/openai-adapters/package-lock.json +++ b/packages/openai-adapters/package-lock.json @@ -11,9 +11,9 @@ "dependencies": { "@aws-sdk/client-bedrock-runtime": "^3.842.0", "@aws-sdk/credential-providers": "^3.840.0", - "@continuedev/config-types": "file:../config-types", - "@continuedev/config-yaml": "file:../config-yaml", - "@continuedev/fetch": "file:../fetch", + "@continuedev/config-types": "^1.0.5", + "@continuedev/config-yaml": "^1.0.51", + "@continuedev/fetch": "^1.0.15", "dotenv": "^16.5.0", "google-auth-library": "^10.1.0", "json-schema": "^0.4.0", @@ -39,65 +39,6 @@ "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", @@ -1392,16 +1333,36 @@ } }, "node_modules/@continuedev/config-types": { - "resolved": "../config-types", - "link": true + "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" + } }, "node_modules/@continuedev/config-yaml": { - "resolved": "../config-yaml", - "link": true + "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" + } }, "node_modules/@continuedev/fetch": { - "resolved": "../fetch", - "link": true + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/@continuedev/fetch/-/fetch-1.0.15.tgz", + "integrity": "sha512-49jLwAwAOczcFLfa2Og9+c+qxrq+Z6+p+B5BbXgHENrQIsuST1liKTXEiga5gSVAyHD+m+1Ftl4jqRq2oxMngw==", + "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" + } }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", @@ -5897,6 +5858,25 @@ "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", @@ -6323,7 +6303,6 @@ "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" @@ -13231,9 +13210,6 @@ "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" }, diff --git a/packages/openai-adapters/package.json b/packages/openai-adapters/package.json index 0065bba17..9b7517636 100644 --- a/packages/openai-adapters/package.json +++ b/packages/openai-adapters/package.json @@ -14,9 +14,9 @@ "dependencies": { "@aws-sdk/client-bedrock-runtime": "^3.842.0", "@aws-sdk/credential-providers": "^3.840.0", - "@continuedev/config-types": "file:../config-types", - "@continuedev/config-yaml": "file:../config-yaml", - "@continuedev/fetch": "file:../fetch", + "@continuedev/config-types": "^1.0.5", + "@continuedev/config-yaml": "^1.0.51", + "@continuedev/fetch": "^1.0.15", "dotenv": "^16.5.0", "google-auth-library": "^10.1.0", "json-schema": "^0.4.0", diff --git a/scripts/build-packages.ps1 b/scripts/build-packages.ps1 index 740587330..cd415b3df 100755 --- a/scripts/build-packages.ps1 +++ b/scripts/build-packages.ps1 @@ -1,43 +1,13 @@ -# Use npm ci in CI, npm install in development -if ($env:CI -eq "true") { - $npmInstallCmd = "npm ci" -} else { - $npmInstallCmd = "npm install" -} - Push-Location packages -# 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 +Push-Location "openai-adapters" +npm ci npm run build Pop-Location Push-Location "config-yaml" -& cmd /c $npmInstallCmd +npm ci npm run build 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 +Pop-Location \ No newline at end of file diff --git a/scripts/build-packages.sh b/scripts/build-packages.sh index a2390ad5a..fa6f62731 100755 --- a/scripts/build-packages.sh +++ b/scripts/build-packages.sh @@ -1,45 +1,13 @@ # 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 - -# Phase 1: Build config-types (foundation - no dependencies) -cd config-types -$NPM_INSTALL_CMD -npm run build -cd .. - -# 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 ci +npm run build + +cd .. +cd config-yaml + +npm ci npm run build -cd .. \ No newline at end of file diff --git a/scripts/install-dependencies.ps1 b/scripts/install-dependencies.ps1 index bb957b090..1e258f9fd 100644 --- a/scripts/install-dependencies.ps1 +++ b/scripts/install-dependencies.ps1 @@ -76,8 +76,41 @@ if (($null -eq $node)) { Write-Host "`nInstalling root-level dependencies..." -ForegroundColor White npm install -Write-Host "`nBuilding packages (fetch, openai-adapters, config-yaml)..." -ForegroundColor White -& .\scripts\build-packages.ps1 +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 "`nInstalling Core extension dependencies..." -ForegroundColor White Push-Location core diff --git a/scripts/install-dependencies.sh b/scripts/install-dependencies.sh index 294ce5628..3f3e54f7b 100755 --- a/scripts/install-dependencies.sh +++ b/scripts/install-dependencies.sh @@ -30,8 +30,41 @@ fi echo "Installing root-level dependencies..." npm install -echo "Building packages (fetch, openai-adapters, config-yaml)..." -./scripts/build-packages.sh +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 "Installing Core extension dependencies..." pushd core diff --git a/scripts/oneper b/scripts/oneper index 6d22fb03c..52ad8623a 100755 --- a/scripts/oneper +++ b/scripts/oneper @@ -74,7 +74,6 @@ ensure_oneper_dir() { fi } - install_from_pr() { local pr_number=$1 local platform=${2:-$(detect_os)} # Auto-detect OS if not specified @@ -154,17 +153,17 @@ install_from_pr() { exit 1 fi - # Extract full version from the original VSIX filename (e.g., continue-1.1.66-a1b2c3d.vsix -> 1.1.66-a1b2c3d) + # Extract version from the original VSIX filename (e.g., continue-1.1.66.vsix -> 1.1.66) local original_filename=$(basename "$vsix_file") - local full_version=$(echo "$original_filename" | sed 's/continue-\(.*\)\.vsix/\1/') + local version=$(echo "$original_filename" | sed 's/continue-\(.*\)\.vsix/\1/') - if [ -z "$full_version" ]; then + if [ -z "$version" ]; then echo "⚠️ Could not extract version from filename: $original_filename" - full_version="unknown-pr${pr_number}" + version="unknown" fi - # Use the full version (which includes commit SHA) for the target filename - local target_path="$ONEPER_DIR/continue-${full_version}.vsix" + # Create new VSIX name with version and PR number + local target_path="$ONEPER_DIR/continue-${version}-${pr_number}.vsix" # Check if file already exists and notify about overwrite if [ -f "$target_path" ]; then @@ -182,7 +181,6 @@ 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)"