Small changes

This commit is contained in:
2026-02-17 03:27:02 +01:00
parent 9dd60a56de
commit 4376d780c0
3 changed files with 10 additions and 1 deletions
+7
View File
@@ -176,6 +176,13 @@ async function send<T>(
Public API
────────────────────────── */
export async function closeClient() {
if (!socket) return;
socket.close();
socket = null;
connecting = null;
}
export async function addRun(
useLocalhost: boolean,
problem: string,
+2
View File
@@ -4,6 +4,7 @@ import { startServer, stopServer } from "./server";
import os from "os";
import { exec } from "child_process";
import net from "net";
import { closeClient } from "./client";
var globalStatusBarItem: vscode.StatusBarItem | undefined;
@@ -105,6 +106,7 @@ export function activate(context: vscode.ExtensionContext) {
export function deactivate() {
stopServer(globalStatusBarItem as any);
closeClient();
}
export function canConnect(
+1 -1
View File
@@ -129,7 +129,7 @@ export function startMonitoring(useLocalhost: boolean, runId: string) {
moveId: moveId++,
changes: {
from: 0,
to: serverText.length,
to: serverText?.length || 0,
insert: editorText,
},
},