summaryrefslogtreecommitdiff
path: root/extension/src/debugPanel.ts
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-05-31 16:13:01 -0400
committerNate Sesti <sestinj@gmail.com>2023-05-31 16:13:01 -0400
commitdd5b9f6b7f08f178d6034a57f97faea38442eb0a (patch)
treeb18b4dbc9b6db8b033b9c48d832960b11f9ac687 /extension/src/debugPanel.ts
parent22245d2cbf90daa9033d8551207aa986069d8b24 (diff)
downloadsncontinue-dd5b9f6b7f08f178d6034a57f97faea38442eb0a.tar.gz
sncontinue-dd5b9f6b7f08f178d6034a57f97faea38442eb0a.tar.bz2
sncontinue-dd5b9f6b7f08f178d6034a57f97faea38442eb0a.zip
checkpoint! protocol reform and it works now
Diffstat (limited to 'extension/src/debugPanel.ts')
-rw-r--r--extension/src/debugPanel.ts26
1 files changed, 19 insertions, 7 deletions
diff --git a/extension/src/debugPanel.ts b/extension/src/debugPanel.ts
index 4192595c..a295085f 100644
--- a/extension/src/debugPanel.ts
+++ b/extension/src/debugPanel.ts
@@ -16,7 +16,6 @@ import {
import { sendTelemetryEvent, TelemetryEvent } from "./telemetry";
import { RangeInFile, SerializedDebugContext } from "./client";
import { addFileSystemToDebugContext } from "./util/util";
-const WebSocket = require("ws");
class StreamManager {
private _fullText: string = "";
@@ -108,15 +107,15 @@ class WebsocketConnection {
this._onOpen = onOpen;
this._onClose = onClose;
- this._ws.onmessage = (event) => {
+ this._ws.addEventListener("message", (event) => {
this._onMessage(event.data);
- };
- this._ws.onclose = () => {
+ });
+ this._ws.addEventListener("close", () => {
this._onClose();
- };
- this._ws.onopen = () => {
+ });
+ this._ws.addEventListener("open", () => {
this._onOpen();
- };
+ });
}
public send(message: string) {
@@ -230,6 +229,19 @@ export function setupDebugPanel(
apiUrl: getContinueServerUrl(),
sessionId,
});
+
+ // // Listen for changes to server URL in settings
+ // vscode.workspace.onDidChangeConfiguration((event) => {
+ // if (event.affectsConfiguration("continue.serverUrl")) {
+ // debugPanelWebview?.postMessage({
+ // type: "onLoad",
+ // vscMachineId: vscode.env.machineId,
+ // apiUrl: getContinueServerUrl(),
+ // sessionId,
+ // });
+ // }
+ // });
+
break;
}