-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathextension.ts
36 lines (33 loc) · 1.05 KB
/
extension.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/**
* This is the entry point for the extension.
*/
import * as vscode from "vscode";
import { setupCa } from "./continue/core/util/ca";
async function activateAsync(context: vscode.ExtensionContext) {
await setupCa();
const { activateExtension } = await import(
"./continue/extensions/vscode/src/activation/activate"
);
console.log("activating extension");
return await activateExtension(context);
}
export function activate(context: vscode.ExtensionContext) {
return activateAsync(context).catch((e) => {
console.log("Error activating extension: ", e);
vscode.window
.showWarningMessage(
"Error activating the Granite.Code extension.",
"View Logs",
"Retry",
)
.then((selection) => {
if (selection === "View Logs") {
vscode.commands.executeCommand("granite.viewLogs");
} else if (selection === "Retry") {
// Reload VS Code window
vcode.commands.executeCommand("workbench.action.reloadWindow");
}
});
});
}
export function deactivate() {}