summaryrefslogtreecommitdiff
path: root/extension/src
diff options
context:
space:
mode:
Diffstat (limited to 'extension/src')
-rw-r--r--extension/src/README.md2
-rw-r--r--extension/src/activation/activate.ts3
-rw-r--r--extension/src/commands.ts4
-rw-r--r--extension/src/debugPanel.ts13
-rw-r--r--extension/src/terminal/terminalEmulator.ts2
5 files changed, 19 insertions, 5 deletions
diff --git a/extension/src/README.md b/extension/src/README.md
index 76b96ea0..9fd73f9f 100644
--- a/extension/src/README.md
+++ b/extension/src/README.md
@@ -67,7 +67,7 @@ You should always have a packaged version installed in VS Code, because when Con
## Commands
- "Write a docstring for the current function" command (windows: `ctrl+alt+l`, mac: `shift+cmd+l`)
-- "Open Debug Panel" command
+- "Open Continue GUI" command
- "Ask a question from input box" command (windows: `ctrl+alt+j`, mac: `shift+cmd+j`)
- "Open Captured Terminal" command
- "Ask a question from webview" command (what context is it given?)
diff --git a/extension/src/activation/activate.ts b/extension/src/activation/activate.ts
index 40def480..293ee26c 100644
--- a/extension/src/activation/activate.ts
+++ b/extension/src/activation/activate.ts
@@ -7,6 +7,7 @@ import * as path from "path";
// import { openCapturedTerminal } from "../terminal/terminalEmulator";
import IdeProtocolClient from "../continueIdeClient";
import { getContinueServerUrl } from "../bridge";
+import { setupDebugPanel } from "../debugPanel";
export let extensionContext: vscode.ExtensionContext | undefined = undefined;
@@ -21,6 +22,8 @@ export function activateExtension(
registerAllCodeLensProviders(context);
registerAllCommands(context);
+ // vscode.window.registerWebviewViewProvider("continue.continueGUIView", setupDebugPanel);
+
let serverUrl = getContinueServerUrl();
ideProtocolClient = new IdeProtocolClient(
diff --git a/extension/src/commands.ts b/extension/src/commands.ts
index f0c1744b..c98cd3c3 100644
--- a/extension/src/commands.ts
+++ b/extension/src/commands.ts
@@ -61,7 +61,7 @@ const commandsMap: { [command: string]: (...args: any) => any } = {
"continue.suggestionUp": suggestionUpCommand,
"continue.acceptSuggestion": acceptSuggestionCommand,
"continue.rejectSuggestion": rejectSuggestionCommand,
- "continue.openDebugPanel": () => {
+ "continue.openContinueGUI": () => {
ideProtocolClient.openGUI();
},
"continue.focusContinueInput": async () => {
@@ -111,7 +111,7 @@ const commandsMap: { [command: string]: (...args: any) => any } = {
vscode.window.showInformationMessage("The test passes!");
return;
}
- vscode.commands.executeCommand("continue.openDebugPanel").then(() => {
+ vscode.commands.executeCommand("continue.openContinueGUI").then(() => {
setTimeout(() => {
debugPanelWebview?.postMessage({
type: "traceback",
diff --git a/extension/src/debugPanel.ts b/extension/src/debugPanel.ts
index 87c33da1..7407faf4 100644
--- a/extension/src/debugPanel.ts
+++ b/extension/src/debugPanel.ts
@@ -135,7 +135,7 @@ let streamManager = new StreamManager();
export let debugPanelWebview: vscode.Webview | undefined;
export function setupDebugPanel(
- panel: vscode.WebviewPanel,
+ panel: vscode.WebviewPanel | vscode.WebviewView,
context: vscode.ExtensionContext | undefined,
sessionId: string
): string {
@@ -487,3 +487,14 @@ export function setupDebugPanel(
</body>
</html>`;
}
+
+// class ContinueGUIWebviewViewProvider implements vscode.WebviewViewProvider {
+// public static readonly viewType = "continue.continueGUIView";
+// resolveWebviewView(
+// webviewView: vscode.WebviewView,
+// context: vscode.WebviewViewResolveContext<unknown>,
+// token: vscode.CancellationToken
+// ): void | Thenable<void> {
+// setupDebugPanel(webviewView, context, sessionId);
+// }
+// }
diff --git a/extension/src/terminal/terminalEmulator.ts b/extension/src/terminal/terminalEmulator.ts
index ba860b24..6cf65970 100644
--- a/extension/src/terminal/terminalEmulator.ts
+++ b/extension/src/terminal/terminalEmulator.ts
@@ -19,7 +19,7 @@
// });
// } else {
// vscode.commands
-// .executeCommand("continue.openDebugPanel", extensionContext)
+// .executeCommand("continue.openContinueGUI", extensionContext)
// .then(() => {
// // TODO: Waiting for the webview to load, but should add a hook to the onLoad message event. Same thing in autodebugTest command in commands.ts
// setTimeout(() => {