summaryrefslogtreecommitdiff
path: root/extension/src
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-09-02 15:02:18 -0700
committerNate Sesti <sestinj@gmail.com>2023-09-02 15:02:18 -0700
commite1a0290d5a699e30464f1e682cb11c6aa119bd59 (patch)
treeec500f97c69d358050b118f36f2eb5cae8081fad /extension/src
parent5653883ded65d02deb0ef9ec130553ff493f8f23 (diff)
downloadsncontinue-e1a0290d5a699e30464f1e682cb11c6aa119bd59.tar.gz
sncontinue-e1a0290d5a699e30464f1e682cb11c6aa119bd59.tar.bz2
sncontinue-e1a0290d5a699e30464f1e682cb11c6aa119bd59.zip
fix: :bug: fix timeout type
Diffstat (limited to 'extension/src')
-rw-r--r--extension/src/activation/environmentSetup.ts16
1 files changed, 14 insertions, 2 deletions
diff --git a/extension/src/activation/environmentSetup.ts b/extension/src/activation/environmentSetup.ts
index 3aa536d0..9be495ff 100644
--- a/extension/src/activation/environmentSetup.ts
+++ b/extension/src/activation/environmentSetup.ts
@@ -236,7 +236,13 @@ export async function startContinuePythonServer(redownload: boolean = true) {
}
if (shouldDownload && redownload) {
- await vscode.window.withProgress(
+ let timeout = setTimeout(() => {
+ vscode.window.showErrorMessage(
+ `It looks like the Continue server is taking a while to download. If this persists, you can manually download the binary or run it from source: https://continue.dev/docs/troubleshooting#run-the-server-manually.`
+ );
+ }, 20_000);
+
+ let download = vscode.window.withProgress(
{
location: vscode.ProgressLocation.Notification,
title: "Installing Continue server...",
@@ -246,7 +252,13 @@ export async function startContinuePythonServer(redownload: boolean = true) {
await downloadFromS3(bucket, fileName, destination, "us-west-1");
}
);
- console.log("Downloaded server executable at ", destination);
+ try {
+ await download;
+ console.log("Downloaded server executable at ", destination);
+ clearTimeout(timeout);
+ } catch (e) {
+ console.log("Failed to download server executable", e);
+ }
}
// Get name of the corresponding executable for platform