From f7a3659381f839b890f2c53086f7fedecf23d9ab Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 28 Jul 2023 17:55:45 -0700 Subject: fix: :zap: register vscode commands prior to server loading --- extension/src/activation/activate.ts | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'extension/src/activation/activate.ts') diff --git a/extension/src/activation/activate.ts b/extension/src/activation/activate.ts index 8bdc7e21..cbb840c0 100644 --- a/extension/src/activation/activate.ts +++ b/extension/src/activation/activate.ts @@ -7,6 +7,9 @@ import { startContinuePythonServer, } from "./environmentSetup"; import fetch from "node-fetch"; +import { registerAllCodeLensProviders } from "../lang-server/codeLens"; +import { registerAllCommands } from "../commands"; +import registerQuickFixProvider from "../lang-server/codeActions"; const PACKAGE_JSON_RAW_GITHUB_URL = "https://raw.githubusercontent.com/continuedev/continue/HEAD/extension/package.json"; @@ -46,6 +49,11 @@ export async function activateExtension(context: vscode.ExtensionContext) { }) .catch((e) => console.log("Error checking for extension updates: ", e)); + // Register commands and providers + registerAllCodeLensProviders(context); + registerAllCommands(context); + registerQuickFixProvider(); + // Start the server and display loader if taking > 2 seconds const sessionIdPromise = (async () => { await new Promise((resolve) => { -- cgit v1.2.3-70-g09d2 From 9a9b7aae313c8ca3e69acc6b49327fef47a2644d Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 28 Jul 2023 18:12:47 -0700 Subject: show "View Logs" popup during server loading --- extension/src/activation/activate.ts | 11 +++++++++++ extension/src/debugPanel.ts | 11 +---------- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'extension/src/activation/activate.ts') diff --git a/extension/src/activation/activate.ts b/extension/src/activation/activate.ts index cbb840c0..a47d5e97 100644 --- a/extension/src/activation/activate.ts +++ b/extension/src/activation/activate.ts @@ -86,6 +86,17 @@ export async function activateExtension(context: vscode.ExtensionContext) { return Promise.resolve(); } ); + + vscode.window + .showInformationMessage( + "Click here to view the server logs, or use the 'continue.viewLogs' VS Code command.", + "View Logs" + ) + .then((selection) => { + if (selection === "View Logs") { + vscode.commands.executeCommand("continue.viewLogs"); + } + }); } }, 2000); }); diff --git a/extension/src/debugPanel.ts b/extension/src/debugPanel.ts index d3972189..643563a2 100644 --- a/extension/src/debugPanel.ts +++ b/extension/src/debugPanel.ts @@ -272,16 +272,7 @@ export function setupDebugPanel( }); } ); - vscode.window - .showInformationMessage( - "Click here to view the server logs, or use the 'continue.viewLogs' VS Code command.", - "View Logs" - ) - .then((selection) => { - if (selection === "View Logs") { - vscode.commands.executeCommand("continue.viewLogs"); - } - }); + break; } } -- cgit v1.2.3-70-g09d2