From ff688d096f62e538f181b9b5ae84b1b0f930c3bf Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sun, 25 Jun 2023 14:19:07 -0700 Subject: run locally without interference --- extension/src/activation/environmentSetup.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extension/src/activation/environmentSetup.ts') diff --git a/extension/src/activation/environmentSetup.ts b/extension/src/activation/environmentSetup.ts index 593b727e..54c263bd 100644 --- a/extension/src/activation/environmentSetup.ts +++ b/extension/src/activation/environmentSetup.ts @@ -180,7 +180,7 @@ export async function startContinuePythonServer() { await setupPythonEnv(); // Check vscode settings - let serverUrl = getContinueServerUrl(); + const serverUrl = getContinueServerUrl(); if (serverUrl !== "http://localhost:8000") { return; } -- cgit v1.2.3-70-g09d2 From dd30db17b7de063c07b4fd0e41f390c47fe4a399 Mon Sep 17 00:00:00 2001 From: Ty Dunn Date: Sun, 25 Jun 2023 21:33:01 -0700 Subject: && -> ; --- extension/src/activation/environmentSetup.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'extension/src/activation/environmentSetup.ts') diff --git a/extension/src/activation/environmentSetup.ts b/extension/src/activation/environmentSetup.ts index 54c263bd..66e1c722 100644 --- a/extension/src/activation/environmentSetup.ts +++ b/extension/src/activation/environmentSetup.ts @@ -121,7 +121,7 @@ async function setupPythonEnv() { activateCmd, pipUpgradeCmd, `${pipCmd} install -r requirements.txt`, - ].join(" && "); + ].join(" ; "); const [, stderr] = await runCommand(installRequirementsCommand); if (stderr) { throw new Error(stderr); @@ -199,7 +199,7 @@ export async function startContinuePythonServer() { let command = `cd ${path.join( getExtensionUri().fsPath, "scripts" - )} && ${activateCmd} && cd .. && ${pythonCmd} -m scripts.run_continue_server`; + )} ; ${activateCmd} ; cd .. ; ${pythonCmd} -m scripts.run_continue_server`; return new Promise(async (resolve, reject) => { try { @@ -255,10 +255,10 @@ export async function downloadPython3() { throw new Error("python3 not found"); } else if (os === "linux") { command = - "sudo apt update && upgrade && sudo apt install python3 python3-pip"; + "sudo apt update ; upgrade ; sudo apt install python3 python3-pip"; } else if (os === "win32") { command = - "wget -O python_installer.exe https://www.python.org/ftp/python/3.11.3/python-3.11.3-amd64.exe && python_installer.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0"; + "wget -O python_installer.exe https://www.python.org/ftp/python/3.11.3/python-3.11.3-amd64.exe ; python_installer.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0"; pythonCmd = "python"; } -- cgit v1.2.3-70-g09d2 From 7ef8f8e129035f0f40640b52d9bacd2bcc102304 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 26 Jun 2023 13:27:56 -0700 Subject: check for requirements installed separately of env --- extension/src/activation/environmentSetup.ts | 85 ++++++++++++++++------------ 1 file changed, 49 insertions(+), 36 deletions(-) (limited to 'extension/src/activation/environmentSetup.ts') diff --git a/extension/src/activation/environmentSetup.ts b/extension/src/activation/environmentSetup.ts index 66e1c722..364b6af2 100644 --- a/extension/src/activation/environmentSetup.ts +++ b/extension/src/activation/environmentSetup.ts @@ -77,54 +77,67 @@ function checkEnvExists() { ); } +function checkRequirementsInstalled() { + return fs.existsSync( + path.join(getExtensionUri().fsPath, "scripts", ".continue_env_installed") + ); +} + async function setupPythonEnv() { console.log("Setting up python env for Continue extension..."); - if (checkEnvExists()) return; - - // Assemble the command to create the env const [pythonCmd, pipCmd] = await getPythonPipCommands(); const [activateCmd, pipUpgradeCmd] = getActivateUpgradeCommands( pythonCmd, pipCmd ); - const createEnvCommand = [ - `cd ${path.join(getExtensionUri().fsPath, "scripts")}`, - `${pythonCmd} -m venv env`, - ].join("; "); + if (checkEnvExists()) { + console.log("Python env already exists, skipping..."); + } else { + // Assemble the command to create the env + const createEnvCommand = [ + `cd ${path.join(getExtensionUri().fsPath, "scripts")}`, + `${pythonCmd} -m venv env`, + ].join("; "); - // Repeat until it is successfully created (sometimes it fails to generate the bin, need to try again) - while (true) { - const [, stderr] = await runCommand(createEnvCommand); - if (stderr) { - throw new Error(stderr); - } - if (checkEnvExists()) { - break; - } else { - // Remove the env and try again - const removeCommand = `rm -rf ${path.join( - getExtensionUri().fsPath, - "scripts", - "env" - )}`; - await runCommand(removeCommand); + // Repeat until it is successfully created (sometimes it fails to generate the bin, need to try again) + while (true) { + const [, stderr] = await runCommand(createEnvCommand); + if (stderr) { + throw new Error(stderr); + } + if (checkEnvExists()) { + break; + } else { + // Remove the env and try again + const removeCommand = `rm -rf ${path.join( + getExtensionUri().fsPath, + "scripts", + "env" + )}`; + await runCommand(removeCommand); + } } + console.log( + "Successfully set up python env at ", + getExtensionUri().fsPath + "/scripts/env" + ); } - console.log( - "Successfully set up python env at ", - getExtensionUri().fsPath + "/scripts/env" - ); - const installRequirementsCommand = [ - `cd ${path.join(getExtensionUri().fsPath, "scripts")}`, - activateCmd, - pipUpgradeCmd, - `${pipCmd} install -r requirements.txt`, - ].join(" ; "); - const [, stderr] = await runCommand(installRequirementsCommand); - if (stderr) { - throw new Error(stderr); + if (checkRequirementsInstalled()) { + console.log("Python requirements already installed, skipping..."); + } else { + const installRequirementsCommand = [ + `cd ${path.join(getExtensionUri().fsPath, "scripts")}`, + activateCmd, + pipUpgradeCmd, + `${pipCmd} install -r requirements.txt`, + "touch .continue_env_installed", + ].join(" ; "); + const [, stderr] = await runCommand(installRequirementsCommand); + if (stderr) { + throw new Error(stderr); + } } } -- cgit v1.2.3-70-g09d2 From 0862b388dc0f07e45b6daeaec1f8c05925623692 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 26 Jun 2023 14:50:04 -0700 Subject: retry setup patch --- extension/package-lock.json | 4 +- extension/package.json | 2 +- extension/react-app/src/tabs/gui.tsx | 4 +- extension/scripts/.continue_env_installed | 0 extension/scripts/.gitignore | 4 +- .../scripts/continuedev-0.1.1-py3-none-any.whl | Bin 89627 -> 0 bytes extension/src/activation/environmentSetup.ts | 108 +++++++++++++-------- 7 files changed, 73 insertions(+), 49 deletions(-) delete mode 100644 extension/scripts/.continue_env_installed delete mode 100644 extension/scripts/continuedev-0.1.1-py3-none-any.whl (limited to 'extension/src/activation/environmentSetup.ts') diff --git a/extension/package-lock.json b/extension/package-lock.json index 98dfc223..fcd4c755 100644 --- a/extension/package-lock.json +++ b/extension/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.0.67", + "version": "0.0.70", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "continue", - "version": "0.0.67", + "version": "0.0.70", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", diff --git a/extension/package.json b/extension/package.json index a51bb6d0..b56c60f4 100644 --- a/extension/package.json +++ b/extension/package.json @@ -14,7 +14,7 @@ "displayName": "Continue", "pricing": "Free", "description": "Accelerating software development with language models", - "version": "0.0.67", + "version": "0.0.70", "publisher": "Continue", "engines": { "vscode": "^1.74.0" diff --git a/extension/react-app/src/tabs/gui.tsx b/extension/react-app/src/tabs/gui.tsx index 445d5700..13b74423 100644 --- a/extension/react-app/src/tabs/gui.tsx +++ b/extension/react-app/src/tabs/gui.tsx @@ -352,9 +352,7 @@ function GUI(props: GUIProps) { {typeof client === "undefined" && ( <> -

- Trying to reconnect with server... -

+

Loading Continue server...

)} {history?.timeline.map((node: HistoryNode, index: number) => { diff --git a/extension/scripts/.continue_env_installed b/extension/scripts/.continue_env_installed deleted file mode 100644 index e69de29b..00000000 diff --git a/extension/scripts/.gitignore b/extension/scripts/.gitignore index 7af27c08..fbb3bf9f 100644 --- a/extension/scripts/.gitignore +++ b/extension/scripts/.gitignore @@ -1,3 +1,5 @@ testdb env -stdout.txt \ No newline at end of file +stdout.txt +.continue_env_installed +**.whl \ No newline at end of file diff --git a/extension/scripts/continuedev-0.1.1-py3-none-any.whl b/extension/scripts/continuedev-0.1.1-py3-none-any.whl deleted file mode 100644 index 4d1c8fb2..00000000 Binary files a/extension/scripts/continuedev-0.1.1-py3-none-any.whl and /dev/null differ diff --git a/extension/src/activation/environmentSetup.ts b/extension/src/activation/environmentSetup.ts index 364b6af2..25b6f643 100644 --- a/extension/src/activation/environmentSetup.ts +++ b/extension/src/activation/environmentSetup.ts @@ -7,6 +7,25 @@ import * as fs from "fs"; import rebuild from "@electron/rebuild"; import { getContinueServerUrl } from "../bridge"; import fetch from "node-fetch"; +import * as vscode from "vscode"; + +const MAX_RETRIES = 5; +async function retryThenFail( + fn: () => Promise, + retries: number = MAX_RETRIES +): Promise { + try { + return await fn(); + } catch (e) { + if (retries > 0) { + return await retryThenFail(fn, retries - 1); + } + vscode.window.showErrorMessage( + "Failed to set up Continue extension. Please email nate@continue.dev and we'll get this fixed ASAP!" + ); + throw e; + } +} async function runCommand(cmd: string): Promise<[string, string | undefined]> { console.log("Running command: ", cmd); @@ -91,6 +110,7 @@ async function setupPythonEnv() { pythonCmd, pipCmd ); + if (checkEnvExists()) { console.log("Python env already exists, skipping..."); } else { @@ -124,21 +144,23 @@ async function setupPythonEnv() { ); } - if (checkRequirementsInstalled()) { - console.log("Python requirements already installed, skipping..."); - } else { - const installRequirementsCommand = [ - `cd ${path.join(getExtensionUri().fsPath, "scripts")}`, - activateCmd, - pipUpgradeCmd, - `${pipCmd} install -r requirements.txt`, - "touch .continue_env_installed", - ].join(" ; "); - const [, stderr] = await runCommand(installRequirementsCommand); - if (stderr) { - throw new Error(stderr); + await retryThenFail(async () => { + if (checkRequirementsInstalled()) { + console.log("Python requirements already installed, skipping..."); + } else { + const installRequirementsCommand = [ + `cd ${path.join(getExtensionUri().fsPath, "scripts")}`, + activateCmd, + pipUpgradeCmd, + `${pipCmd} install -r requirements.txt`, + "touch .continue_env_installed", + ].join(" ; "); + const [, stderr] = await runCommand(installRequirementsCommand); + if (stderr) { + throw new Error(stderr); + } } - } + }); } function readEnvFile(path: string) { @@ -198,10 +220,6 @@ export async function startContinuePythonServer() { return; } - console.log("Starting Continue python server..."); - - if (await checkServerRunning(serverUrl)) return; - let activateCmd = ". env/bin/activate"; let pythonCmd = "python3"; if (process.platform == "win32") { @@ -214,33 +232,39 @@ export async function startContinuePythonServer() { "scripts" )} ; ${activateCmd} ; cd .. ; ${pythonCmd} -m scripts.run_continue_server`; - return new Promise(async (resolve, reject) => { - try { - const child = spawn(command, { - shell: true, - }); - child.stdout.on("data", (data: any) => { - console.log(`stdout: ${data}`); - }); - child.stderr.on("data", (data: any) => { - console.log(`stderr: ${data}`); - if (data.includes("Uvicorn running on")) { - console.log("Successfully started Continue python server"); + return await retryThenFail(async () => { + console.log("Starting Continue python server..."); + + if (await checkServerRunning(serverUrl)) return; + + return new Promise(async (resolve, reject) => { + try { + const child = spawn(command, { + shell: true, + }); + child.stdout.on("data", (data: any) => { + console.log(`stdout: ${data}`); + }); + child.stderr.on("data", (data: any) => { + console.log(`stderr: ${data}`); + if (data.includes("Uvicorn running on")) { + console.log("Successfully started Continue python server"); + resolve(null); + } + }); + child.on("error", (error: any) => { + console.log(`error: ${error.message}`); + }); + } catch (e) { + console.log("Failed to start Continue python server", e); + // If failed, check if it's because the server is already running (might have happened just after we checked above) + if (await checkServerRunning(serverUrl)) { resolve(null); + } else { + reject(); } - }); - child.on("error", (error: any) => { - console.log(`error: ${error.message}`); - }); - } catch (e) { - console.log("Failed to start Continue python server", e); - // If failed, check if it's because the server is already running (might have happened just after we checked above) - if (await checkServerRunning(serverUrl)) { - resolve(null); - } else { - reject(); } - } + }); }); } -- cgit v1.2.3-70-g09d2 From 5c3dddc47a7e04015f3124310b0f815db0fc23f9 Mon Sep 17 00:00:00 2001 From: Ty Dunn Date: Mon, 26 Jun 2023 21:42:14 -0700 Subject: fixing on windows --- extension/src/activation/environmentSetup.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'extension/src/activation/environmentSetup.ts') diff --git a/extension/src/activation/environmentSetup.ts b/extension/src/activation/environmentSetup.ts index 25b6f643..6138dc64 100644 --- a/extension/src/activation/environmentSetup.ts +++ b/extension/src/activation/environmentSetup.ts @@ -71,14 +71,16 @@ async function getPythonPipCommands() { return [pythonCmd, pipCmd]; } -function getActivateUpgradeCommands(pythonCmd: string, pipCmd: string) { +function getActivateUpgradeTouchCommands(pythonCmd: string, pipCmd: string) { let activateCmd = ". env/bin/activate"; let pipUpgradeCmd = `${pipCmd} install --upgrade pip`; + let touchCmd = "touch .continue_env_installed"; if (process.platform == "win32") { activateCmd = ".\\env\\Scripts\\activate"; pipUpgradeCmd = `${pythonCmd} -m pip install --upgrade pip`; + touchCmd = "ni .continue_env_installed -type file"; } - return [activateCmd, pipUpgradeCmd]; + return [activateCmd, pipUpgradeCmd, touchCmd]; } function checkEnvExists() { @@ -106,7 +108,7 @@ async function setupPythonEnv() { console.log("Setting up python env for Continue extension..."); const [pythonCmd, pipCmd] = await getPythonPipCommands(); - const [activateCmd, pipUpgradeCmd] = getActivateUpgradeCommands( + const [activateCmd, pipUpgradeCmd, touchCmd] = getActivateUpgradeTouchCommands( pythonCmd, pipCmd ); @@ -153,7 +155,7 @@ async function setupPythonEnv() { activateCmd, pipUpgradeCmd, `${pipCmd} install -r requirements.txt`, - "touch .continue_env_installed", + touchCmd, ].join(" ; "); const [, stderr] = await runCommand(installRequirementsCommand); if (stderr) { @@ -230,7 +232,7 @@ export async function startContinuePythonServer() { let command = `cd ${path.join( getExtensionUri().fsPath, "scripts" - )} ; ${activateCmd} ; cd .. ; ${pythonCmd} -m scripts.run_continue_server`; + )} && ${activateCmd} && cd .. && ${pythonCmd} -m scripts.run_continue_server`; return await retryThenFail(async () => { console.log("Starting Continue python server..."); -- cgit v1.2.3-70-g09d2 From d1a1800124e9b746924f5f3186060cc676e6527b Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 26 Jun 2023 22:00:03 -0700 Subject: quotes around paths --- extension/package-lock.json | 4 ++-- extension/package.json | 2 +- extension/src/activation/environmentSetup.ts | 18 ++++++++---------- extension/src/continueIdeClient.ts | 6 +++--- 4 files changed, 14 insertions(+), 16 deletions(-) (limited to 'extension/src/activation/environmentSetup.ts') diff --git a/extension/package-lock.json b/extension/package-lock.json index fcd4c755..0359ad49 100644 --- a/extension/package-lock.json +++ b/extension/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.0.70", + "version": "0.0.71", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "continue", - "version": "0.0.70", + "version": "0.0.71", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", diff --git a/extension/package.json b/extension/package.json index b56c60f4..96ffbd98 100644 --- a/extension/package.json +++ b/extension/package.json @@ -14,7 +14,7 @@ "displayName": "Continue", "pricing": "Free", "description": "Accelerating software development with language models", - "version": "0.0.70", + "version": "0.0.71", "publisher": "Continue", "engines": { "vscode": "^1.74.0" diff --git a/extension/src/activation/environmentSetup.ts b/extension/src/activation/environmentSetup.ts index 6138dc64..c99ed1dd 100644 --- a/extension/src/activation/environmentSetup.ts +++ b/extension/src/activation/environmentSetup.ts @@ -108,17 +108,15 @@ async function setupPythonEnv() { console.log("Setting up python env for Continue extension..."); const [pythonCmd, pipCmd] = await getPythonPipCommands(); - const [activateCmd, pipUpgradeCmd, touchCmd] = getActivateUpgradeTouchCommands( - pythonCmd, - pipCmd - ); + const [activateCmd, pipUpgradeCmd, touchCmd] = + getActivateUpgradeTouchCommands(pythonCmd, pipCmd); if (checkEnvExists()) { console.log("Python env already exists, skipping..."); } else { // Assemble the command to create the env const createEnvCommand = [ - `cd ${path.join(getExtensionUri().fsPath, "scripts")}`, + `cd "${path.join(getExtensionUri().fsPath, "scripts")}"`, `${pythonCmd} -m venv env`, ].join("; "); @@ -132,11 +130,11 @@ async function setupPythonEnv() { break; } else { // Remove the env and try again - const removeCommand = `rm -rf ${path.join( + const removeCommand = `rm -rf "${path.join( getExtensionUri().fsPath, "scripts", "env" - )}`; + )}"`; await runCommand(removeCommand); } } @@ -151,7 +149,7 @@ async function setupPythonEnv() { console.log("Python requirements already installed, skipping..."); } else { const installRequirementsCommand = [ - `cd ${path.join(getExtensionUri().fsPath, "scripts")}`, + `cd "${path.join(getExtensionUri().fsPath, "scripts")}"`, activateCmd, pipUpgradeCmd, `${pipCmd} install -r requirements.txt`, @@ -229,10 +227,10 @@ export async function startContinuePythonServer() { pythonCmd = "python"; } - let command = `cd ${path.join( + let command = `cd "${path.join( getExtensionUri().fsPath, "scripts" - )} && ${activateCmd} && cd .. && ${pythonCmd} -m scripts.run_continue_server`; + )}" && ${activateCmd} && cd .. && ${pythonCmd} -m scripts.run_continue_server`; return await retryThenFail(async () => { console.log("Starting Continue python server..."); diff --git a/extension/src/continueIdeClient.ts b/extension/src/continueIdeClient.ts index 3a77e348..08a0b74d 100644 --- a/extension/src/continueIdeClient.ts +++ b/extension/src/continueIdeClient.ts @@ -329,9 +329,9 @@ class IdeProtocolClient { if (vscode.window.terminals.length) { vscode.window.terminals[0].sendText(command); } else { - const terminal = vscode.window.createTerminal(); - terminal.show(); - terminal.sendText(command); + const terminal = vscode.window.createTerminal(); + terminal.show(); + terminal.sendText(command); } } -- cgit v1.2.3-70-g09d2 From e40621ab17a7e02422553e746de7d7bd1fc78cc5 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 26 Jun 2023 22:05:54 -0700 Subject: ampersands instead of semi-colons --- extension/package-lock.json | 4 ++-- extension/package.json | 2 +- extension/src/activation/environmentSetup.ts | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'extension/src/activation/environmentSetup.ts') diff --git a/extension/package-lock.json b/extension/package-lock.json index 0359ad49..61222648 100644 --- a/extension/package-lock.json +++ b/extension/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.0.71", + "version": "0.0.72", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "continue", - "version": "0.0.71", + "version": "0.0.72", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", diff --git a/extension/package.json b/extension/package.json index 96ffbd98..78b09d35 100644 --- a/extension/package.json +++ b/extension/package.json @@ -14,7 +14,7 @@ "displayName": "Continue", "pricing": "Free", "description": "Accelerating software development with language models", - "version": "0.0.71", + "version": "0.0.72", "publisher": "Continue", "engines": { "vscode": "^1.74.0" diff --git a/extension/src/activation/environmentSetup.ts b/extension/src/activation/environmentSetup.ts index c99ed1dd..4e6e5786 100644 --- a/extension/src/activation/environmentSetup.ts +++ b/extension/src/activation/environmentSetup.ts @@ -118,7 +118,7 @@ async function setupPythonEnv() { const createEnvCommand = [ `cd "${path.join(getExtensionUri().fsPath, "scripts")}"`, `${pythonCmd} -m venv env`, - ].join("; "); + ].join(" && "); // Repeat until it is successfully created (sometimes it fails to generate the bin, need to try again) while (true) { @@ -154,7 +154,7 @@ async function setupPythonEnv() { pipUpgradeCmd, `${pipCmd} install -r requirements.txt`, touchCmd, - ].join(" ; "); + ].join(" && "); const [, stderr] = await runCommand(installRequirementsCommand); if (stderr) { throw new Error(stderr); @@ -292,7 +292,7 @@ export async function downloadPython3() { throw new Error("python3 not found"); } else if (os === "linux") { command = - "sudo apt update ; upgrade ; sudo apt install python3 python3-pip"; + "sudo apt update && upgrade && sudo apt install python3 python3-pip"; } else if (os === "win32") { command = "wget -O python_installer.exe https://www.python.org/ftp/python/3.11.3/python-3.11.3-amd64.exe ; python_installer.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0"; -- cgit v1.2.3-70-g09d2 From d2842f655c4d02952d8cf58ec3a2c927704cabae Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 26 Jun 2023 22:26:17 -0700 Subject: back to ampersands except for in spawn --- extension/package-lock.json | 4 ++-- extension/package.json | 2 +- extension/src/activation/environmentSetup.ts | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'extension/src/activation/environmentSetup.ts') diff --git a/extension/package-lock.json b/extension/package-lock.json index 61222648..88cad6c6 100644 --- a/extension/package-lock.json +++ b/extension/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.0.72", + "version": "0.0.73", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "continue", - "version": "0.0.72", + "version": "0.0.73", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", diff --git a/extension/package.json b/extension/package.json index 78b09d35..ae55a96b 100644 --- a/extension/package.json +++ b/extension/package.json @@ -14,7 +14,7 @@ "displayName": "Continue", "pricing": "Free", "description": "Accelerating software development with language models", - "version": "0.0.72", + "version": "0.0.73", "publisher": "Continue", "engines": { "vscode": "^1.74.0" diff --git a/extension/src/activation/environmentSetup.ts b/extension/src/activation/environmentSetup.ts index 4e6e5786..ec0e228d 100644 --- a/extension/src/activation/environmentSetup.ts +++ b/extension/src/activation/environmentSetup.ts @@ -118,7 +118,7 @@ async function setupPythonEnv() { const createEnvCommand = [ `cd "${path.join(getExtensionUri().fsPath, "scripts")}"`, `${pythonCmd} -m venv env`, - ].join(" && "); + ].join(" ; "); // Repeat until it is successfully created (sometimes it fails to generate the bin, need to try again) while (true) { @@ -154,7 +154,7 @@ async function setupPythonEnv() { pipUpgradeCmd, `${pipCmd} install -r requirements.txt`, touchCmd, - ].join(" && "); + ].join(" ; "); const [, stderr] = await runCommand(installRequirementsCommand); if (stderr) { throw new Error(stderr); @@ -292,7 +292,7 @@ export async function downloadPython3() { throw new Error("python3 not found"); } else if (os === "linux") { command = - "sudo apt update && upgrade && sudo apt install python3 python3-pip"; + "sudo apt update ; upgrade ; sudo apt install python3 python3-pip"; } else if (os === "win32") { command = "wget -O python_installer.exe https://www.python.org/ftp/python/3.11.3/python-3.11.3-amd64.exe ; python_installer.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0"; -- cgit v1.2.3-70-g09d2