diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 469b82c2c..cbfa954ff 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -77,43 +77,43 @@ jobs: - name: Build and publish the package run: cd server && poetry publish --build - # 1.5 Place the binary in extension/exe directory - - name: Make sure extension/exe directory exists + # 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 @@ -124,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 + 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 @@ -159,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 @@ -224,7 +224,7 @@ jobs: # 2. Publish the extension to VS Code Marketplace - run: | - cd extension + 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 }} @@ -232,13 +232,13 @@ jobs: # 3. Publish the extension to Open VSX Registry - name: Publish (Open VSX Registry) run: | - cd extension + 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 diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index c1941f840..ac65cc87a 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -115,43 +115,43 @@ jobs: - name: Build PyInstaller Executable run: pyinstaller continue_server.spec - # 1.5 Place the binary in extension/exe directory - - name: Make sure extension/exe directory exists + # 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/continue_server extension/exe/continue_server + cp dist/continue_server extensions/vscode/exe/continue_server if: matrix.os != 'windows-latest' - name: Copy binary to extension (Windows) run: | - cp dist/continue_server.exe extension/exe/continue_server.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/continue_server + 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/continue_server + 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/continue_server + 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/continue_server.exe + path: extensions/vscode/exe/continue_server.exe # 2. Install npm dependencies - name: Use Node.js 19.0.0 @@ -162,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 + 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 @@ -197,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/continue_server + 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/continue_server https://continue-server-binaries.s3.us-west-1.amazonaws.com/apple-silicon/continue_server + 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/continue_server + 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 @@ -262,7 +262,7 @@ jobs: # 2. Publish the extension to VS Code Marketplace - run: | - cd extension + 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 }} @@ -270,13 +270,13 @@ jobs: # 3. Publish the extension to Open VSX Registry - name: Publish (Open VSX Registry) run: | - cd extension + 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 diff --git a/.vscode/launch.json b/.vscode/launch.json index 9df688432..77ced5f73 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -26,14 +26,14 @@ "request": "attach", "name": "Vite", "url": "http://localhost:5173", - "webRoot": "${workspaceFolder}/extension/react-app/src", + "webRoot": "${workspaceFolder}/gui/src", "sourceMapPathOverrides": { "webpack:///./src/*": "${webRoot}/*" }, "port": 9222, // "runtimeArgs": ["--remote-debugging-port=9222"], "sourceMaps": true, - "preLaunchTask": "react-app:dev", + "preLaunchTask": "gui:dev" }, { "name": "Pytest", @@ -80,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" @@ -98,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 3a9a89fae..7210d7d62 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,125 +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 } - }, - { - "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 - }, - // - // Start the React App for debugging with Vite - { - "label": "react-app:dev", - "type": "shell", - "command": "npm", - "options": { - "cwd": "extension/react-app", - }, - "args": [ - "run", - "dev" - ], - "isBackground": true, + ] } - ] -} \ No newline at end of file + ] + }, + // 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": [ + { + "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 c6743093d..b03edbea2 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](./continuedev/src/continuedev/server/ide.py). You can see [ide_protocol.py](./continuedev/src/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 [gui_protocol.py](./continuedev/src/continuedev/server/gui_protocol.py) or [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](./continuedev/src/continuedev/core/main.py) and includes: diff --git a/README.md b/README.md index 40099a328..6b7cf1491 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ > 🎁 **New! [Try out the new JetBrains extension (Alpha)](https://plugins.jetbrains.com/plugin/22707-continue-extension)** -![Continue logo](c_d.png) +![Continue logo](media/c_d.png)

Continue

@@ -24,7 +24,7 @@

-![Editing With Continue](readme.gif) +![Editing With Continue](media/readme.gif) @@ -78,4 +78,4 @@ Check out the [contribution ideas board](https://github.com/orgs/continuedev/pro ## License -[Apache 2.0 © 2023 Continue Dev, Inc.](./LICENSE) \ No newline at end of file +[Apache 2.0 © 2023 Continue Dev, Inc.](./LICENSE) 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/docs/docs/concepts/ide.md b/docs/docs/concepts/ide.md index d4b48f0a0..6d23dd653 100644 --- a/docs/docs/concepts/ide.md +++ b/docs/docs/concepts/ide.md @@ -11,7 +11,7 @@ The **IDE** is the text editor where you manually edit your code. SDK provides "IDEProtocol" class so that steps can interact with VS Code, etc... in an IDE-agnostic way. Communicates with editor through websockets protocol. All that's needed to make continue work with a new IDE/editor is to implement the protocol on the side of the editor. - `ide_protocol.py` is just the abstract version of what is implemented in `ide.py`, and `main.py` runs both `notebook.py` and `ide.py` as a single FastAPI server. This is the entry point to the Continue server, and acts as a bridge between IDE and React app -- extension directory contains 1. The VS Code extension, whose code is in `extension/src`, with `extension.ts` being the entry point, and 2. the Continue React app, in the `extension/react-app` folder. This is displayed in the sidebar of VS Code, but is designed to work with any IDE that implements the protocol as is done in `extension/src/continueIdeClient.ts`. +- extension directory contains 1. The VS Code extension, whose code is in `extensions/vscode/src`, with `extension.ts` being the entry point, and 2. the Continue React app, in the `gui` folder. This is displayed in the sidebar of VS Code, but is designed to work with any IDE that implements the protocol as is done in `extensions/vscode/src/continueIdeClient.ts`. ## Supported IDEs diff --git a/docs/docs/how-continue-works.md b/docs/docs/how-continue-works.md index 2d52ea673..c5d5e5957 100644 --- a/docs/docs/how-continue-works.md +++ b/docs/docs/how-continue-works.md @@ -30,9 +30,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 54ba54b9f..c9857065e 100644 --- a/docs/docs/reference/Context Providers/diffcontextprovider.md +++ b/docs/docs/reference/Context Providers/diffcontextprovider.md @@ -4,7 +4,7 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx'; Type '@diff' to reference all of the changes you've made to your current branch. This is useful if you want to summarize what you've done or ask for a general review of your work before committing. -[View the source](https://github.com/continuedev/continue/tree/main/continuedev/src/continuedev/plugins/context_providers/diff.py) +[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/plugins/context_providers/diff.py) ## Properties diff --git a/docs/docs/reference/Context Providers/filecontextprovider.md b/docs/docs/reference/Context Providers/filecontextprovider.md index 12e68478a..d672c2d15 100644 --- a/docs/docs/reference/Context Providers/filecontextprovider.md +++ b/docs/docs/reference/Context Providers/filecontextprovider.md @@ -4,7 +4,7 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx'; The FileContextProvider is a ContextProvider that allows you to search files in the open workspace. -[View the source](https://github.com/continuedev/continue/tree/main/continuedev/src/continuedev/plugins/context_providers/file.py) +[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/plugins/context_providers/file.py) ## Properties diff --git a/docs/docs/reference/Context Providers/filetreecontextprovider.md b/docs/docs/reference/Context Providers/filetreecontextprovider.md index a5b11555b..7ffc8f4c8 100644 --- a/docs/docs/reference/Context Providers/filetreecontextprovider.md +++ b/docs/docs/reference/Context Providers/filetreecontextprovider.md @@ -4,7 +4,7 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx'; Type '@tree' to reference the contents of your current workspace. The LLM will be able to see the nested directory structure of your project. -[View the source](https://github.com/continuedev/continue/tree/main/continuedev/src/continuedev/plugins/context_providers/filetree.py) +[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/plugins/context_providers/filetree.py) ## Properties diff --git a/docs/docs/reference/Context Providers/githubissuescontextprovider.md b/docs/docs/reference/Context Providers/githubissuescontextprovider.md index f174df96b..9598a4b9f 100644 --- a/docs/docs/reference/Context Providers/githubissuescontextprovider.md +++ b/docs/docs/reference/Context Providers/githubissuescontextprovider.md @@ -4,7 +4,7 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx'; The GitHubIssuesContextProvider is a ContextProvider that allows you to search GitHub issues in a repo. Type '@issue' to reference the title and contents of an issue. -[View the source](https://github.com/continuedev/continue/tree/main/continuedev/src/continuedev/plugins/context_providers/github.py) +[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/plugins/context_providers/github.py) ## Properties diff --git a/docs/docs/reference/Context Providers/googlecontextprovider.md b/docs/docs/reference/Context Providers/googlecontextprovider.md index 84a9fdb5e..a3da1f80b 100644 --- a/docs/docs/reference/Context Providers/googlecontextprovider.md +++ b/docs/docs/reference/Context Providers/googlecontextprovider.md @@ -4,7 +4,7 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx'; Type '@google' to reference the results of a Google search. For example, type "@google python tutorial" if you want to search and discuss ways of learning Python. -[View the source](https://github.com/continuedev/continue/tree/main/continuedev/src/continuedev/plugins/context_providers/google.py) +[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/plugins/context_providers/google.py) ## Properties diff --git a/docs/docs/reference/Context Providers/searchcontextprovider.md b/docs/docs/reference/Context Providers/searchcontextprovider.md index 9aa22f33b..e8cb7bb6d 100644 --- a/docs/docs/reference/Context Providers/searchcontextprovider.md +++ b/docs/docs/reference/Context Providers/searchcontextprovider.md @@ -4,7 +4,7 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx'; Type '@search' to reference the results of codebase search, just like the results you would get from VS Code search. -[View the source](https://github.com/continuedev/continue/tree/main/continuedev/src/continuedev/plugins/context_providers/search.py) +[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/plugins/context_providers/search.py) ## Properties diff --git a/docs/docs/reference/Context Providers/terminalcontextprovider.md b/docs/docs/reference/Context Providers/terminalcontextprovider.md index ca4ad01a1..542a0c3f3 100644 --- a/docs/docs/reference/Context Providers/terminalcontextprovider.md +++ b/docs/docs/reference/Context Providers/terminalcontextprovider.md @@ -4,7 +4,7 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx'; Type '@terminal' to reference the contents of your IDE's terminal. -[View the source](https://github.com/continuedev/continue/tree/main/continuedev/src/continuedev/plugins/context_providers/terminal.py) +[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/plugins/context_providers/terminal.py) ## Properties diff --git a/docs/docs/reference/Context Providers/urlcontextprovider.md b/docs/docs/reference/Context Providers/urlcontextprovider.md index fd4a7c4a3..25c37f0a4 100644 --- a/docs/docs/reference/Context Providers/urlcontextprovider.md +++ b/docs/docs/reference/Context Providers/urlcontextprovider.md @@ -4,7 +4,7 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx'; Type '@url' to reference the contents of a URL. You can either reference preset URLs, or reference one dynamically by typing '@url https://example.com'. The text contents of the page will be fetched and used as context. -[View the source](https://github.com/continuedev/continue/tree/main/continuedev/src/continuedev/plugins/context_providers/url.py) +[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/plugins/context_providers/url.py) ## Properties diff --git a/docs/docs/reference/Models/anthropicllm.md b/docs/docs/reference/Models/anthropicllm.md index 68f8f9d33..3dd6bdb07 100644 --- a/docs/docs/reference/Models/anthropicllm.md +++ b/docs/docs/reference/Models/anthropicllm.md @@ -17,7 +17,7 @@ config = ContinueConfig( Claude 2 is not yet publicly released. You can request early access [here](https://www.anthropic.com/earlyaccess). -[View the source](https://github.com/continuedev/continue/tree/main/continuedev/src/continuedev/libs/llm/anthropic.py) +[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/libs/llm/anthropic.py) ## Properties diff --git a/docs/docs/reference/Models/ggml.md b/docs/docs/reference/Models/ggml.md index 40f87e305..bb78fbcc0 100644 --- a/docs/docs/reference/Models/ggml.md +++ b/docs/docs/reference/Models/ggml.md @@ -19,7 +19,7 @@ config = ContinueConfig( ) ``` -[View the source](https://github.com/continuedev/continue/tree/main/continuedev/src/continuedev/libs/llm/ggml.py) +[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/libs/llm/ggml.py) ## Properties @@ -29,6 +29,7 @@ config = ContinueConfig( + ### Inherited Properties @@ -47,5 +48,5 @@ config = ContinueConfig( - + diff --git a/docs/docs/reference/Models/googlepalmapi.md b/docs/docs/reference/Models/googlepalmapi.md index d9cb0cc28..0c2acdbe8 100644 --- a/docs/docs/reference/Models/googlepalmapi.md +++ b/docs/docs/reference/Models/googlepalmapi.md @@ -18,7 +18,7 @@ config = ContinueConfig( ) ``` -[View the source](https://github.com/continuedev/continue/tree/main/continuedev/src/continuedev/libs/llm/google_palm_api.py) +[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/libs/llm/google_palm_api.py) ## Properties diff --git a/docs/docs/reference/Models/huggingfaceinferenceapi.md b/docs/docs/reference/Models/huggingfaceinferenceapi.md index fee892cc0..d4e68620f 100644 --- a/docs/docs/reference/Models/huggingfaceinferenceapi.md +++ b/docs/docs/reference/Models/huggingfaceinferenceapi.md @@ -12,13 +12,13 @@ config = ContinueConfig( ... models=Models( default=HuggingFaceInferenceAPI( - endpoint_url: "", - hf_token: "", + endpoint_url="", + hf_token="", ) ) ``` -[View the source](https://github.com/continuedev/continue/tree/main/continuedev/src/continuedev/libs/llm/hf_inference_api.py) +[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/libs/llm/hf_inference_api.py) ## Properties @@ -44,5 +44,5 @@ config = ContinueConfig( - + diff --git a/docs/docs/reference/Models/huggingfacetgi.md b/docs/docs/reference/Models/huggingfacetgi.md index 176b05390..5a32dad23 100644 --- a/docs/docs/reference/Models/huggingfacetgi.md +++ b/docs/docs/reference/Models/huggingfacetgi.md @@ -4,7 +4,7 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx'; -[View the source](https://github.com/continuedev/continue/tree/main/continuedev/src/continuedev/libs/llm/hf_tgi.py) +[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/libs/llm/hf_tgi.py) ## Properties @@ -29,5 +29,5 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx'; - + diff --git a/docs/docs/reference/Models/llamacpp.md b/docs/docs/reference/Models/llamacpp.md index 5050ad74b..25910bb57 100644 --- a/docs/docs/reference/Models/llamacpp.md +++ b/docs/docs/reference/Models/llamacpp.md @@ -23,13 +23,14 @@ config = ContinueConfig( ) ``` -[View the source](https://github.com/continuedev/continue/tree/main/continuedev/src/continuedev/libs/llm/llamacpp.py) +[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/libs/llm/llamacpp.py) ## Properties + ### Inherited Properties @@ -48,5 +49,5 @@ config = ContinueConfig( - + diff --git a/docs/docs/reference/Models/ollama.md b/docs/docs/reference/Models/ollama.md index b6d418cee..dd2bb77fb 100644 --- a/docs/docs/reference/Models/ollama.md +++ b/docs/docs/reference/Models/ollama.md @@ -15,7 +15,7 @@ config = ContinueConfig( ) ``` -[View the source](https://github.com/continuedev/continue/tree/main/continuedev/src/continuedev/libs/llm/ollama.py) +[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/libs/llm/ollama.py) ## Properties @@ -40,5 +40,5 @@ config = ContinueConfig( - + diff --git a/docs/docs/reference/Models/openai.md b/docs/docs/reference/Models/openai.md index 310881502..c0151da0d 100644 --- a/docs/docs/reference/Models/openai.md +++ b/docs/docs/reference/Models/openai.md @@ -28,15 +28,17 @@ Options for serving models locally with an OpenAI-compatible server include: - [LocalAI](https://localai.io/basics/getting_started/) - [llama-cpp-python](https://github.com/abetlen/llama-cpp-python#web-server) -[View the source](https://github.com/continuedev/continue/tree/main/continuedev/src/continuedev/libs/llm/openai.py) +[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/libs/llm/openai.py) ## Properties + + ### Inherited Properties diff --git a/docs/docs/reference/Models/openaifreetrial.md b/docs/docs/reference/Models/openaifreetrial.md index 1cf1154f9..e7c51791f 100644 --- a/docs/docs/reference/Models/openaifreetrial.md +++ b/docs/docs/reference/Models/openaifreetrial.md @@ -25,7 +25,7 @@ The `OpenAIFreeTrial` class will automatically switch to using your API key inst These classes support any models available through the OpenAI API, assuming your API key has access, including "gpt-4", "gpt-3.5-turbo", "gpt-3.5-turbo-16k", and "gpt-4-32k". -[View the source](https://github.com/continuedev/continue/tree/main/continuedev/src/continuedev/libs/llm/openai_free_trial.py) +[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/libs/llm/openai_free_trial.py) ## Properties diff --git a/docs/docs/reference/Models/queuedllm.md b/docs/docs/reference/Models/queuedllm.md index 9ea28c58b..b981240b2 100644 --- a/docs/docs/reference/Models/queuedllm.md +++ b/docs/docs/reference/Models/queuedllm.md @@ -17,7 +17,7 @@ config = ContinueConfig( ) ``` -[View the source](https://github.com/continuedev/continue/tree/main/continuedev/src/continuedev/libs/llm/queued.py) +[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/libs/llm/queued.py) ## Properties diff --git a/docs/docs/reference/Models/replicatellm.md b/docs/docs/reference/Models/replicatellm.md index 167db379b..7d7034c12 100644 --- a/docs/docs/reference/Models/replicatellm.md +++ b/docs/docs/reference/Models/replicatellm.md @@ -20,7 +20,7 @@ config = ContinueConfig( If you don't specify the `model` parameter, it will default to `replicate/llama-2-70b-chat:58d078176e02c219e11eb4da5a02a7830a283b14cf8f94537af893ccff5ee781`. -[View the source](https://github.com/continuedev/continue/tree/main/continuedev/src/continuedev/libs/llm/replicate.py) +[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/libs/llm/replicate.py) ## Properties @@ -45,4 +45,4 @@ If you don't specify the `model` parameter, it will default to `replicate/llama- - + 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 a7eae0255..56c244c29 100644 --- a/docs/docs/reference/Models/togetherllm.md +++ b/docs/docs/reference/Models/togetherllm.md @@ -19,7 +19,7 @@ config = ContinueConfig( ) ``` -[View the source](https://github.com/continuedev/continue/tree/main/continuedev/src/continuedev/libs/llm/together.py) +[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/libs/llm/together.py) ## Properties @@ -45,4 +45,4 @@ config = ContinueConfig( - + diff --git a/docs/docs/reference/config.md b/docs/docs/reference/config.md index 8fdcfceef..75e1d0657 100644 --- a/docs/docs/reference/config.md +++ b/docs/docs/reference/config.md @@ -4,7 +4,7 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx'; Continue can be deeply customized by editing the `ContinueConfig` object in `~/.continue/config.py` (`%userprofile%\.continue\config.py` for Windows) on your machine. This class is instantiated from the config file for every new session. -[View the source](https://github.com/continuedev/continue/tree/main/continuedev/src/continuedev/core/config.py) +[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/core/config.py) ## Properties @@ -23,4 +23,6 @@ Continue can be deeply customized by editing the `ContinueConfig` object in `~/. + ### Inherited Properties + diff --git a/docs/docs/walkthroughs/running-continue-without-internet.md b/docs/docs/walkthroughs/running-continue-without-internet.md index f9d9799df..2e273c698 100644 --- a/docs/docs/walkthroughs/running-continue-without-internet.md +++ b/docs/docs/walkthroughs/running-continue-without-internet.md @@ -2,7 +2,7 @@ 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/scripts/prepackage.js b/extension/scripts/prepackage.js deleted file mode 100644 index 0944f303c..000000000 --- a/extension/scripts/prepackage.js +++ /dev/null @@ -1,125 +0,0 @@ -const { exec } = require("child_process"); -const fs = require("fs"); -const ncp = require("ncp").ncp; -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) => { - // Then copy over the dist folder to the Intellij extension - // cp ../../intellij-extension/src/main/resources/webview/index.html tmp_index.html && rm -rf ../../intellij-extension/src/main/resources/webview && mkdir ../../intellij-extension/src/main/resources/webview && cp -R dist/* ../../intellij-extension/src/main/resources/webview && cp tmp_index.html ../../intellij-extension/src/main/resources/webview/index.html && rm tmp_index.html - fs.copyFileSync( - path.join( - "..", - "..", - "intellij-extension", - "src", - "main", - "resources", - "webview", - "index.html" - ), - path.join("tmp_index.html") - ); - fs.rmSync( - path.join( - "..", - "..", - "intellij-extension", - "src", - "main", - "resources", - "webview" - ), - { recursive: true } - ); - fs.mkdirSync( - path.join( - "..", - "..", - "intellij-extension", - "src", - "main", - "resources", - "webview" - ), - { recursive: true } - ); - ncp( - "dist", - path.join( - "..", - "..", - "intellij-extension", - "src", - "main", - "resources", - "webview" - ), - (error) => { - if (error) { - console.log( - "Error copying react-app build to intellij-extension: ", - error - ); - throw error; - } - - const indexHtmlPath = path.join( - "..", - "..", - "intellij-extension", - "src", - "main", - "resources", - "webview", - "index.html" - ); - if (fs.existsSync(indexHtmlPath)) { - fs.rmSync(indexHtmlPath, {}); - } - fs.copyFileSync( - "tmp_index.html", - path.join( - "..", - "..", - "intellij-extension", - "src", - "main", - "resources", - "webview", - "index.html" - ) - ); - fs.unlinkSync("tmp_index.html"); - console.log("Copied react-app build to intellij-extension"); - } - ); - - if (error) { - console.log("Error running npm run build in react-app: ", 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/intellij-extension/.run/Run IDE for UI Tests.run.xml b/extensions/intellij/.run/Run IDE for UI Tests.run.xml similarity index 100% rename from intellij-extension/.run/Run IDE for UI Tests.run.xml rename to extensions/intellij/.run/Run IDE for UI Tests.run.xml diff --git a/intellij-extension/.run/Run Plugin.run.xml b/extensions/intellij/.run/Run Plugin.run.xml similarity index 79% rename from intellij-extension/.run/Run Plugin.run.xml rename to extensions/intellij/.run/Run Plugin.run.xml index 312d69448..93a586e03 100644 --- a/intellij-extension/.run/Run Plugin.run.xml +++ b/extensions/intellij/.run/Run Plugin.run.xml @@ -1,9 +1,9 @@ - +