run locally without interference
This commit is contained in:
parent
5419dde036
commit
2d37d2bd1e
3 changed files with 8 additions and 9 deletions
|
|
@ -7,24 +7,26 @@ import IdeProtocolClient from "../continueIdeClient";
|
|||
import { getContinueServerUrl } from "../bridge";
|
||||
import { CapturedTerminal } from "../terminal/terminalEmulator";
|
||||
import { setupDebugPanel, ContinueGUIWebviewViewProvider } from "../debugPanel";
|
||||
import { startContinuePythonServer } from "./environmentSetup";
|
||||
// import { CapturedTerminal } from "../terminal/terminalEmulator";
|
||||
|
||||
export let extensionContext: vscode.ExtensionContext | undefined = undefined;
|
||||
|
||||
export let ideProtocolClient: IdeProtocolClient;
|
||||
|
||||
export function activateExtension(
|
||||
export async function activateExtension(
|
||||
context: vscode.ExtensionContext,
|
||||
showTutorial: boolean
|
||||
) {
|
||||
sendTelemetryEvent(TelemetryEvent.ExtensionActivated);
|
||||
extensionContext = context;
|
||||
|
||||
sendTelemetryEvent(TelemetryEvent.ExtensionActivated);
|
||||
registerAllCodeLensProviders(context);
|
||||
registerAllCommands(context);
|
||||
|
||||
// vscode.window.registerWebviewViewProvider("continue.continueGUIView", setupDebugPanel);
|
||||
|
||||
let serverUrl = getContinueServerUrl();
|
||||
await startContinuePythonServer();
|
||||
const serverUrl = getContinueServerUrl();
|
||||
|
||||
ideProtocolClient = new IdeProtocolClient(
|
||||
`${serverUrl.replace("http", "ws")}/ide/ws`,
|
||||
|
|
@ -52,6 +54,4 @@ export function activateExtension(
|
|||
|
||||
// If any terminals are open to start, replace them
|
||||
// vscode.window.terminals.forEach((terminal) => {}
|
||||
|
||||
extensionContext = context;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ export async function startContinuePythonServer() {
|
|||
await setupPythonEnv();
|
||||
|
||||
// Check vscode settings
|
||||
let serverUrl = getContinueServerUrl();
|
||||
const serverUrl = getContinueServerUrl();
|
||||
if (serverUrl !== "http://localhost:8000") {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ async function dynamicImportAndActivate(
|
|||
showTutorial: boolean
|
||||
) {
|
||||
const { activateExtension } = await import("./activation/activate");
|
||||
activateExtension(context, showTutorial);
|
||||
await activateExtension(context, showTutorial);
|
||||
}
|
||||
|
||||
export function activate(context: vscode.ExtensionContext) {
|
||||
|
|
@ -25,7 +25,6 @@ export function activate(context: vscode.ExtensionContext) {
|
|||
cancellable: false,
|
||||
},
|
||||
async () => {
|
||||
await startContinuePythonServer();
|
||||
dynamicImportAndActivate(context, true);
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue