diff --git a/.changes/extensions/vscode/0.8.62.md b/.changes/extensions/vscode/0.8.62.md new file mode 100644 index 000000000..c258fd285 --- /dev/null +++ b/.changes/extensions/vscode/0.8.62.md @@ -0,0 +1,6 @@ +## 0.8.62 - 2024-12-10 +### Added +* Tool use +* Support for Model Context Protocol +### Fixed +* hotfix: context providers no longer hidden when not in edit mode diff --git a/.changes/unreleased/Changed-20241213-091505.yaml b/.changes/unreleased/Changed-20241213-091505.yaml new file mode 100644 index 000000000..0ce6136ae --- /dev/null +++ b/.changes/unreleased/Changed-20241213-091505.yaml @@ -0,0 +1,4 @@ +project: extensions/vscode +kind: Changed +body: Improved autocomplete in untitled files +time: 2024-12-13T09:15:05.552877-08:00 diff --git a/.changes/unreleased/Fixed-20241213-091454.yaml b/.changes/unreleased/Fixed-20241213-091454.yaml new file mode 100644 index 000000000..fb8d92584 --- /dev/null +++ b/.changes/unreleased/Fixed-20241213-091454.yaml @@ -0,0 +1,4 @@ +project: extensions/vscode +kind: Fixed +body: Display more mid-line completions +time: 2024-12-13T09:14:54.808683-08:00 diff --git a/.changes/unreleased/Fixed-20241213-091519.yaml b/.changes/unreleased/Fixed-20241213-091519.yaml new file mode 100644 index 000000000..84a193224 --- /dev/null +++ b/.changes/unreleased/Fixed-20241213-091519.yaml @@ -0,0 +1,4 @@ +project: extensions/vscode +kind: Fixed +body: Restored syntax highlighting +time: 2024-12-13T09:15:19.485189-08:00 diff --git a/.changes/unreleased/Fixed-20241216-220802.yaml b/.changes/unreleased/Fixed-20241216-220802.yaml new file mode 100644 index 000000000..db8c0108f --- /dev/null +++ b/.changes/unreleased/Fixed-20241216-220802.yaml @@ -0,0 +1,4 @@ +project: extensions/vscode +kind: Fixed +body: Fix tool use bug for models that don't support tools +time: 2024-12-16T22:08:02.399772-08:00 diff --git a/.changes/unreleased/Fixed-20241216-220818.yaml b/.changes/unreleased/Fixed-20241216-220818.yaml new file mode 100644 index 000000000..b8e059181 --- /dev/null +++ b/.changes/unreleased/Fixed-20241216-220818.yaml @@ -0,0 +1,4 @@ +project: extensions/vscode +kind: Fixed +body: Autodetect mistral API key type +time: 2024-12-16T22:08:18.369444-08:00 diff --git a/.continue/prompts/core-unit-test.prompt b/.continue/prompts/core-unit-test.prompt new file mode 100644 index 000000000..42ecef7bb --- /dev/null +++ b/.continue/prompts/core-unit-test.prompt @@ -0,0 +1,41 @@ +name: Write Core Unit Test +description: Generate unit tests for core utilities +--- +Write jest tests for the provided code. +Use jest version ^29 (e.g. jest 29.7.0) + +Use best practices. Be clear and consise. +Aim for 100% code coverage where reasonable. +Multiple tests can be written, split up tests for best clarity and readability. +Only use typescript, and if the file/code is not typescript, warn the user. +IMPORTANT Use ESM to import modules, do NOT use `require` anywhere +Tests are to be described in an adjacent file with a path identical except for a `.test.ts` rather than a `.ts` file extension +Use double quotes (or backticks if needed) for strings + +The code being tested is used in IDE extensions, and it: +- accesses code workspaces through the IDE ("workspace directories") +- persists extension-related data to the the local machine of the user ("global directory"), and +- uses configuration via a `ConfigHandler`, which is stored in either the global directory (default) or accesed via a remote "control plane" using the `ControlPlaneClient` + +Jest testing setup includes +- @core/test/jest.global-setup.ts initializes a temporary global directory, which is where files that store persisted extension data live. +- @core/test/testDir.ts provides utils for creating and working with the temporary workspace directory. Use `setUpTestDir` and `tearDownTestDir` explicitly in tests that work with workspace files +- @core/test/jest.setup-after-env.ts gives tests access to node and jest globals + +@core/test/fixtures.ts provides fixtures that should be used in tests to emulate extension behavior +- import `testIde` for IDE/workspace operations +- import `testConfigHandler` for any ConfigHandler needs +- import `testControlPlaneClient` for control plane operations +- import `ideSettingsPromise` for any IdeSettings needs +- import `testLLM` for any ILLM/BaseLLM needs. Set the `completion` property to the desired completion, e.g. `testLLM.completion = "Desired completion";` + +Do NOT write tests for any files in `core/test`, only use them as helpers for testing other files. If no other files are provided, warn the user and write no tests. + +IMPORTANT: Do NOT mock the fixtures above other than using `jest.spyOn`. DO mock 3rd party modules, etc. when sensible. +Instead, generate actual mock files and data for operations +Pure mocks should only be used to emulate specific network responses/error or hard-to-duplicate errors, or to prevent long-duration tests + +Additional types can be imported from @core/index.d.ts +If any needed types, functions, constants, or classes are still not found, warn the user and do not generate tests. + +Write the comment "// Generated by continue" at the top of the generated code/file (not the filepath) \ No newline at end of file diff --git a/.continueignore b/.continueignore index 7e0d0c115..79e924012 100644 --- a/.continueignore +++ b/.continueignore @@ -4,4 +4,5 @@ docs/docs/languages .idea/ .vscode/ .archive/ -**/*.scm \ No newline at end of file +**/*.scm +**/*.diff \ No newline at end of file diff --git a/.instructions b/.continuerules similarity index 100% rename from .instructions rename to .continuerules diff --git a/.github/auto_assign.yml b/.github/auto_assign.yml new file mode 100644 index 000000000..ed05df6f9 --- /dev/null +++ b/.github/auto_assign.yml @@ -0,0 +1,10 @@ +# Reference: https://github.com/marketplace/actions/auto-assign-action +addAssignees: true + +assignees: + - sestinj + - Patrick-Erichsen + - tomasz-stefaniak + - RomneyDa + +numberOfAssignees: 2 diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 4e7157e67..5b248d5d8 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -5,12 +5,12 @@ ## Checklist - [] The relevant docs, if any, have been updated or created +- [] The relevant tests, if any, have been updated or created ## Screenshots [ For visual changes, include screenshots. ] -## Testing +## Testing instructions -[ For new or modified features, provide step-by-step testing instructions to validate the intended behavior of the change. ] -[ For new UI features, ensure that the changes look good across viewport widths, light/dark theme, etc ] +[ For new or modified features, provide step-by-step testing instructions to validate the intended behavior of the change, including any relevant tests to run. ] diff --git a/.github/workflows/auto-assign.yaml b/.github/workflows/auto-assign-issue.yaml similarity index 100% rename from .github/workflows/auto-assign.yaml rename to .github/workflows/auto-assign-issue.yaml diff --git a/.github/workflows/auto-assign-pr.yaml b/.github/workflows/auto-assign-pr.yaml new file mode 100644 index 000000000..4fd701a15 --- /dev/null +++ b/.github/workflows/auto-assign-pr.yaml @@ -0,0 +1,10 @@ +name: PR assignment +on: + pull_request: + types: [opened, ready_for_review] + +jobs: + add-reviews: + runs-on: ubuntu-latest + steps: + - uses: kentaro-m/auto-assign-action@v2.0.0 diff --git a/.github/workflows/jetbrains-release.yaml b/.github/workflows/jetbrains-release.yaml index b28e29c0c..b8c473604 100644 --- a/.github/workflows/jetbrains-release.yaml +++ b/.github/workflows/jetbrains-release.yaml @@ -406,7 +406,7 @@ jobs: # Run Qodana inspections - name: Qodana - Code Inspection - uses: JetBrains/qodana-action@v2024.1.5 + uses: JetBrains/qodana-action@v2024.3.2 with: cache-default-branch-only: true diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index b73cdb3ad..ae0359027 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -49,11 +49,11 @@ jobs: platform: alpine arch: x64 npm_config_arch: x64 - - os: macos-12 # should migrate this to the newer x64 version of macos-14 + - os: macos-13 platform: darwin arch: x64 npm_config_arch: x64 - - os: macos-12 # same here, especially + - os: macos-13 platform: darwin arch: arm64 npm_config_arch: arm64 diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index a879c3d9d..e5f44c03e 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -4,110 +4,572 @@ on: pull_request: branches: - main + paths: + - "extensions/vscode/**" + - "core/**" + - "gui/**" + - ".github/workflows/**" + + push: + branches: + - main + paths: + - "extensions/intellij/**" + - "extensions/vscode/**" + - "core/**" + - "gui/**" + - ".github/workflows/**" jobs: - tsc-check: + install-root: runs-on: ubuntu-latest - steps: - # 1. Check-out repository - - name: Check-out repository - uses: actions/checkout@v4 - - # 2. Install npm dependencies - - name: Use Node.js from .nvmrc - uses: actions/setup-node@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version-file: ".nvmrc" - - name: Cache root node_modules - uses: actions/cache@v3 + - uses: actions/cache@v4 + id: root-cache with: path: node_modules - key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} + key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} - - name: Cache extension node_modules - uses: actions/cache@v3 + - name: Install root dependencies + if: steps.root-cache.outputs.cache-hit != 'true' + run: npm ci + + install-core: + needs: install-root + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - path: extensions/vscode/node_modules - key: ${{ runner.os }}-node-${{ hashFiles('extensions/vscode/package-lock.json') }} + node-version-file: ".nvmrc" - - name: Cache core node_modules - uses: actions/cache@v3 + - 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 }}-node-${{ hashFiles('core/package-lock.json') }} + key: ${{ runner.os }}-core-node-modules-${{ 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: Cache binary node_modules - uses: actions/cache@v3 - with: - path: binary/node_modules - key: ${{ runner.os }}-node-${{ hashFiles('binary/package-lock.json') }} - - - name: root install - run: | - npm ci - - - name: extensions/vscode install - run: | - cd extensions/vscode - npm ci - env: - # https://github.com/microsoft/vscode-ripgrep/issues/9#issuecomment-643965333 - GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} - - - name: core install + - name: Install core dependencies + if: steps.core-cache.outputs.cache-hit != 'true' run: | cd core npm ci - - name: gui install - run: | - cd gui - npm ci + core-checks: + needs: install-core + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" - - name: binary install - run: | - cd binary - npm ci + - uses: actions/cache@v4 + id: root-cache + with: + path: node_modules + key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }} - - name: extensions/vscode checks - run: | - cd extensions/vscode - npx tsc --noEmit - npm run lint + - uses: actions/cache@v4 + id: core-cache + with: + path: core/node_modules + key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} - - name: core checks + - name: Type check and lint run: | cd core - npm ci npx tsc --noEmit npm run lint env: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - - name: gui checks + install-gui: + needs: [install-root, install-core] + runs-on: ubuntu-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 + with: + path: core/node_modules + 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: Install gui dependencies + if: steps.gui-cache.outputs.cache-hit != 'true' + run: | + cd gui + npm ci + + gui-checks: + needs: install-gui + runs-on: ubuntu-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 + with: + path: core/node_modules + 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: Type check run: | cd gui npx tsc --noEmit - - name: binary checks + binary-checks: + needs: [install-root, install-core] + runs-on: ubuntu-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 + with: + path: core/node_modules + key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} + + - uses: actions/cache@v4 + id: binary-cache + with: + path: binary/node_modules + key: ${{ runner.os }}-binary-node-modules-${{ hashFiles('binary/package-lock.json') }} + + - name: Install binary dependencies + if: steps.binary-cache.outputs.cache-hit != 'true' + run: | + cd binary + npm ci + + - name: Type check run: | cd binary npx tsc --noEmit + install-vscode: + needs: [install-root, install-core] + runs-on: ubuntu-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 + with: + path: core/node_modules + key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} + + - uses: actions/cache@v4 + id: vscode-cache + with: + path: extensions/vscode/node_modules + key: ${{ runner.os }}-vscode-node-modules-${{ hashFiles('extensions/vscode/package-lock.json') }} + + - 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 }} + + vscode-checks: + needs: install-vscode + runs-on: ubuntu-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 + with: + path: core/node_modules + key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} + + - uses: actions/cache@v4 + id: vscode-cache + with: + path: extensions/vscode/node_modules + key: ${{ runner.os }}-vscode-node-modules-${{ hashFiles('extensions/vscode/package-lock.json') }} + + - name: Type check and lint + run: | + cd extensions/vscode + npx tsc --noEmit + npm run lint + + core-tests: + needs: install-core + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + + - uses: actions/cache@v4 + with: + path: core/node_modules + key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} + - name: Run core tests run: | cd core npm test + vscode-get-test-file-matrix: + runs-on: ubuntu-latest + needs: [install-root, install-vscode] + outputs: + test_file_matrix: ${{ steps.vscode-get-test-file-matrix.outputs.test_file_matrix }} + steps: + - uses: actions/checkout@v4 + + - name: Cache node modules + uses: actions/cache@v3 + with: + path: extensions/vscode/node_modules + key: ${{ runner.os }}-vscode-node-modules-${{ hashFiles('extensions/vscode/package-lock.json') }} + + - name: Get test files + id: vscode-get-test-file-matrix + run: | + cd extensions/vscode + npm ci + npm run e2e:compile + FILES=$(ls -1 e2e/_output/tests/*.test.js | jq -R . | jq -s .) + echo "test_file_matrix<> $GITHUB_OUTPUT + echo "$FILES" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + + - name: Debug Outputs + run: | + echo "Test files: ${{ steps.vscode-get-test-file-matrix.outputs.test_file_matrix }}" + + vscode-package-extension: + runs-on: ubuntu-latest + needs: [install-vscode, install-core] + 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') }} + + - name: Package extension + run: | + cd extensions/vscode + npm run package + + - name: Upload build artifact + uses: actions/upload-artifact@v4 + with: + name: vscode-extension-build + path: extensions/vscode/build + + vscode-download-e2e-dependencies: + runs-on: ubuntu-latest + needs: [install-vscode, install-core] + 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: storage-cache + with: + path: extensions/vscode/e2e/storage + key: ${{ runner.os }}-vscode-storage-${{ hashFiles('extensions/vscode/package-lock.json') }} + + - 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 + with: + name: vscode-e2e-dependencies + path: extensions/vscode/e2e/storage + + vscode-e2e-tests: + name: ${{ matrix.test_file }}" + needs: + [ + vscode-download-e2e-dependencies, + vscode-get-test-file-matrix, + vscode-package-extension, + install-vscode, + install-core, + ] + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + test_file: ${{ fromJson(needs.vscode-get-test-file-matrix.outputs.test_file_matrix) }} + 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') }} + + - name: Download build artifact + uses: actions/download-artifact@v4 + with: + name: vscode-extension-build + path: extensions/vscode/build + + - name: Download e2e dependencies + uses: actions/download-artifact@v4 + with: + name: vscode-e2e-dependencies + path: extensions/vscode/e2e/storage + + - name: Fix VSCode binary permissions + run: | + chmod +x extensions/vscode/e2e/storage/VSCode-linux-x64/code + chmod +x extensions/vscode/e2e/storage/chromedriver-linux64/chromedriver + + - name: Set up SSH + env: + SSH_KEY: ${{ secrets.GH_ACTIONS_SSH_TEST_KEY_PEM }} + SSH_HOST: ${{ secrets.GH_ACTIONS_SSH_TEST_DNS_NAME }} + run: | + mkdir -p ~/.ssh + echo "$SSH_KEY" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + ssh-keyscan -H "$SSH_HOST" >> ~/.ssh/known_hosts + echo -e "Host ssh-test-container\n\tHostName $SSH_HOST\n\tUser ec2-user\n\tIdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config + + - name: Set up Xvfb + run: | + Xvfb :99 & + export DISPLAY=:99 + + - name: Run e2e tests + run: | + cd extensions/vscode + TEST_FILE="${{ matrix.test_file }}" npm run e2e:ci:run + + env: + DISPLAY: :99 + + - name: Upload e2e test screenshots + if: failure() + uses: actions/upload-artifact@v4 + with: + name: e2e-failure-screenshots + path: extensions/vscode/e2e/storage/screenshots + + gui-tests: + needs: [install-gui, install-core] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + 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') }} + + - uses: actions/cache@v4 + with: + path: core/node_modules + key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} + + - name: Install GUI dependencies + if: steps.gui-cache.outputs.cache-hit != 'true' + run: cd gui && npm ci + env: + GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} + - name: Run gui tests run: | cd gui npm test + + jetbrains-tests: + needs: [install-root, install-core] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/cache@v4 + with: + path: core/node_modules + key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} + + - name: Setup Java + uses: actions/setup-java@v4.5.0 + with: + distribution: zulu + java-version: 17 + + - name: Setup FFmpeg + uses: AnimMouse/setup-ffmpeg@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + + - name: Use Node.js from .nvmrc + uses: actions/setup-node@v4 + with: + 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') }} + + # We can shave off another minute off our CI script by finding a way to share this with vscode-tests + - name: Run prepackage script + run: | + cd extensions/vscode + npm ci + npm run prepackage + env: + # https://github.com/microsoft/vscode-ripgrep/issues/9#issuecomment-643965333 + GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} + + - uses: actions/cache@v4 + id: binary-cache + with: + path: binary/node_modules + key: ${{ runner.os }}-binary-node-modules-${{ hashFiles('binary/package-lock.json') }} + + - name: Build the binaries + run: | + cd binary + npm run build + + - name: Start test IDE + run: | + cd extensions/intellij + export DISPLAY=:99.0 + Xvfb -ac :99 -screen 0 1920x1080x24 & + sleep 10 + mkdir -p build/reports + ./gradlew runIdeForUiTests & + + - name: Wait for JB connection + uses: jtalk/url-health-check-action@v3 + with: + url: http://127.0.0.1:8082 + max-attempts: 15 + retry-delay: 5s + + - name: Run tests + run: | + cd extensions/intellij + export DISPLAY=:99.0 + ./gradlew test + + - name: Move video + if: ${{ failure() }} + run: | + cd extensions/intellij + mv video build/reports + + - name: Copy logs + if: ${{ failure() }} + run: | + cd extensions/intellij + mv build/idea-sandbox/system/log/ build/reports + + - name: Save fails report + if: ${{ failure() }} + uses: actions/upload-artifact@v4 + with: + name: jb-failure-report + path: | + ${{ github.workspace }}/extensions/intellij/build/reports diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index a65e79c7f..bd5f4b7ac 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -49,11 +49,11 @@ jobs: platform: alpine arch: x64 npm_config_arch: x64 - - os: macos-12 # should migrate this to the newer x64 version of macos-14 + - os: macos-13 platform: darwin arch: x64 npm_config_arch: x64 - - os: macos-12 # same here, especially + - os: macos-13 platform: darwin arch: arm64 npm_config_arch: arm64 diff --git a/.github/workflows/submit-github-dependency-graph.yml b/.github/workflows/submit-github-dependency-graph.yml new file mode 100644 index 000000000..c705484a9 --- /dev/null +++ b/.github/workflows/submit-github-dependency-graph.yml @@ -0,0 +1,25 @@ +name: Submit Gradle Dependency Graph For Dependabot + +on: + push: + branches: ['main'] + +permissions: + contents: write + +jobs: + dependency-submission: + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v4 + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: 17 + - name: Generate and submit dependency graph + uses: gradle/actions/dependency-submission@v4 + with: + # The gradle project is not in the root of the repository. + build-root-directory: extensions/intellij diff --git a/.github/workflows/ts-check.yaml b/.github/workflows/ts-check.yaml deleted file mode 100644 index 5f16c406c..000000000 --- a/.github/workflows/ts-check.yaml +++ /dev/null @@ -1,100 +0,0 @@ -name: TypeScript Check - -on: - pull_request: - branches: - - main - -jobs: - tsc-check: - runs-on: ubuntu-latest - - steps: - # 1. Check-out repository - - name: Check-out repository - uses: actions/checkout@v4 - - # 2. Install npm dependencies - - name: Use Node.js from .nvmrc - uses: actions/setup-node@v4 - with: - node-version-file: ".nvmrc" - - - name: Cache root node_modules - uses: actions/cache@v3 - with: - path: node_modules - key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} - - - 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: Cache binary node_modules - uses: actions/cache@v3 - with: - path: binary/node_modules - key: ${{ runner.os }}-node-${{ hashFiles('binary/package-lock.json') }} - - - name: Install Root Dependencies - run: | - npm ci - - - 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 - - - name: Install Core Dependencies - run: | - cd core - npm ci - - - name: Install Binary Dependencies - run: | - cd binary - npm ci - - - name: tsc core - run: | - cd core - npx tsc --noEmit - npm run lint - - - name: tsc extensions/vscode - run: | - cd extensions/vscode - npx tsc --noEmit - npm run lint - - - name: tsc binary - run: | - cd binary - npx tsc --noEmit - - - name: tsc gui - run: | - cd gui - npx tsc --noEmit diff --git a/.gitignore b/.gitignore index 9621811de..f331ec68c 100644 --- a/.gitignore +++ b/.gitignore @@ -135,9 +135,7 @@ cached_embeddings.pkl .ruff_cache codeql -**/.continue .DS_Store -.continue .test .tiktoken_cache @@ -153,9 +151,7 @@ continue_server.dist Icon Icon? -.continue .continuerc.json -.prompts/ .aider* notes.md @@ -170,4 +166,6 @@ extensions/intellij/.idea/** extensions/intellij/bin extensions/.continue-debug/ -*.vsix \ No newline at end of file +*.vsix + +.continuerules \ No newline at end of file diff --git a/.husky/pre-commit b/.husky/pre-commit deleted file mode 100644 index d59df2ef6..000000000 --- a/.husky/pre-commit +++ /dev/null @@ -1 +0,0 @@ -npx prettier --write . \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml index fdc392fe8..e824b9229 100644 --- a/.idea/jarRepositories.xml +++ b/.idea/jarRepositories.xml @@ -16,5 +16,10 @@