diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-07-30 22:30:00 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-07-30 22:30:00 -0700 |
commit | 57a572a420e16b08301f0c6738a1b414c59bce85 (patch) | |
tree | 2bdbc7831d66aafefe30a9e236ecc150d80024cc /extension/src/activation/environmentSetup.ts | |
parent | 1bc5777ed168e47e2ef2ab1b33eecf6cbd170a61 (diff) | |
parent | 8bd76be6c0925e0d5e5f6d239e9c6907df3cfd23 (diff) | |
download | sncontinue-57a572a420e16b08301f0c6738a1b414c59bce85.tar.gz sncontinue-57a572a420e16b08301f0c6738a1b414c59bce85.tar.bz2 sncontinue-57a572a420e16b08301f0c6738a1b414c59bce85.zip |
Merge remote-tracking branch 'continuedev/main' into llm-object-config-merge-main
Diffstat (limited to 'extension/src/activation/environmentSetup.ts')
-rw-r--r-- | extension/src/activation/environmentSetup.ts | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/extension/src/activation/environmentSetup.ts b/extension/src/activation/environmentSetup.ts index 44fb3b60..50a2783a 100644 --- a/extension/src/activation/environmentSetup.ts +++ b/extension/src/activation/environmentSetup.ts @@ -463,15 +463,13 @@ export async function startContinuePythonServer() { const command = `cd "${serverPath()}" && ${activateCmd} && cd .. && ${pythonCmd} -m server.run_continue_server`; - console.log("Starting Continue python server..."); - return new Promise(async (resolve, reject) => { + console.log("Starting Continue python server..."); try { const child = spawn(command, { shell: true, }); child.stderr.on("data", (data: any) => { - console.log(`stdout: ${data}`); if ( data.includes("Uvicorn running on") || // Successfully started the server data.includes("only one usage of each socket address") || // [windows] The server is already running (probably a simultaneously opened VS Code window) @@ -481,12 +479,22 @@ export async function startContinuePythonServer() { resolve(null); } else if (data.includes("ERROR") || data.includes("Traceback")) { console.log("Error starting Continue python server: ", data); + } else { + console.log(`stdout: ${data}`); } }); child.on("error", (error: any) => { console.log(`error: ${error.message}`); }); + child.on("close", (code: any) => { + console.log(`child process exited with code ${code}`); + }); + + child.stdout.on("data", (data: any) => { + console.log(`stdout: ${data}`); + }); + // Write the current version of vscode to a file called server_version.txt fs.writeFileSync(serverVersionPath(), getExtensionVersion()); } catch (e) { |