diff options
author | sestinj <sestinj@gmail.com> | 2023-08-10 01:39:09 -0700 |
---|---|---|
committer | sestinj <sestinj@gmail.com> | 2023-08-10 01:39:09 -0700 |
commit | 43d55d705d204ebc7ecb05bdaec2b32b6cb9d07f (patch) | |
tree | cfaefe120d1d7ff4e73c01e57f538ff9ec1eec27 /extension/src | |
parent | 94ff4ec95fc2c078fc164e20c9f99fccad5616e7 (diff) | |
download | sncontinue-43d55d705d204ebc7ecb05bdaec2b32b6cb9d07f.tar.gz sncontinue-43d55d705d204ebc7ecb05bdaec2b32b6cb9d07f.tar.bz2 sncontinue-43d55d705d204ebc7ecb05bdaec2b32b6cb9d07f.zip |
Remove clientgen, fix windows startup errors
Diffstat (limited to 'extension/src')
-rw-r--r-- | extension/src/activation/environmentSetup.ts | 15 | ||||
-rw-r--r-- | extension/src/debugPanel.ts | 4 | ||||
-rw-r--r-- | extension/src/util/util.ts | 9 |
3 files changed, 15 insertions, 13 deletions
diff --git a/extension/src/activation/environmentSetup.ts b/extension/src/activation/environmentSetup.ts index c2ac0b22..f0e41ca9 100644 --- a/extension/src/activation/environmentSetup.ts +++ b/extension/src/activation/environmentSetup.ts @@ -237,10 +237,14 @@ export async function startContinuePythonServer() { }; try { const child = spawn(destination, { - detached: true, - stdio: "ignore", windowsHide: true, }); + child.stdout.on("data", (data: any) => { + console.log(`stdout: ${data}`); + }); + child.stderr.on("data", (data: any) => { + console.log(`stderr: ${data}`); + }); child.on("error", (err: any) => { if (attempts < maxAttempts) { retry(); @@ -248,7 +252,12 @@ export async function startContinuePythonServer() { console.error("Failed to start subprocess.", err); } }); - child.unref(); + child.on("exit", (code: any, signal: any) => { + console.log("Subprocess exited with code", code, signal); + }); + child.on("close", (code: any, signal: any) => { + console.log("Subprocess closed with code", code, signal); + }); } catch (e: any) { console.log("Error starting server:", e); retry(); diff --git a/extension/src/debugPanel.ts b/extension/src/debugPanel.ts index e6dade37..61ff455a 100644 --- a/extension/src/debugPanel.ts +++ b/extension/src/debugPanel.ts @@ -5,7 +5,7 @@ import { getNonce, openEditorAndRevealRange, } from "./util/vscode"; -import { RangeInFile } from "./client"; +import { RangeInFile } from "../schema/RangeInFile"; import { setFocusedOnContinueInput } from "./commands"; const WebSocket = require("ws"); @@ -112,7 +112,7 @@ export function setupDebugPanel( } const rangeInFile: RangeInFile = { - range: e.selections[0], + range: e.selections[0] as any, filepath: e.textEditor.document.fileName, }; const filesystem = { diff --git a/extension/src/util/util.ts b/extension/src/util/util.ts index dfc10c90..15b34267 100644 --- a/extension/src/util/util.ts +++ b/extension/src/util/util.ts @@ -1,4 +1,4 @@ -import { RangeInFile, SerializedDebugContext } from "../client"; +import { RangeInFile } from "../../schema/RangeInFile"; import * as fs from "fs"; const os = require("os"); @@ -95,13 +95,6 @@ export function codeSelectionsToVirtualFileSystem( return virtualFileSystem; } -export function addFileSystemToDebugContext( - ctx: SerializedDebugContext -): SerializedDebugContext { - ctx.filesystem = codeSelectionsToVirtualFileSystem(ctx.rangesInFiles); - return ctx; -} - export function debounced(delay: number, fn: Function) { let timerId: NodeJS.Timeout | null; return function (...args: any[]) { |