From 2e6d6570b5370b1eb32dd633f8909173662af7d1 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 31 Jul 2023 14:52:22 -0700 Subject: docs: :memo: improved troubleshooting docs --- docs/docs/troubleshooting.md | 46 +++++++++++++++++++++++++ docs/sidebars.js | 1 + extension/README.md | 22 ++---------- extension/package-lock.json | 4 +-- extension/package.json | 2 +- extension/react-app/src/components/ComboBox.tsx | 4 +-- 6 files changed, 54 insertions(+), 25 deletions(-) create mode 100644 docs/docs/troubleshooting.md diff --git a/docs/docs/troubleshooting.md b/docs/docs/troubleshooting.md new file mode 100644 index 00000000..57b465e8 --- /dev/null +++ b/docs/docs/troubleshooting.md @@ -0,0 +1,46 @@ +# 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: + +## For Windows Users + +In order to activate the Continue virtual environment, you must enable running scripts in PowerShell. In this case, the following error will appear in the console: + +``` +A Python virtual enviroment cannot be activated because running scripts is disabled for this user. In order to use Continue, please enable signed scripts to run with this command in PowerShell: `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser`, reload VS Code, and then try again. +``` + +Please open PowerShell, run the command (`Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser`), and reload VS Code. + +## For Linux Users + +Linux does not come pre-installed with `python3-venv`, which is needed for Continue to donwload dependencies and run the local server. If you see a related error, you can solve by: + +1. Checking your Python version with `python3 --version` +2. Update `apt-get` with `apt-get update` +3. Install the correct version of `python3-venv` by running `apt-get install python3.X-venv` (replacing `3.X` with your Python version. For example, if you saw "Python 3.11.4", this should be "3.11") +4. Reload VS Code + +## Reload 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. + +## Kill the existing server + +If the above doesn't work, you can try to kill the server manually before reloading. + +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. + +## Manually install Python requirements + +Open any terminal and run `cd ~/.continue/server` to enter the Continue server directory, then `pip3 install -r requirements.txt` to install the requirements. Restarting VS Code should now correctly start the server. + +## Run the server manually + +If none of these work, you can start the server yourself as is explained here: [Running the Continue server manually](https://continue.dev/docs/how-continue-works) + +## Still having trouble? + +Create a GitHub issue [here](https://github.com/continuedev/continue/issues/new?assignees=&labels=bug&projects=&template=bug-report-%F0%9F%90%9B.md&title=), leaving the details of your problem, and we'll be able to more quickly help you out. diff --git a/docs/sidebars.js b/docs/sidebars.js index 45befd2c..3f9aeba6 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -21,6 +21,7 @@ const sidebars = { "customization", "collecting-data", "telemetry", + "troubleshooting", ], }; diff --git a/extension/README.md b/extension/README.md index f2dbd164..830c9606 100644 --- a/extension/README.md +++ b/extension/README.md @@ -45,27 +45,9 @@ If your Continue server is not setting up, please check the console logs: # 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. There are a few things you can do to troubleshoot: +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, read here for common solutions: -### Reload 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. - -### Kill the existing server - -If the above doesn't work, you can try to kill the server manually before reloading. - -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. - -### Run the server manually - -If none of these work, you can start the server yourself as is explained here: [Running the Continue server manually](https://continue.dev/docs/how-continue-works) - -### Still having trouble? - -Create a GitHub issue [here](https://github.com/continuedev/continue/issues/new?assignees=&labels=bug&projects=&template=bug-report-%F0%9F%90%9B.md&title=), leaving the details of your problem, and we'll be able to more quickly help you out. +> [Troubleshooting Continue](https://continue.dev/docs/troubleshooting) ## License diff --git a/extension/package-lock.json b/extension/package-lock.json index 568cefe2..cc583082 100644 --- a/extension/package-lock.json +++ b/extension/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.0.231", + "version": "0.0.232", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "continue", - "version": "0.0.231", + "version": "0.0.232", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", diff --git a/extension/package.json b/extension/package.json index af446bde..17398b91 100644 --- a/extension/package.json +++ b/extension/package.json @@ -14,7 +14,7 @@ "displayName": "Continue", "pricing": "Free", "description": "The open-source coding autopilot", - "version": "0.0.231", + "version": "0.0.232", "publisher": "Continue", "engines": { "vscode": "^1.67.0" diff --git a/extension/react-app/src/components/ComboBox.tsx b/extension/react-app/src/components/ComboBox.tsx index da559383..ba87cb9f 100644 --- a/extension/react-app/src/components/ComboBox.tsx +++ b/extension/react-app/src/components/ComboBox.tsx @@ -169,12 +169,12 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => { props.onInputValueChange(inputValue); if (inputValue.endsWith("@") || currentlyInContextQuery) { - const segs = inputValue.split("@"); + const segs = inputValue?.split("@") || []; if (segs.length > 1) { // Get search results and return setCurrentlyInContextQuery(true); - const providerAndQuery = segs[segs.length - 1]; + const providerAndQuery = segs[segs.length - 1] || ""; const [provider, query] = providerAndQuery.split(" "); searchClient .index(SEARCH_INDEX_NAME) -- cgit v1.2.3-70-g09d2