summaryrefslogtreecommitdiff
path: root/extension/src/activation
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-07-27 11:23:55 -0700
committerNate Sesti <sestinj@gmail.com>2023-07-27 11:23:55 -0700
commit5d973490687c40922f2b7a2ddf2a3e19c207eb0f (patch)
treefab63009bd6014cd8ded1bd0a536727e0228b055 /extension/src/activation
parent4e47da8398ac1cecb6f7100568f0f7296baaeac9 (diff)
downloadsncontinue-5d973490687c40922f2b7a2ddf2a3e19c207eb0f.tar.gz
sncontinue-5d973490687c40922f2b7a2ddf2a3e19c207eb0f.tar.bz2
sncontinue-5d973490687c40922f2b7a2ddf2a3e19c207eb0f.zip
feat: :loud_sound: give users access to Continue server logs
can see logs in ~/.continue/continue.log
Diffstat (limited to 'extension/src/activation')
-rw-r--r--extension/src/activation/activate.ts4
-rw-r--r--extension/src/activation/environmentSetup.ts11
2 files changed, 14 insertions, 1 deletions
diff --git a/extension/src/activation/activate.ts b/extension/src/activation/activate.ts
index 430f9f4a..40f1bbd5 100644
--- a/extension/src/activation/activate.ts
+++ b/extension/src/activation/activate.ts
@@ -22,6 +22,10 @@ function getExtensionVersionInt(versionString: string): number {
export async function activateExtension(context: vscode.ExtensionContext) {
extensionContext = context;
console.log("Using Continue version: ", getExtensionVersion());
+ console.log(
+ "In workspace: ",
+ vscode.workspace.workspaceFolders?.[0].uri.fsPath
+ );
// Before anything else, check whether this is an out-of-date version of the extension
// Do so by grabbing the package.json off of the GitHub respository for now.
fetch(PACKAGE_JSON_RAW_GITHUB_URL)
diff --git a/extension/src/activation/environmentSetup.ts b/extension/src/activation/environmentSetup.ts
index 5a9345a6..c8998bee 100644
--- a/extension/src/activation/environmentSetup.ts
+++ b/extension/src/activation/environmentSetup.ts
@@ -53,7 +53,16 @@ async function retryThenFail(
}
} finally {
console.log("After retries, failed to set up Continue extension", msg);
- vscode.window.showErrorMessage(msg);
+ vscode.window
+ .showErrorMessage(msg, "View Logs", "Retry")
+ .then((selection) => {
+ if (selection === "View Logs") {
+ vscode.commands.executeCommand("continue.viewLogs");
+ } else if (selection === "Retry") {
+ // Reload VS Code window
+ vscode.commands.executeCommand("workbench.action.reloadWindow");
+ }
+ });
}
throw e;