From b2dba8d5a4a8852fcea8bcd724e2f17d1d909a6e Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Tue, 18 Jul 2023 16:31:39 -0700 Subject: CONTRIBUTING.md --- extension/src/activation/activate.ts | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'extension/src/activation') diff --git a/extension/src/activation/activate.ts b/extension/src/activation/activate.ts index 8ea08e89..a7f6c55b 100644 --- a/extension/src/activation/activate.ts +++ b/extension/src/activation/activate.ts @@ -36,8 +36,8 @@ export async function activateExtension(context: vscode.ExtensionContext) { }) .catch((e) => console.log("Error checking for extension updates: ", e)); - // Wrap the server start logic in a new Promise - const serverStartPromise = new Promise((resolve, reject) => { + // Start the server and display loader if taking > 2 seconds + await new Promise((resolve) => { let serverStarted = false; // Start the server and set serverStarted to true when done @@ -71,15 +71,6 @@ export async function activateExtension(context: vscode.ExtensionContext) { }, 2000); }); - // Await the server start promise - await serverStartPromise; - - // Register commands and providers - sendTelemetryEvent(TelemetryEvent.ExtensionActivated); - registerAllCodeLensProviders(context); - registerAllCommands(context); - registerQuickFixProvider(); - // Initialize IDE Protocol Client const serverUrl = getContinueServerUrl(); ideProtocolClient = new IdeProtocolClient( @@ -87,6 +78,7 @@ export async function activateExtension(context: vscode.ExtensionContext) { context ); + // Register Continue GUI as sidebar webview, and beging a new session { const sessionIdPromise = await ideProtocolClient.getSessionId(); const provider = new ContinueGUIWebviewViewProvider(sessionIdPromise); -- cgit v1.2.3-70-g09d2