diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml
index 69be5cd7b..236575922 100644
--- a/.github/workflows/main.yaml
+++ b/.github/workflows/main.yaml
@@ -48,7 +48,6 @@ jobs:
npm_config_arch: arm64
runs-on: ${{ matrix.os }}
steps:
-
# 1. Build the Pyinstaller binary
- name: Check-out repository
uses: actions/checkout@v3
@@ -58,54 +57,63 @@ jobs:
with:
python-version: "3.10.8"
- - name: Install Pyinstaller
+ - name: Install dependencies
run: |
- pip install pyinstaller
+ python -m pip install --upgrade pip
+ pip install poetry
- name: Install Dependencies
run: |
pip install -r server/requirements.txt
- - name: Build PyInstaller Executable
- run: pyinstaller run.spec
+ # 1.25 Publish to PyPI
- # 1.5 Place the binary in extension/exe directory
- - name: Make sure extension/exe directory exists
+ - name: Configure Poetry Token
+ run: cd server && poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
+
+ - name: Bump the version
+ run: cd server && poetry version patch
+
+ - name: Build and publish the package
+ run: cd server && poetry publish --build
+
+ # 1.5 Place the binary in extensions/vscode/exe directory
+ - name: Make sure extensions/vscode/exe directory exists
run: |
- mkdir -p extension/exe
+ mkdir -p extensions/vscode/exe
- name: Copy binary to extension (non-Windows)
run: |
- cp dist/run extension/exe/run
+ cp dist/run extensions/vscode/exe/run
if: matrix.os != 'windows-latest'
- name: Copy binary to extension (Windows)
run: |
- cp dist/run.exe extension/exe/run.exe
+ cp dist/run.exe extensions/vscode/exe/run.exe
if: matrix.os == 'windows-latest'
# 1.8 Set permissions and upload binary
- name: Set permissions
run: |
- chmod 777 extension/exe/run
+ chmod 777 extensions/vscode/exe/run
- uses: actions/upload-artifact@v2
if: matrix.os == 'macos-latest' && matrix.arch == 'x64'
with:
name: macOSBinary
- path: extension/exe/run
-
+ path: extensions/vscode/exe/run
+
- uses: actions/upload-artifact@v2
if: matrix.os == 'ubuntu-20.04' && matrix.arch == 'x64' && matrix.platform == 'linux'
with:
name: LinuxBinary
- path: extension/exe/run
-
+ path: extensions/vscode/exe/run
+
- uses: actions/upload-artifact@v2
if: matrix.os == 'windows-latest' && matrix.arch == 'x64'
with:
name: WindowsBinary
- path: extension/exe/run.exe
+ path: extensions/vscode/exe/run.exe
# 2. Install npm dependencies
- name: Use Node.js 19.0.0
@@ -116,34 +124,34 @@ jobs:
- name: Cache extension node_modules
uses: actions/cache@v2
with:
- path: extension/node_modules
- key: ${{ runner.os }}-node-${{ hashFiles('extension/package-lock.json') }}
+ path: extensions/vscode/node_modules
+ key: ${{ runner.os }}-node-${{ hashFiles('extensions/vscode/package-lock.json') }}
- - name: Cache react-app node_modules
+ - name: Cache gui node_modules
uses: actions/cache@v2
with:
- path: extension/react-app/node_modules
- key: ${{ runner.os }}-node-${{ hashFiles('extension/react-app/package-lock.json') }}
+ path: gui/node_modules
+ key: ${{ runner.os }}-node-${{ hashFiles('gui/package-lock.json') }}
- name: Install extension Dependencies
run: |
- cd extension
+ cd extensions/vscode
npm ci
- name: Add a copy of continuedev to the extension
run: |
- cd extension
- cp -r ../server/continuedev continuedev
+ cd extensions/vscode
+ cp -r ../../server/continuedev continuedev
- - name: Install react-app Dependencies
+ - name: Install gui Dependencies
run: |
- cd extension/react-app
+ cd gui
npm ci --legacy-peer-deps
# 3. Run tests for the extension
- name: Prepare the extension
run: |
- cd extension
+ cd extensions/vscode
npm run prepackage
- name: Install Xvfb for Linux and run tests
@@ -151,39 +159,39 @@ jobs:
sudo apt-get install -y xvfb # Install Xvfb
Xvfb :99 & # Start Xvfb
export DISPLAY=:99 # Export the display number to the environment
- cd extension
+ cd extensions/vscode
npm run test
if: matrix.os == 'ubuntu-20.04'
- name: Run extension tests
run: |
- cd extension
+ cd extensions/vscode
npm run test
if: matrix.os != 'ubuntu-20.04'
# 3.5 If on Apple Silicon, download the binary from S3 bucket
- name: Remove existing binary
if: matrix.os == 'macos-latest' && matrix.arch == 'arm64'
- run: rm extension/exe/run
+ run: rm extensions/vscode/exe/run
- name: Download Apple Silicon Binary
if: matrix.os == 'macos-latest' && matrix.arch == 'arm64'
- run: curl -o extension/exe/run https://continue-server-binaries.s3.us-west-1.amazonaws.com/apple-silicon/run
+ run: curl -o extensions/vscode/exe/run https://continue-server-binaries.s3.us-west-1.amazonaws.com/apple-silicon/run
- name: Set permissions
run: |
- chmod -R 777 extension/exe/run
+ chmod -R 777 extensions/vscode/exe/run
# 4. Package the extension
- shell: pwsh
run: echo "target=${{ matrix.platform }}-${{ matrix.arch }}" >> $env:GITHUB_ENV
- - run: cd extension && npx vsce package --target ${{ env.target }}
+ - run: cd extensions/vscode && npx vsce package --target ${{ env.target }}
# 5. Upload the .vsix as an artifact
- uses: actions/upload-artifact@v2
with:
name: ${{ env.target }}
- path: "extension/*.vsix"
+ path: "extensions/vscode/*.vsix"
# 6. Upload continue.log as an artifact for debugging of the workflow
- name: Upload continue.log
@@ -199,7 +207,6 @@ jobs:
permissions:
contents: write
steps:
-
# 0. Setup git
- name: Checkout
uses: actions/checkout@v2
@@ -217,28 +224,28 @@ jobs:
# 2. Publish the extension to VS Code Marketplace
- run: |
- cd extension
- npx vsce publish --packagePath ../alpine-x64/*.vsix ../darwin-arm64/*.vsix ../darwin-x64/*.vsix ../linux-arm64/*.vsix ../linux-armhf/*.vsix ../linux-x64/*.vsix ../win32-ia32/*.vsix ../win32-x64/*.vsix ../win32-arm64/*.vsix
+ cd extensions/vscode
+ npx vsce publish --packagePath ../../alpine-x64/*.vsix ../../darwin-arm64/*.vsix ../../darwin-x64/*.vsix ../../linux-arm64/*.vsix ../../linux-armhf/*.vsix ../../linux-x64/*.vsix ../../win32-ia32/*.vsix ../../win32-x64/*.vsix ../../win32-arm64/*.vsix
env:
VSCE_PAT: ${{ secrets.VSCE_TOKEN }}
# 3. Publish the extension to Open VSX Registry
- name: Publish (Open VSX Registry)
run: |
- cd extension
- npx ovsx publish -p ${{ secrets.VSX_REGISTRY_TOKEN }} --packagePath ../alpine-x64/*.vsix ../darwin-arm64/*.vsix ../darwin-x64/*.vsix ../linux-arm64/*.vsix ../linux-armhf/*.vsix ../linux-x64/*.vsix ../win32-ia32/*.vsix ../win32-x64/*.vsix ../win32-arm64/*.vsix
+ cd extensions/vscode
+ npx ovsx publish -p ${{ secrets.VSX_REGISTRY_TOKEN }} --packagePath ../../alpine-x64/*.vsix ../../darwin-arm64/*.vsix ../../darwin-x64/*.vsix ../../linux-arm64/*.vsix ../../linux-armhf/*.vsix ../../linux-x64/*.vsix ../../win32-ia32/*.vsix ../../win32-x64/*.vsix ../../win32-arm64/*.vsix
# 4. Update the package.json version and push changes
- name: Update version in package.json
run: |
- cd extension
+ cd extensions/vscode
npm version patch
- name: Commit changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
- git commit -am "ci: 💚 Update package.json version [skip ci]"
+ git commit -am "ci: 🏷 Update PyPI version [skip ci]"
- name: Push changes
uses: ad-m/github-push-action@master
@@ -265,24 +272,6 @@ jobs:
name: WindowsBinary
path: exe/windows
- - name: Configure AWS Credentials
- uses: aws-actions/configure-aws-credentials@v1
- with:
- aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
- aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- aws-region: us-west-1
-
- - name: Upload binaries to S3 (continue-server-binaries)
- uses: jakejarvis/s3-sync-action@master
- with:
- args: --acl public-read --follow-symlinks
- env:
- AWS_S3_BUCKET: continue-server-binaries
- AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
- AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- AWS_REGION: "us-west-1"
- SOURCE_DIR: "exe"
-
- name: Upload binaries to S3 (s3.continue.dev)
uses: jakejarvis/s3-sync-action@master
with:
@@ -294,3 +283,13 @@ jobs:
AWS_REGION: "us-west-1"
SOURCE_DIR: "exe"
+ - name: Upload binaries to S3 (continue-server-binaries)
+ uses: jakejarvis/s3-sync-action@master
+ with:
+ args: --acl public-read --follow-symlinks
+ env:
+ AWS_S3_BUCKET: continue-server-binaries
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
+ AWS_REGION: "us-west-1"
+ SOURCE_DIR: "exe"
diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml
index ba885d06d..e299771cc 100644
--- a/.github/workflows/preview.yaml
+++ b/.github/workflows/preview.yaml
@@ -6,6 +6,48 @@ on:
- preview
jobs:
+ pypi-deployment:
+ runs-on: ubuntu-20.04
+ permissions:
+ contents: write
+ steps:
+ - name: Check out code
+ uses: actions/checkout@v2
+
+ - name: Set up Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: "3.10.8"
+
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install poetry
+
+ - name: Install project dependencies
+ run: cd server && poetry install
+
+ - name: Configure Poetry Token
+ run: cd server && poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
+
+ - name: Bump the version
+ run: cd server && poetry version patch
+
+ - name: Build and publish the package
+ run: cd server && poetry publish --build
+
+ - name: Commit changes
+ run: |
+ git config --local user.email "action@github.com"
+ git config --local user.name "GitHub Action"
+ git commit -am "ci: 🏷 Update PyPI version [skip ci]"
+
+ - name: Push changes
+ uses: ad-m/github-push-action@master
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ branch: ${{ github.ref }}
+
build:
strategy:
matrix:
@@ -65,46 +107,51 @@ jobs:
run: |
pip install -r server/requirements.txt
- - name: Build PyInstaller Executable
- run: pyinstaller run.spec
-
- # 1.5 Place the binary in extension/exe directory
- - name: Make sure extension/exe directory exists
+ - name: Install tiktoken vocab file
run: |
- mkdir -p extension/exe
+ mkdir .tiktoken_cache
+ curl -o .tiktoken_cache/9b5ad71b2ce5302211f9c61530b329a4922fc6a4 https://s3.us-west-1.amazonaws.com/s3.continue.dev/tiktoken/9b5ad71b2ce5302211f9c61530b329a4922fc6a4
+
+ - name: Build PyInstaller Executable
+ run: pyinstaller continue_server.spec
+
+ # 1.5 Place the binary in extensions/vscode/exe directory
+ - name: Make sure extensions/vscode/exe directory exists
+ run: |
+ mkdir -p extensions/vscode/exe
- name: Copy binary to extension (non-Windows)
run: |
- cp dist/run extension/exe/run
+ cp dist/continue_server extensions/vscode/exe/continue_server
if: matrix.os != 'windows-latest'
- name: Copy binary to extension (Windows)
run: |
- cp dist/run.exe extension/exe/run.exe
+ cp dist/continue_server.exe extensions/vscode/exe/continue_server.exe
if: matrix.os == 'windows-latest'
# 1.8 Set permissions and upload binary
- name: Set permissions
run: |
- chmod 777 extension/exe/run
+ chmod 777 extensions/vscode/exe/continue_server
- uses: actions/upload-artifact@v2
if: matrix.os == 'macos-latest' && matrix.arch == 'x64'
with:
name: macOSBinary
- path: extension/exe/run
-
+ path: extensions/vscode/exe/continue_server
+
- uses: actions/upload-artifact@v2
if: matrix.os == 'ubuntu-20.04' && matrix.arch == 'x64' && matrix.platform == 'linux'
with:
name: LinuxBinary
- path: extension/exe/run
-
+ path: extensions/vscode/exe/continue_server
+
- uses: actions/upload-artifact@v2
if: matrix.os == 'windows-latest' && matrix.arch == 'x64'
with:
name: WindowsBinary
- path: extension/exe/run.exe
+ path: extensions/vscode/exe/continue_server.exe
# 2. Install npm dependencies
- name: Use Node.js 19.0.0
@@ -115,34 +162,34 @@ jobs:
- name: Cache extension node_modules
uses: actions/cache@v2
with:
- path: extension/node_modules
- key: ${{ runner.os }}-node-${{ hashFiles('extension/package-lock.json') }}
+ path: extensions/vscode/node_modules
+ key: ${{ runner.os }}-node-${{ hashFiles('extensions/vscode/package-lock.json') }}
- - name: Cache react-app node_modules
+ - name: Cache gui node_modules
uses: actions/cache@v2
with:
- path: extension/react-app/node_modules
- key: ${{ runner.os }}-node-${{ hashFiles('extension/react-app/package-lock.json') }}
+ path: gui/node_modules
+ key: ${{ runner.os }}-node-${{ hashFiles('gui/package-lock.json') }}
- name: Install extension Dependencies
run: |
- cd extension
+ cd extensions/vscode
npm ci
- name: Add a copy of continuedev to the extension
run: |
- cd extension
- cp -r ../server/continuedev continuedev
+ cd extensions/vscode
+ cp -r ../../server/continuedev continuedev
- - name: Install react-app Dependencies
+ - name: Install gui Dependencies
run: |
- cd extension/react-app
+ cd gui
npm ci --legacy-peer-deps
# 3. Run tests for the extension
- name: Prepare the extension
run: |
- cd extension
+ cd extensions/vscode
npm run prepackage
- name: Install Xvfb for Linux and run tests
@@ -150,39 +197,39 @@ jobs:
sudo apt-get install -y xvfb # Install Xvfb
Xvfb :99 & # Start Xvfb
export DISPLAY=:99 # Export the display number to the environment
- cd extension
+ cd extensions/vscode
npm run test
if: matrix.os == 'ubuntu-20.04'
- name: Run extension tests
run: |
- cd extension
+ cd extensions/vscode
npm run test
if: matrix.os != 'ubuntu-20.04'
# 3.5 If on Apple Silicon, download the binary from S3 bucket
- name: Remove existing binary
if: matrix.os == 'macos-latest' && matrix.arch == 'arm64'
- run: rm extension/exe/run
+ run: rm extensions/vscode/exe/continue_server
- name: Download Apple Silicon Binary
if: matrix.os == 'macos-latest' && matrix.arch == 'arm64'
- run: curl -o extension/exe/run https://continue-server-binaries.s3.us-west-1.amazonaws.com/apple-silicon/run
+ run: curl -o extensions/vscode/exe/continue_server https://continue-server-binaries.s3.us-west-1.amazonaws.com/apple-silicon/continue_server
- name: Set permissions
run: |
- chmod -R 777 extension/exe/run
+ chmod -R 777 extensions/vscode/exe/continue_server
# 4. Package the extension
- shell: pwsh
run: echo "target=${{ matrix.platform }}-${{ matrix.arch }}" >> $env:GITHUB_ENV
- - run: cd extension && npx vsce package --pre-release --target ${{ env.target }}
+ - run: cd extensions/vscode && npx vsce package --pre-release --target ${{ env.target }}
# 5. Upload the .vsix as an artifact
- uses: actions/upload-artifact@v2
with:
name: ${{ env.target }}
- path: "extension/*.vsix"
+ path: "extensions/vscode/*.vsix"
# 6. Upload continue.log as an artifact for debugging of the workflow
- name: Upload continue.log
@@ -215,21 +262,21 @@ jobs:
# 2. Publish the extension to VS Code Marketplace
- run: |
- cd extension
- npx vsce publish --pre-release --packagePath ../alpine-x64/*.vsix ../darwin-arm64/*.vsix ../darwin-x64/*.vsix ../linux-arm64/*.vsix ../linux-armhf/*.vsix ../linux-x64/*.vsix ../win32-ia32/*.vsix ../win32-x64/*.vsix ../win32-arm64/*.vsix
+ cd extensions/vscode
+ npx vsce publish --pre-release --packagePath ../../alpine-x64/*.vsix ../../darwin-arm64/*.vsix ../../darwin-x64/*.vsix ../../linux-arm64/*.vsix ../../linux-armhf/*.vsix ../../linux-x64/*.vsix ../../win32-ia32/*.vsix ../../win32-x64/*.vsix ../../win32-arm64/*.vsix
env:
VSCE_PAT: ${{ secrets.VSCE_TOKEN }}
# 3. Publish the extension to Open VSX Registry
- name: Publish (Open VSX Registry)
run: |
- cd extension
- npx ovsx publish --pre-release -p ${{ secrets.VSX_REGISTRY_TOKEN }} --packagePath ../alpine-x64/*.vsix ../darwin-arm64/*.vsix ../darwin-x64/*.vsix ../linux-arm64/*.vsix ../linux-armhf/*.vsix ../linux-x64/*.vsix ../win32-ia32/*.vsix ../win32-x64/*.vsix ../win32-arm64/*.vsix
+ cd extensions/vscode
+ npx ovsx publish --pre-release -p ${{ secrets.VSX_REGISTRY_TOKEN }} --packagePath ../../alpine-x64/*.vsix ../../darwin-arm64/*.vsix ../../darwin-x64/*.vsix ../../linux-arm64/*.vsix ../../linux-armhf/*.vsix ../../linux-x64/*.vsix ../../win32-ia32/*.vsix ../../win32-x64/*.vsix ../../win32-arm64/*.vsix
# 4. Update the package.json version and push changes
- name: Update version in package.json
run: |
- cd extension
+ cd extensions/vscode
npm version patch
- name: Commit changes
@@ -242,4 +289,45 @@ jobs:
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- branch: ${{ github.ref }}
\ No newline at end of file
+ branch: ${{ github.ref }}
+
+ # 5. Download binaries and upload to S3
+ - name: Download Linux build
+ uses: actions/download-artifact@v2
+ with:
+ name: LinuxBinary
+ path: exe/linux
+
+ - name: Download macOS build
+ uses: actions/download-artifact@v2
+ with:
+ name: macOSBinary
+ path: exe/mac
+
+ - name: Download Windows build
+ uses: actions/download-artifact@v2
+ with:
+ name: WindowsBinary
+ path: exe/windows
+
+ - name: Upload binaries to S3 (s3.continue.dev)
+ uses: jakejarvis/s3-sync-action@master
+ with:
+ args: --acl public-read --follow-symlinks
+ env:
+ AWS_S3_BUCKET: s3.continue.dev
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
+ AWS_REGION: "us-west-1"
+ SOURCE_DIR: "exe"
+
+ - name: Upload binaries to S3 (continue-server-binaries)
+ uses: jakejarvis/s3-sync-action@master
+ with:
+ args: --acl public-read --follow-symlinks
+ env:
+ AWS_S3_BUCKET: continue-server-binaries
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
+ AWS_REGION: "us-west-1"
+ SOURCE_DIR: "exe"
diff --git a/.gitignore b/.gitignore
index 40f391974..dcd693aca 100644
--- a/.gitignore
+++ b/.gitignore
@@ -141,5 +141,9 @@ codeql
.test
.tiktoken_cache
-.idea
-intellij-extension/.gradle
\ No newline at end of file
+
+# IntelliJ Plugin
+**/**/.gradle
+**/**/.idea
+**/**/.qodana
+**/**/build
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 36ecd4580..77ced5f73 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -13,9 +13,28 @@
"name": "Server + Tests (VSCode)",
"stopAll": true,
"configurations": ["Server", "Tests (VSCode)"]
+ },
+ {
+ "name": "Server + React App",
+ "stopAll": true,
+ "configurations": ["Server", "Vite"]
}
],
"configurations": [
+ {
+ "type": "chrome",
+ "request": "attach",
+ "name": "Vite",
+ "url": "http://localhost:5173",
+ "webRoot": "${workspaceFolder}/gui/src",
+ "sourceMapPathOverrides": {
+ "webpack:///./src/*": "${webRoot}/*"
+ },
+ "port": 9222,
+ // "runtimeArgs": ["--remote-debugging-port=9222"],
+ "sourceMaps": true,
+ "preLaunchTask": "gui:dev"
+ },
{
"name": "Pytest",
"type": "python",
@@ -61,14 +80,14 @@
"name": "Extension (VSCode)",
"type": "extensionHost",
"request": "launch",
- "cwd": "${workspaceFolder}/extension",
+ "cwd": "${workspaceFolder}/extensions/vscode",
"args": [
// Pass a directory to manually test in
- "${workspaceFolder}/extension/manual-testing-sandbox",
- "${workspaceFolder}/extension/manual-testing-sandbox/example.ts",
- "--extensionDevelopmentPath=${workspaceFolder}/extension"
+ "${workspaceFolder}/extensions/vscode/manual-testing-sandbox",
+ "${workspaceFolder}/extensions/vscode/manual-testing-sandbox/example.ts",
+ "--extensionDevelopmentPath=${workspaceFolder}/extensions/vscode"
],
- "outFiles": ["${workspaceFolder}/extension/out/**/*.js"],
+ "outFiles": ["${workspaceFolder}/extensions/vscode/out/**/*.js"],
"preLaunchTask": "vscode-extension:build",
"env": {
"CONTINUE_SERVER_URL": "http://localhost:8001"
@@ -79,19 +98,19 @@
"name": "Tests (VSCode)",
"type": "extensionHost",
"request": "launch",
- "cwd": "${workspaceFolder}/extension",
+ "cwd": "${workspaceFolder}/extensions/vscode",
"runtimeExecutable": "${execPath}",
"args": [
// Pass a directory to run tests in
- "${workspaceFolder}/extension/manual-testing-sandbox",
- "--extensionDevelopmentPath=${workspaceFolder}/extension",
- "--extensionTestsPath=${workspaceFolder}/extension/out/test-runner/mochaRunner"
+ "${workspaceFolder}/extensions/vscode/manual-testing-sandbox",
+ "--extensionDevelopmentPath=${workspaceFolder}/extensions/vscode",
+ "--extensionTestsPath=${workspaceFolder}/extensions/vscode/out/test-runner/mochaRunner"
],
"outFiles": [
// Allows setting breakpoints in test suites across the /src folder
- "${workspaceFolder}/extension/out/test-suites/**/*.js",
+ "${workspaceFolder}/extensions/vscode/out/test-suites/**/*.js",
// Allows setting breakpoints in mocha test runner file
- "${workspaceFolder}/extension/out/test-runner/**/*.js"
+ "${workspaceFolder}/extensions/vscode/out/test-runner/**/*.js"
],
"internalConsoleOptions": "openOnSessionStart",
"preLaunchTask": "vscode-extension:tests:build",
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index 1a29668b5..7210d7d62 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -1,110 +1,118 @@
{
- "version": "2.0.0",
- "tasks": [
- // Compile and bundle the extension
+ "version": "2.0.0",
+ "tasks": [
+ // Compile and bundle the extension
+ {
+ "label": "vscode-extension:build",
+ "dependsOn": [
+ // To detect compile errors
+ "vscode-extension:tsc",
+ // To build the React app that is used in the extension
+ "vscode-extension:continue-ui:build",
+ // To bundle the code the same way we do for publishing
+ "vscode-extension:esbuild"
+ ],
+ "group": {
+ "kind": "build",
+ "isDefault": true
+ }
+ },
+ {
+ "label": "vscode-extension:esbuild",
+ "type": "npm",
+ "script": "esbuild",
+ "path": "extensions/vscode",
+ "problemMatcher": [
{
- "label": "vscode-extension:build",
- "dependsOn": [
- // To detect compile errors
- "vscode-extension:tsc",
- // To build the react-app that is used in the extension
- "vscode-extension:continue-ui:build",
- // To bundle the code the same way we do for publishing
- "vscode-extension:esbuild"
- ],
- "group": {
- "kind": "build",
- "isDefault": true
+ "pattern": [
+ {
+ "regexp": "> (.*?):([0-9]+):([0-9]+): (warning|error): (.+)$",
+ "file": 1,
+ "line": 2,
+ "column": 3,
+ "severity": 4,
+ "message": 5
}
- },
+ ]
+ }
+ ]
+ },
+ // Tsc currently errors out due to testing setup issues, will be resolved in a different PR
+ // This will be useful for preventing debugging if there are compile errors
+ {
+ "label": "vscode-extension:tsc",
+ "type": "npm",
+ "script": "tsc",
+ "path": "extensions/vscode",
+ "problemMatcher": ["$tsc"],
+ "presentation": {
+ "revealProblems": "onProblem",
+ "clear": true
+ }
+ },
+ // Build the React app. It gets bundled into the extension as a file resource and has a seprate build step
+ {
+ "label": "vscode-extension:continue-ui:build",
+ "type": "shell",
+ "command": "node",
+ "args": ["${workspaceFolder}/extensions/vscode/scripts/prepackage.js"],
+ "problemMatcher": ["$tsc"],
+ "presentation": {
+ "revealProblems": "onProblem",
+ "clear": true
+ }
+ },
+ //
+ // Compile and bundle tests
+ {
+ "label": "vscode-extension:tests:build",
+ "dependsOn": [
+ // Build the extension
+ "vscode-extension:build",
+ // To detect compile errors - this type checks both the extension and the tests
+ "vscode-extension:tsc",
+ "vscode-extension:tests:esbuild"
+ ]
+ },
+ {
+ "label": "vscode-extension:tests:esbuild",
+ "type": "npm",
+ "script": "build-test",
+ "path": "extensions/vscode",
+ "problemMatcher": [
{
- "label": "vscode-extension:esbuild",
- "type": "npm",
- "script": "esbuild",
- "path": "extension",
- "problemMatcher": [
- {
- "pattern": [
- {
- "regexp": "> (.*?):([0-9]+):([0-9]+): (warning|error): (.+)$",
- "file": 1,
- "line": 2,
- "column": 3,
- "severity": 4,
- "message": 5
- }
- ],
- }
- ],
- },
- // Tsc currently errors out due to testing setup issues, will be resolved in a different PR
- // This will be useful for preventing debugging if there are compile errors
- {
- "label": "vscode-extension:tsc",
- "type": "npm",
- "script": "tsc",
- "path": "extension",
- "problemMatcher": [
- "$tsc"
- ],
- "presentation": {
- "revealProblems": "onProblem",
- "clear": true,
- },
- },
- // Build the react-app. It gets bundled into the extension as a file resource and has a seprate build step
- {
- "label": "vscode-extension:continue-ui:build",
- "type": "npm",
- "script": "build",
- "path": "extension/react-app",
- "problemMatcher": [
- "$tsc"
- ],
- "presentation": {
- "revealProblems": "onProblem",
- "clear": true,
- },
- },
- //
- // Compile and bundle tests
- {
- "label": "vscode-extension:tests:build",
- "dependsOn": [
- // Build the extension
- "vscode-extension:build",
- // To detect compile errors - this type checks both the extension and the tests
- "vscode-extension:tsc",
- "vscode-extension:tests:esbuild"
- ],
- },
- {
- "label": "vscode-extension:tests:esbuild",
- "type": "npm",
- "script": "build-test",
- "path": "extension",
- "problemMatcher": [
- {
- "pattern": [
- {
- "regexp": "> (.*?):([0-9]+):([0-9]+): (warning|error): (.+)$",
- "file": 1,
- "line": 2,
- "column": 3,
- "severity": 4,
- "message": 5
- }
- ]
- }
- ]
- },
- //
- // Install or update all dependencies for all projects in the monrepo
- {
- "label": "install-all-dependencies",
- "type": "shell",
- "command": "./install-dependencies.sh",
- "problemMatcher": [], // Empty so users are not promted to select progress reporting
- },
- ]
-}
\ No newline at end of file
+ "pattern": [
+ {
+ "regexp": "> (.*?):([0-9]+):([0-9]+): (warning|error): (.+)$",
+ "file": 1,
+ "line": 2,
+ "column": 3,
+ "severity": 4,
+ "message": 5
+ }
+ ]
+ }
+ ]
+ },
+ //
+ // Install or update all dependencies for all projects in the monrepo
+ {
+ "label": "install-all-dependencies",
+ "type": "shell",
+ "command": "./install-dependencies.sh",
+ "problemMatcher": [] // Empty so users are not promted to select progress reporting
+ },
+ //
+ // Start the React App for debugging with Vite
+ {
+ "label": "gui:dev",
+ "type": "shell",
+ "command": "npm",
+ "options": {
+ "cwd": "gui"
+ },
+ "args": ["run", "dev"],
+ "isBackground": true
+ }
+ ]
+}
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index b3d5cfad7..82ddb9ed1 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -95,7 +95,7 @@ Continue consists of 3 components, designed so that Continue can easily be exten
1. **Continue Server** - The Continue Server is responsible for keeping state, running the autopilot loop which takes actions, and communicating between the IDE and GUI.
-2. **Continue IDE Client** - The Continue IDE Client is a plugin for the IDE which implements the Continue IDE Protocol. This allows the server to request actions to be taken within the IDE, for example if `sdk.ide.setFileOpen("main.py")` is called on the server, it will communicate over websocketes with the IDE, which will open the file `main.py`. The first IDE Client we have built is for VS Code, but we plan to build clients for other IDEs in the future. The IDE Client must 1. implement the websockets protocol, as is done [here](./extension/src/continueIdeClient.ts) for VS Code and 2. launch the Continue Server, like [here](./extension/src/activation/environmentSetup.ts), and 3. display the Continue GUI in a sidebar, like [here](./extension/src/debugPanel.ts).
+2. **Continue IDE Client** - The Continue IDE Client is a plugin for the IDE which implements the Continue IDE Protocol. This allows the server to request actions to be taken within the IDE, for example if `sdk.ide.setFileOpen("main.py")` is called on the server, it will communicate over websocketes with the IDE, which will open the file `main.py`. The first IDE Client we have built is for VS Code, but we plan to build clients for other IDEs in the future. The IDE Client must 1. implement the websockets protocol, as is done [here](./extensions/vscode/src/continueIdeClient.ts) for VS Code and 2. launch the Continue Server, like [here](./extensions/vscode/src/activation/environmentSetup.ts), and 3. display the Continue GUI in a sidebar, like [here](./extensions/vscode/src/debugPanel.ts).
3. **Continue GUI** - The Continue GUI is a React application that gives the user control over Continue. It displays the history of Steps, shows what context is included in the current Step, and lets the users enter natural language or slash commands to initiate new Steps. The GUI communicates with the Continue Server over its own websocket connection
@@ -105,7 +105,7 @@ It is important that the IDE Client and GUI never communicate except when the ID
### Continue VS Code Client
-The starting point for the VS Code extension is [activate.ts](./extension/src/activation/activate.ts). The `activateExtension` function here will:
+The starting point for the VS Code extension is [activate.ts](./extensions/vscode/src/activation/activate.ts). The `activateExtension` function here will:
1. Check whether the current version of the extension is up-to-date and, if not, display a notification
@@ -119,11 +119,11 @@ The JetBrains extension is currently in alpha testing. Please reach out on [Disc
### Continue IDE Websockets Protocol
-On the IDE side, this is implemented in [continueIdeClient.ts](./extension/src/continueIdeClient.ts). On the server side, this is implemented in [ide.py](./server/continuedev/server/ide.py). You can see [ide_protocol.py](./server/continuedev/server/ide_protocol.py) for the protocol definition.
+On the IDE side, this is implemented in [continueIdeClient.ts](./extensions/vscode/src/continueIdeClient.ts). On the server side, this is implemented in [ide.py](./continuedev/src/continuedev/server/ide.py). You can see [ide_protocol.py](./continuedev/src/continuedev/server/ide_protocol.py) for the protocol definition.
### Continue GUI Websockets Protocol
-On the GUI side, this is implemented in [ContinueGUIClientProtocol.ts](./extension/react-app/src/hooks/ContinueGUIClientProtocol.ts). On the server side, this is implemented in [gui.py](./continuedev/src/continuedev/server/gui.py). You can see [AbstractContinueGUIClientProtocol.ts](./extension/react-app/src/hooks/AbstractContinueGUIClientProtocol.ts) for the protocol definition.
+On the GUI side, this is implemented in [ContinueGUIClientProtocol.ts](./gui/src/hooks/ContinueGUIClientProtocol.ts). On the server side, this is implemented in [gui.py](./continuedev/src/continuedev/server/gui.py). You can see [gui_protocol.py](./continuedev/src/continuedev/server/gui_protocol.py) or [AbstractContinueGUIClientProtocol.ts](./gui/src/hooks/AbstractContinueGUIClientProtocol.ts) for the protocol definition.
When state is updated on the server, we currently send the entirety of the object over websockets to the GUI. This will of course have to be improved soon. The state object, `FullState`, is defined in [core/main.py](./server/continuedev/core/main.py) and includes:
diff --git a/README.md b/README.md
index 467c11517..6b7cf1491 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,6 @@
> 🎁 **New! [Try out the new JetBrains extension (Alpha)](https://plugins.jetbrains.com/plugin/22707-continue-extension)**
-Interested in a 1-on-1, 15-minute introduction to Continue? Fill out [this form](https://forms.gle/rfpDfqcUtUPDQkiu9) and we'll help you get set up.
-
-
+
Continue
@@ -26,7 +24,7 @@ Interested in a 1-on-1, 15-minute introduction to Continue? Fill out [this form]
-
+
diff --git a/analyze_binary.py b/analyze_binary.py
deleted file mode 100644
index 4fc1c7110..000000000
--- a/analyze_binary.py
+++ /dev/null
@@ -1,27 +0,0 @@
-from collections import defaultdict
-
-# Initialize a dictionary to store the sizes of the folders
-folder_sizes = defaultdict(int)
-
-# Parse the file
-with open(
- "archive_contents.txt", "r"
-) as f: # replace 'file.txt' with your file name
- for line in f:
- parts = line.split(",")
- if len(parts) < 2:
- continue
- size = int(parts[1].strip()) # get the size
- path = parts[-1].strip() # get the path
-
- # Split the path into its components and accumulate the sizes for each folder
- path_parts = path.split("/")
- top_level = path_parts[0]
- folder_sizes[top_level] += size
-
-# Sort the folders by size in descending order
-sorted_folders = sorted(folder_sizes.items(), key=lambda x: x[1], reverse=True)
-
-# Print the sorted folders and their sizes
-for folder, size in sorted_folders:
- print(f"{folder}: {size}")
diff --git a/build.cmd b/build.cmd
index cedfc7696..7e3128c58 100644
--- a/build.cmd
+++ b/build.cmd
@@ -16,7 +16,7 @@ pip install -r server\requirements.txt
pip install pyinstaller
REM 4. Call PyInstaller from within the virtual environment
-env\Scripts\pyinstaller run.spec
+env\Scripts\pyinstaller continue_server.spec
REM 5. Deactivate the virtual environment
call env\Scripts\deactivate.bat
diff --git a/build.sh b/build.sh
index 6b811ddb4..98c5131c0 100755
--- a/build.sh
+++ b/build.sh
@@ -15,27 +15,26 @@ pip install -r server/requirements.txt
pip install pyinstaller
# 4. Detect M1 architecture or allow manual override
+USE_ARCH="intel"
if [ "$1" = "m1" ]; then
echo "Building for M1 architecture"
- SPEC_FILE="run.m1.spec"
+ USE_ARCH="m1"
elif [ "$1" = "regular" ]; then
echo "Building for regular architecture"
- SPEC_FILE="run.spec"
+ USE_ARCH="intel"
else
ARCH=$(uname -m)
if [ "$ARCH" = "arm64" ]; then
echo "$ARCH architecture detected, using M1 spec file"
- SPEC_FILE="run.m1.spec"
+ USE_ARCH="m1"
else
echo "$ARCH architecture detected, using regular spec file"
- SPEC_FILE="run.spec"
+ USE_ARCH="intel"
fi
fi
-echo "Using $SPEC_FILE"
-
# 5. Call PyInstaller from within the virtual environment
-env/bin/pyinstaller $SPEC_FILE
+env/bin/pyinstaller continue_server.spec -- --arch $USE_ARCH
# 6. Deactivate the virtual environment
deactivate
diff --git a/run.py b/continue_server.py
similarity index 100%
rename from run.py
rename to continue_server.py
diff --git a/continue_server.spec b/continue_server.spec
new file mode 100644
index 000000000..f160f131e
--- /dev/null
+++ b/continue_server.spec
@@ -0,0 +1,125 @@
+# -*- mode: python ; coding: utf-8 -*-
+import certifi
+import os
+import sys
+from PyInstaller.utils.hooks import copy_metadata
+import argparse
+
+parser = argparse.ArgumentParser()
+parser.add_argument("--arch", type=str)
+parser.add_argument("--dir", type=bool, default=False)
+options = parser.parse_args()
+
+block_cipher = None
+
+import subprocess
+def find_package_location(package_name):
+ try:
+ # Run the 'pip show' command and capture its output
+ result = subprocess.run(['pip', 'show', package_name], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, check=True)
+ output = result.stdout
+
+ # Split the output into lines and find the 'Location' field
+ for line in output.splitlines():
+ if line.startswith('Location:'):
+ # Extract the path after the 'Location:' prefix
+ location = line.split(':', 1)[1].strip()
+ return location
+
+ except subprocess.CalledProcessError as e:
+ print(f"Error: {e.stderr}")
+
+ return None
+
+chroma_path = find_package_location('chromadb')
+chroma_toc = list(map(lambda x: (x[1], os.path.dirname(x[0])), Tree(f'{chroma_path}/chromadb/migrations', prefix="chromadb/migrations")))
+
+tsl_path = find_package_location('tree_sitter_languages')
+tsl_filename = "languages.dll" if sys.platform == "win32" else "languages.so"
+
+a = Analysis(
+ ['continue_server.py'],
+ pathex=[],
+ binaries=[(os.path.join(tsl_path, 'tree_sitter_languages', tsl_filename), "tree_sitter_languages")],
+ datas=[
+ ('server/continuedev', 'continuedev'),
+ (certifi.where(), 'ca_bundle'),
+ ('.tiktoken_cache', 'tiktoken_cache'),
+ ] + copy_metadata('replicate') + chroma_toc,
+ hiddenimports=[
+ 'anthropic', 'github', 'ripgrepy', 'bs4', 'redbaron', 'tree_sitter', 'tree_sitter_languages',
+ 'chromadb', 'onnxruntime',
+ 'chromadb.telemetry.posthog',
+ 'chromadb.api.segment', 'chromadb.db.impl',
+ 'chromadb.db.impl.sqlite', 'chromadb.migrations',
+ 'chromadb.migrations.embeddings_queue', 'chromadb.migrations.sysdb',
+ 'chromadb.migrations.metadb', 'chromadb.segment.impl',
+ 'chromadb.segment.impl.manager', 'chromadb.segment.impl.manager.local',
+ 'chromadb.segment.impl.metadata', 'chromadb.segment.impl.metadata.sqlite'
+ ],
+ hookspath=[],
+ hooksconfig={},
+ runtime_hooks=[],
+ excludes=[],
+ win_no_prefer_redirects=False,
+ win_private_assemblies=False,
+ cipher=block_cipher,
+ noarchive=False,
+)
+pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
+
+
+target_arch = "arm64" if options.arch == "m1" else None
+print("Using target arch", target_arch)
+
+if options.dir:
+ print("Using directory")
+ exe = EXE(
+ pyz,
+ a.scripts,
+ exclude_binaries=True,
+ name='continue_server',
+ debug=False,
+ bootloader_ignore_signals=False,
+ strip=False,
+ upx=True,
+ upx_exclude=[],
+ runtime_tmpdir=None,
+ console=True,
+ disable_windowed_traceback=False,
+ argv_emulation=False,
+ target_arch=target_arch,
+ codesign_identity=None,
+ entitlements_file=None,
+ )
+
+ coll = COLLECT(
+ exe,
+ a.binaries,
+ a.datas,
+ name='continue_server',
+ )
+
+else:
+ print("Using one file")
+ exe = EXE(
+ pyz,
+ a.scripts,
+ a.binaries,
+ a.zipfiles,
+ a.datas,
+ [],
+ name='continue_server',
+ debug=False,
+ bootloader_ignore_signals=False,
+ strip=False,
+ upx=True,
+ upx_exclude=[],
+ runtime_tmpdir=None,
+ console=True,
+ disable_windowed_traceback=False,
+ argv_emulation=False,
+ target_arch=None,
+ codesign_identity=None,
+ entitlements_file=None,
+ )
\ No newline at end of file
diff --git a/docs/docs/how-continue-works.md b/docs/docs/how-continue-works.md
index f33a5622c..b2cb93ac0 100644
--- a/docs/docs/how-continue-works.md
+++ b/docs/docs/how-continue-works.md
@@ -37,9 +37,9 @@ You can install it from the JetBrains Marketplace [here](https://plugins.jetbrai
Here is how you can get started with adding Continue to a new IDE:
1. Let us know that you would like to add Continue to a new IDE by opening an issue [here](https://github.com/continuedev/continue/issues/new/choose)
-2. Implement a class that maps each of the actions like "read file" to the API provided by that IDE like [here](https://github.com/continuedev/continue/blob/main/extension/src/continueIdeClient.ts)
+2. Implement a class that maps each of the actions like "read file" to the API provided by that IDE like [here](https://github.com/continuedev/continue/blob/main/extensions/vscode/src/continueIdeClient.ts)
3. Learn more about what you might also do by looking at this pull request that added initial support for JetBrains [here](https://github.com/continuedev/continue/pull/457)
## Running the server manually
-If you would like to run the Continue server manually, rather than allowing the IDE to automatically set it up, you can follow the short tutorial for [Manually Running Continue](./walkthroughs/manually-run-continue.md).
\ No newline at end of file
+If you would like to run the Continue server manually, rather than allowing the IDE to automatically set it up, you can follow the short tutorial for [Manually Running Continue](./walkthroughs/manually-run-continue.md).
diff --git a/docs/docs/reference/Context Providers/diffcontextprovider.md b/docs/docs/reference/Context Providers/diffcontextprovider.md
index 7f26168cf..9848b03d6 100644
--- a/docs/docs/reference/Context Providers/diffcontextprovider.md
+++ b/docs/docs/reference/Context Providers/diffcontextprovider.md
@@ -10,7 +10,6 @@ Type '@diff' to reference all of the changes you've made to your current branch.
-
### Inherited Properties
diff --git a/docs/docs/reference/Context Providers/filecontextprovider.md b/docs/docs/reference/Context Providers/filecontextprovider.md
index f39ed8a83..bea188a66 100644
--- a/docs/docs/reference/Context Providers/filecontextprovider.md
+++ b/docs/docs/reference/Context Providers/filecontextprovider.md
@@ -8,8 +8,6 @@ The FileContextProvider is a ContextProvider that allows you to search files in
## Properties
-
-
### Inherited Properties
diff --git a/docs/docs/reference/Context Providers/filetreecontextprovider.md b/docs/docs/reference/Context Providers/filetreecontextprovider.md
index 2253788fe..7790b1c1c 100644
--- a/docs/docs/reference/Context Providers/filetreecontextprovider.md
+++ b/docs/docs/reference/Context Providers/filetreecontextprovider.md
@@ -10,7 +10,6 @@ Type '@tree' to reference the contents of your current workspace. The LLM will b
-
### Inherited Properties
diff --git a/docs/docs/reference/Context Providers/githubissuescontextprovider.md b/docs/docs/reference/Context Providers/githubissuescontextprovider.md
index 14ccd0314..6e10b3c84 100644
--- a/docs/docs/reference/Context Providers/githubissuescontextprovider.md
+++ b/docs/docs/reference/Context Providers/githubissuescontextprovider.md
@@ -11,7 +11,6 @@ The GitHubIssuesContextProvider is a ContextProvider that allows you to search G
-
### Inherited Properties
diff --git a/docs/docs/reference/Context Providers/googlecontextprovider.md b/docs/docs/reference/Context Providers/googlecontextprovider.md
index bbb1ea294..fffe72d89 100644
--- a/docs/docs/reference/Context Providers/googlecontextprovider.md
+++ b/docs/docs/reference/Context Providers/googlecontextprovider.md
@@ -10,7 +10,6 @@ Type '@google' to reference the results of a Google search. For example, type "@
-
### Inherited Properties
diff --git a/docs/docs/reference/Context Providers/searchcontextprovider.md b/docs/docs/reference/Context Providers/searchcontextprovider.md
index 9c4eea9bf..cfc628fee 100644
--- a/docs/docs/reference/Context Providers/searchcontextprovider.md
+++ b/docs/docs/reference/Context Providers/searchcontextprovider.md
@@ -10,7 +10,6 @@ Type '@search' to reference the results of codebase search, just like the result
-
### Inherited Properties
diff --git a/docs/docs/reference/Context Providers/terminalcontextprovider.md b/docs/docs/reference/Context Providers/terminalcontextprovider.md
index f414571a2..11276b20c 100644
--- a/docs/docs/reference/Context Providers/terminalcontextprovider.md
+++ b/docs/docs/reference/Context Providers/terminalcontextprovider.md
@@ -10,7 +10,6 @@ Type '@terminal' to reference the contents of your IDE's terminal.
-
### Inherited Properties
diff --git a/docs/docs/reference/Context Providers/urlcontextprovider.md b/docs/docs/reference/Context Providers/urlcontextprovider.md
index 35632b06a..ec92c37c5 100644
--- a/docs/docs/reference/Context Providers/urlcontextprovider.md
+++ b/docs/docs/reference/Context Providers/urlcontextprovider.md
@@ -11,7 +11,6 @@ Type '@url' to reference the contents of a URL. You can either reference preset
-
### Inherited Properties
diff --git a/docs/docs/reference/Models/anthropicllm.md b/docs/docs/reference/Models/anthropicllm.md
index 619e33ecd..c58b14164 100644
--- a/docs/docs/reference/Models/anthropicllm.md
+++ b/docs/docs/reference/Models/anthropicllm.md
@@ -21,8 +21,6 @@ Claude 2 is not yet publicly released. You can request early access [here](https
## Properties
-
-
### Inherited Properties
diff --git a/docs/docs/reference/Models/ggml.md b/docs/docs/reference/Models/ggml.md
index d2f438038..2dd19aa48 100644
--- a/docs/docs/reference/Models/ggml.md
+++ b/docs/docs/reference/Models/ggml.md
@@ -29,7 +29,6 @@ config = ContinueConfig(
-
### Inherited Properties
diff --git a/docs/docs/reference/Models/googlepalmapi.md b/docs/docs/reference/Models/googlepalmapi.md
index 0262aee0a..d5eed234c 100644
--- a/docs/docs/reference/Models/googlepalmapi.md
+++ b/docs/docs/reference/Models/googlepalmapi.md
@@ -22,8 +22,6 @@ config = ContinueConfig(
## Properties
-
-
### Inherited Properties
diff --git a/docs/docs/reference/Models/huggingfaceinferenceapi.md b/docs/docs/reference/Models/huggingfaceinferenceapi.md
index c69fdf608..b79f6ecc0 100644
--- a/docs/docs/reference/Models/huggingfaceinferenceapi.md
+++ b/docs/docs/reference/Models/huggingfaceinferenceapi.md
@@ -12,8 +12,8 @@ config = ContinueConfig(
...
models=Models(
default=HuggingFaceInferenceAPI(
- endpoint_url: "",
- hf_token: "",
+ endpoint_url="",
+ hf_token="",
)
)
```
@@ -25,7 +25,6 @@ config = ContinueConfig(
-
### Inherited Properties
diff --git a/docs/docs/reference/Models/huggingfacetgi.md b/docs/docs/reference/Models/huggingfacetgi.md
index d246ceddb..403215218 100644
--- a/docs/docs/reference/Models/huggingfacetgi.md
+++ b/docs/docs/reference/Models/huggingfacetgi.md
@@ -2,15 +2,12 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx';
# HuggingFaceTGI
-
-
[View the source](https://github.com/continuedev/continue/tree/main/server/continuedev/libs/llm/hf_tgi.py)
## Properties
-
### Inherited Properties
diff --git a/docs/docs/reference/Models/llamacpp.md b/docs/docs/reference/Models/llamacpp.md
index a9f973b3e..a690b438e 100644
--- a/docs/docs/reference/Models/llamacpp.md
+++ b/docs/docs/reference/Models/llamacpp.md
@@ -30,7 +30,6 @@ config = ContinueConfig(
-
### Inherited Properties
diff --git a/docs/docs/reference/Models/ollama.md b/docs/docs/reference/Models/ollama.md
index fba041f26..60f52057e 100644
--- a/docs/docs/reference/Models/ollama.md
+++ b/docs/docs/reference/Models/ollama.md
@@ -21,7 +21,6 @@ config = ContinueConfig(
-
### Inherited Properties
diff --git a/docs/docs/reference/Models/openai.md b/docs/docs/reference/Models/openai.md
index 31d1bd63d..d529bd0ee 100644
--- a/docs/docs/reference/Models/openai.md
+++ b/docs/docs/reference/Models/openai.md
@@ -35,9 +35,9 @@ Options for serving models locally with an OpenAI-compatible server include:
+
-
### Inherited Properties
diff --git a/docs/docs/reference/Models/openaifreetrial.md b/docs/docs/reference/Models/openaifreetrial.md
index 4fef79eae..ad7362798 100644
--- a/docs/docs/reference/Models/openaifreetrial.md
+++ b/docs/docs/reference/Models/openaifreetrial.md
@@ -31,7 +31,6 @@ These classes support any models available through the OpenAI API, assuming your
-
### Inherited Properties
diff --git a/docs/docs/reference/Models/queuedllm.md b/docs/docs/reference/Models/queuedllm.md
index 1a87edc65..7ee979fbe 100644
--- a/docs/docs/reference/Models/queuedllm.md
+++ b/docs/docs/reference/Models/queuedllm.md
@@ -23,7 +23,6 @@ config = ContinueConfig(
-
### Inherited Properties
diff --git a/docs/docs/reference/Models/replicatellm.md b/docs/docs/reference/Models/replicatellm.md
index 085eacbfb..6fc0263a7 100644
--- a/docs/docs/reference/Models/replicatellm.md
+++ b/docs/docs/reference/Models/replicatellm.md
@@ -24,8 +24,6 @@ If you don't specify the `model` parameter, it will default to `replicate/llama-
## Properties
-
-
### Inherited Properties
diff --git a/docs/docs/reference/Models/textgenwebui.md b/docs/docs/reference/Models/textgenwebui.md
new file mode 100644
index 000000000..83e694ba1
--- /dev/null
+++ b/docs/docs/reference/Models/textgenwebui.md
@@ -0,0 +1,52 @@
+import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx';
+
+# TextGenWebUI
+
+ TextGenWebUI is a comprehensive, open-source language model UI and local server. You can set it up with an OpenAI-compatible server plugin, but if for some reason that doesn't work, you can use this class like so:
+
+ ```python title="~/.continue/config.py"
+<<<<<<<< HEAD:server/continuedev/libs/llm/text_gen_interface.py
+ from continuedev.libs.llm.text_gen_interface import TextGenUI
+========
+ from continuedev.libs.llm.text_gen_webui import TextGenWebUI
+>>>>>>>> 16b0a48035350d350e05ae5fe17478ae78042904:server/continuedev/libs/llm/text_gen_webui.py
+
+ config = ContinueConfig(
+ ...
+ models=Models(
+ default=TextGenWebUI(
+ model="",
+ )
+ )
+ )
+ ```
+
+
+[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/libs/llm/text_gen_webui.py)
+
+## Properties
+
+
+
+
+
+### Inherited Properties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/docs/reference/Models/togetherllm.md b/docs/docs/reference/Models/togetherllm.md
index 4c01e5a7d..38d10faf5 100644
--- a/docs/docs/reference/Models/togetherllm.md
+++ b/docs/docs/reference/Models/togetherllm.md
@@ -25,7 +25,6 @@ config = ContinueConfig(
-
### Inherited Properties
diff --git a/docs/docs/reference/config.md b/docs/docs/reference/config.md
index ea564dd88..2b157b91b 100644
--- a/docs/docs/reference/config.md
+++ b/docs/docs/reference/config.md
@@ -23,6 +23,4 @@ Continue can be deeply customized by editing the `ContinueConfig` object in `~/.
-
### Inherited Properties
-
diff --git a/docs/docs/troubleshooting.md b/docs/docs/troubleshooting.md
index 580b6f445..872e53010 100644
--- a/docs/docs/troubleshooting.md
+++ b/docs/docs/troubleshooting.md
@@ -6,9 +6,15 @@ keywords: [reload, delete, manually, logs, server, console]
# ❓ Troubleshooting
-The Continue VS Code extension is currently in beta. It will attempt to start the Continue Python server locally for you, but sometimes this will fail, causing the "Starting Continue server..." not to disappear, or other hangups. While we are working on fixes to all of these problems, there are a few things you can do to temporarily troubleshoot:
+The Continue VS Code extension is currently in beta, and the Intellij extension is in Alpha. They will attempt to start the Continue Python server locally for you, but sometimes this will fail, causing the "Starting Continue server..." not to disappear, or other hangups. While we are working on fixes to all of these problems, there are a few things you can do to temporarily troubleshoot:
-## Reload VS Code
+## Reload your editor
+
+#### Intellij
+
+Close out the window and re-open the project. This will give Continue another chance to start the server.
+
+#### VS Code
Open the command palette with cmd+shift+p, then type "Reload Window" and select it. This will give Continue another chance to start the server.
@@ -18,7 +24,7 @@ If the above doesn't work, you can try to kill the server manually before reload
1. Open any terminal
2. Enter `lsof -i :65432 | grep "(LISTEN)" | awk '{print $2}' | xargs kill -9` to kill the server running on port 65432.
-3. Restart VS Code, and Continue will attempt to start a fresh server.
+3. Restart your IDE and Continue will attempt to start a fresh server.
## Delete `~/.continue`
@@ -32,11 +38,17 @@ This may be necessary if you have a firewall blocking the server from downloadin
## Check the server logs
+#### Intellij
+
+Open the file `~/.continue/continue.log` where you can view the latest logs at the bottom.
+
+#### VS Code
+
1. `cmd+shift+p` (MacOS) / `ctrl+shift+p` (Windows)
2. Search for and then select "Continue: View Continue Server Logs"
3. Read the `continue.log` file that has opened
-## Check the console logs
+## Check the console logs (VS Code)
If your Continue server is not setting up, try checking the console logs:
@@ -50,7 +62,7 @@ If your Continue server is not setting up, try checking the console logs:
If you have checked the logs and the problem seems related to Meilisearch, or if context providers aren't working, you can try to manually setup Meilisearch with their instructions [here](https://www.meilisearch.com/docs/learn/getting_started/installation). Once downloaded, you should place the Meilisearch binary at `~/.continue/server/meilisearch` and start it. Once it is running on port 7700, Continue will be able to automatically connect.
-## Download an Older Version
+## Download an Older Version (VS Code)
If you've tried everything, reported an error, and are waiting to hear back, you can try downloading an older version of the extension. All versions are hosted on the Open VSX Registry [here](https://open-vsx.org/extension/Continue/continue). Once you've downloaded the extension, which will be a .vsix file, you can install it manually by following the instructions [here](https://code.visualstudio.com/docs/editor/extension-gallery#_install-from-a-vsix).
diff --git a/docs/docs/walkthroughs/codebase-embeddings.md b/docs/docs/walkthroughs/codebase-embeddings.md
index 4e9c28fb5..f4ffd1622 100644
--- a/docs/docs/walkthroughs/codebase-embeddings.md
+++ b/docs/docs/walkthroughs/codebase-embeddings.md
@@ -38,7 +38,8 @@ config=ContinueConfig(
params={
"n_retrieve": 20,
"n_final": 10,
- "use_reranking": True
+ "use_reranking": True,
+ "openai_api_key": ""
},
),
]
@@ -52,3 +53,5 @@ config=ContinueConfig(
## Parameters
After retrieving the top `n_retrieve` results from the vector database, an additional re-reranking step uses 2 LLM calls to select the top `n_final` results to use to answer the question. If you want to increase the speed of the query at the cost of relevancy, you can skip the re-ranking step by setting `use_reranking` to `False`. Then the top `n_final` results will just be directly calculated from the vector database.
+
+It is optional to set your `openai_api_key` parameter. If you do, we will use their Ada embeddings. Otherwise, a sentence transformers model will be run locally to calculate the embeddings.
diff --git a/docs/docs/walkthroughs/manually-run-continue.md b/docs/docs/walkthroughs/manually-run-continue.md
index 20a52da4c..6bed6e624 100644
--- a/docs/docs/walkthroughs/manually-run-continue.md
+++ b/docs/docs/walkthroughs/manually-run-continue.md
@@ -38,7 +38,7 @@ If you'd like to use a pre-built binary, you can download manually from our S3 b
- [Windows](https://continue-server-binaries.s3.us-west-1.amazonaws.com/windows/run.exe)
- [Linux](https://continue-server-binaries.s3.us-west-1.amazonaws.com/linux/run)
-Once downloaded, start the binary by running `./run` (MacOS/Linux) or `./run.exe` (Windows) in the directory where you downloaded it. You should see that it begins listening on port 65432.
+Once downloaded, start the binary by running `./continue_server` (MacOS/Linux) or `./continue_server.exe` (Windows) in the directory where you downloaded it. You should see that it begins listening on port 65432.
## Build the server binary from source
@@ -47,7 +47,7 @@ If you don't want to use the PyPI package, but need a version of Continue that w
1. Clone the [Continue repo](https://github.com/continuedev/continue)
2. Change directories into the repo: `cd continue`
3. Run the build script: `sh build.sh` (or `sh build.sh m1` if building for an M1 Mac, or `build.cmd` if on Windows without WSL)
-4. Now that the binary is outputted in the `./dist` folder, start the server by running `./dist/run`. You should see that it begins listening on port 65432.
+4. Now that the binary is outputted in the `./dist` folder, start the server by running `./dist/continue_server`. You should see that it begins listening on port 65432.
## Run the server from source
diff --git a/docs/docs/walkthroughs/running-continue-without-internet.md b/docs/docs/walkthroughs/running-continue-without-internet.md
index 1ae7b7a41..752c4bff9 100644
--- a/docs/docs/walkthroughs/running-continue-without-internet.md
+++ b/docs/docs/walkthroughs/running-continue-without-internet.md
@@ -9,7 +9,7 @@ keywords: [no internet, air-gapped, local model]
Continue can be run even on an air-gapped computer if you use a local model. You'll have to make a few adjustments for this to work.
-1. Download the latest .vsix file from the [Open VSX Registry](https://open-vsx.org/extension/Continue/continue) and [install it to VS Code](https://code.visualstudio.com/docs/editor/extension-marketplace#_install-from-a-vsix).
+1. Download the latest .vsix file from the [Open VSX Registry](https://open-vsx.org/extensions/vscode/Continue/continue) and [install it to VS Code](https://code.visualstudio.com/docs/editor/extension-marketplace#_install-from-a-vsix).
2. In VS Code settings, search "continue" and check the box that says "Manually Running Server". This will stop Continue from trying to kill and redownload the server binary.
3. Follow instructions to [run Continue manually](./manually-run-continue.md).
4. Open `~/.continue/config.py` and set `allow_anonymous_telemetry=False`. This will stop Continue from attempting requests to PostHog.
diff --git a/extension/config/config.json b/extension/config/config.json
deleted file mode 100644
index b4b9993e6..000000000
--- a/extension/config/config.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "API_URL": "http://localhost:65432"
-}
diff --git a/extension/config/dev_config.json b/extension/config/dev_config.json
deleted file mode 100644
index b4b9993e6..000000000
--- a/extension/config/dev_config.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "API_URL": "http://localhost:65432"
-}
diff --git a/extension/config/prod_config.json b/extension/config/prod_config.json
deleted file mode 100644
index dc0d07974..000000000
--- a/extension/config/prod_config.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "API_URL": "https://basin.dev"
-}
diff --git a/extension/react-app/public/logos/meta.svg b/extension/react-app/public/logos/meta.svg
deleted file mode 100644
index ba1d38d2c..000000000
--- a/extension/react-app/public/logos/meta.svg
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
\ No newline at end of file
diff --git a/extension/react-app/public/logos/openai.svg b/extension/react-app/public/logos/openai.svg
deleted file mode 100644
index 9aacd2a11..000000000
--- a/extension/react-app/public/logos/openai.svg
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
\ No newline at end of file
diff --git a/extension/react-app/src/components/ModelSelect.tsx b/extension/react-app/src/components/ModelSelect.tsx
deleted file mode 100644
index cd27067fa..000000000
--- a/extension/react-app/src/components/ModelSelect.tsx
+++ /dev/null
@@ -1,237 +0,0 @@
-import styled from "styled-components";
-import {
- defaultBorderRadius,
- lightGray,
- secondaryDark,
- vscBackground,
- vscForeground,
-} from ".";
-import { useContext } from "react";
-import { GUIClientContext } from "../App";
-import { RootStore } from "../redux/store";
-import { useDispatch, useSelector } from "react-redux";
-import { ArrowLeftIcon, PlusIcon } from "@heroicons/react/24/outline";
-import { setDialogMessage, setShowDialog } from "../redux/slices/uiStateSlice";
-import { useNavigate } from "react-router-dom";
-
-const MODEL_INFO: { title: string; class: string; args: any }[] = [
- {
- title: "OpenAI",
- class: "OpenAI",
- args: {
- model: "gpt-4",
- api_key: "",
- },
- },
- {
- title: "Anthropic",
- class: "AnthropicLLM",
- args: {
- model: "claude-2",
- api_key: "",
- },
- },
- {
- title: "Ollama",
- class: "Ollama",
- args: {
- model: "codellama",
- },
- },
- {
- title: "TogetherAI",
- class: "TogetherLLM",
- args: {
- model: "togethercomputer/CodeLlama-13b-Instruct",
- api_key: "",
- },
- },
- {
- title: "Replicate",
- class: "ReplicateLLM",
- args: {
- model:
- "replicate/llama-2-70b-chat:58d078176e02c219e11eb4da5a02a7830a283b14cf8f94537af893ccff5ee781",
- api_key: "",
- },
- },
- {
- title: "llama.cpp",
- class: "LlamaCpp",
- args: {},
- },
- {
- title: "HuggingFace Inference API",
- class: "HuggingFaceInferenceAPI",
- args: {
- endpoint_url: "",
- hf_token: "",
- },
- },
- {
- title: "Google PaLM API",
- class: "GooglePaLMAPI",
- args: {
- model: "chat-bison-001",
- api_key: "",
- },
- },
- {
- title: "LM Studio",
- class: "GGML",
- args: {
- server_url: "http://localhost:1234",
- },
- },
- {
- title: "Other OpenAI-compatible API",
- class: "GGML",
- args: {
- server_url: "",
- },
- },
- {
- title: "GPT-4 limited free trial",
- class: "OpenAIFreeTrial",
- args: {
- model: "gpt-4",
- },
- },
-];
-
-const GridDiv = styled.div`
- display: grid;
- grid-template-columns: 1fr auto;
- align-items: center;
- border: 0.5px solid ${lightGray};
- border-radius: ${defaultBorderRadius};
- overflow: hidden;
-`;
-
-const Select = styled.select`
- border: none;
- max-width: 50vw; //changed the width
- background-color: ${vscBackground};
- color: ${vscForeground};
- padding: 6px;
- max-height: 35vh;
- overflow: scroll;
- cursor: pointer;
-
- &:focus {
- outline: none;
- }
- &:hover {
- background-color: ${secondaryDark};
- }
-`;
-
-const StyledPlusIcon = styled(PlusIcon)`
- cursor: pointer;
- margin: 0px;
- padding-left: 4px;
- padding-right: 4px;
- height: 100%;
-
- &:hover {
- background-color: ${secondaryDark};
- }
- border-left: 0.5px solid ${lightGray};
-`;
-
-const NewProviderDiv = styled.div`
- cursor: pointer;
- padding: 8px;
- padding-left: 16px;
- padding-right: 16px;
- border-top: 0.5px solid ${lightGray};
-
- &:hover {
- background-color: ${secondaryDark};
- }
-`;
-
-function modelSelectTitle(model: any): string {
- if (model?.title) return model?.title;
- if (model?.model !== undefined && model?.model.trim() !== "") {
- if (model?.class_name) {
- return `${model?.class_name} - ${model?.model}`;
- }
- return model?.model;
- }
- return model?.class_name;
-}
-
-function ModelSelect(props: {}) {
- const dispatch = useDispatch();
- const client = useContext(GUIClientContext);
- const defaultModel = useSelector(
- (state: RootStore) => (state.serverState.config as any)?.models?.default
- );
- const savedModels = useSelector(
- (state: RootStore) => (state.serverState.config as any)?.models?.saved
- );
-
- const navigate = useNavigate();
-
- return (
-
-
-
- {
- navigate("/models");
- }}
- />
-
- );
-}
-
-export default ModelSelect;
diff --git a/extension/scripts/prepackage.js b/extension/scripts/prepackage.js
deleted file mode 100644
index c55df802d..000000000
--- a/extension/scripts/prepackage.js
+++ /dev/null
@@ -1,31 +0,0 @@
-const { exec } = require("child_process");
-const fs = require("fs");
-const path = require("path");
-
-exec("npm install", (error) => {
- if (error) throw error;
- console.log("npm install completed");
-
- exec("npm run typegen", (error) => {
- if (error) throw error;
- console.log("npm run typegen completed");
-
- process.chdir("react-app");
-
- exec("npm install", (error) => {
- if (error) throw error;
- console.log("npm install in react-app completed");
-
- exec("npm run build", (error) => {
- if (error) throw error;
- if (!fs.existsSync(path.join("dist", "assets", "index.js"))) {
- throw new Error("react-app build did not produce index.js");
- }
- if (!fs.existsSync(path.join("dist", "assets", "index.css"))) {
- throw new Error("react-app build did not produce index.css");
- }
- console.log("npm run build in react-app completed");
- });
- });
- });
-});
diff --git a/extensions/intellij/.gitignore b/extensions/intellij/.gitignore
new file mode 100644
index 000000000..73ab23c38
--- /dev/null
+++ b/extensions/intellij/.gitignore
@@ -0,0 +1 @@
+src/main/resources/webview
\ No newline at end of file
diff --git a/extensions/intellij/.run/Run IDE for UI Tests.run.xml b/extensions/intellij/.run/Run IDE for UI Tests.run.xml
new file mode 100644
index 000000000..ee99b7edd
--- /dev/null
+++ b/extensions/intellij/.run/Run IDE for UI Tests.run.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+ false
+ false
+
+
+
\ No newline at end of file
diff --git a/extensions/intellij/.run/Run Plugin.run.xml b/extensions/intellij/.run/Run Plugin.run.xml
new file mode 100644
index 000000000..93a586e03
--- /dev/null
+++ b/extensions/intellij/.run/Run Plugin.run.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+ false
+
+
+
\ No newline at end of file
diff --git a/extensions/intellij/.run/Run Qodana.run.xml b/extensions/intellij/.run/Run Qodana.run.xml
new file mode 100644
index 000000000..c92f33c7c
--- /dev/null
+++ b/extensions/intellij/.run/Run Qodana.run.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+ false
+ false
+
+
+
\ No newline at end of file
diff --git a/extensions/intellij/.run/Run Tests.run.xml b/extensions/intellij/.run/Run Tests.run.xml
new file mode 100644
index 000000000..d7a9e09b3
--- /dev/null
+++ b/extensions/intellij/.run/Run Tests.run.xml
@@ -0,0 +1,24 @@
+
+
+
+
+