diff options
Diffstat (limited to 'extension')
-rw-r--r-- | extension/package.json | 7 | ||||
-rw-r--r-- | extension/src/activation/activate.ts | 3 | ||||
-rw-r--r-- | extension/src/activation/environmentSetup.ts | 40 |
3 files changed, 25 insertions, 25 deletions
diff --git a/extension/package.json b/extension/package.json index 8d91f113..93fcd5a1 100644 --- a/extension/package.json +++ b/extension/package.json @@ -47,12 +47,7 @@ "continue.serverUrl": { "type": "string", "default": "http://localhost:65432", - "description": "The URL of the Continue server. Only change this if you are running the server manually. If you want to use an LLM hosted at a custom URL, please see https://continue.dev/docs/customization#change-the-default-llm." - }, - "continue.OPENAI_API_KEY": { - "type": "string", - "default": null, - "description": "The OpenAI API key to use for code generation. Leave empty to get limited free usage of Continue." + "description": "The URL of the Continue server. Only change this if you are running the server manually. If you want to use an LLM hosted at a custom URL, please see https://continue.dev/docs/customization#change-the-default-llm. All other configuration is done in `~/.continue/config.py`, which you can access by using the '/config' slash command." } } }, diff --git a/extension/src/activation/activate.ts b/extension/src/activation/activate.ts index 560b970c..831d1160 100644 --- a/extension/src/activation/activate.ts +++ b/extension/src/activation/activate.ts @@ -54,9 +54,8 @@ export async function activateExtension(context: vscode.ExtensionContext) { registerAllCommands(context); registerQuickFixProvider(); - // Start the server and display loader if taking > 2 seconds + // Start the server const sessionIdPromise = (async () => { - // Start the server and set serverStarted to true when done await startContinuePythonServer(); console.log("Continue server started"); diff --git a/extension/src/activation/environmentSetup.ts b/extension/src/activation/environmentSetup.ts index d41cb289..1ca32841 100644 --- a/extension/src/activation/environmentSetup.ts +++ b/extension/src/activation/environmentSetup.ts @@ -231,23 +231,29 @@ export async function startContinuePythonServer() { let delay = 1000; // Delay between each attempt in milliseconds const spawnChild = () => { - const child = spawn(destination, { - detached: true, - stdio: "ignore", - }); - - child.on("error", (err: any) => { - if (attempts < maxAttempts) { - attempts++; - console.log( - `Error caught (likely EBUSY). Retrying attempt ${attempts}...` - ); - setTimeout(spawnChild, delay); - } else { - console.error("Failed to start subprocess.", err); - } - }); - child.unref(); + const retry = () => { + attempts++; + console.log( + `Error caught (likely EBUSY). Retrying attempt ${attempts}...` + ); + setTimeout(spawnChild, delay); + }; + try { + const child = spawn(destination, { + detached: true, + stdio: "ignore", + }); + child.on("error", (err: any) => { + if (attempts < maxAttempts) { + retry(); + } else { + console.error("Failed to start subprocess.", err); + } + }); + child.unref(); + } catch (e: any) { + retry(); + } }; spawnChild(); |