diff options
-rw-r--r-- | extension/src/commands.ts | 1 | ||||
-rw-r--r-- | extension/src/continueIdeClient.ts | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/extension/src/commands.ts b/extension/src/commands.ts index 5a880690..4ceac25d 100644 --- a/extension/src/commands.ts +++ b/extension/src/commands.ts @@ -71,6 +71,7 @@ const commandsMap: { [command: string]: (...args: any) => any } = { await vscode.window.showTextDocument(uri); }, "continue.debugTerminal": async () => { + vscode.commands.executeCommand("continue.continueGUIView.focus"); await ideProtocolClient.debugTerminal(); }, }; diff --git a/extension/src/continueIdeClient.ts b/extension/src/continueIdeClient.ts index 6c107a63..666b8ba0 100644 --- a/extension/src/continueIdeClient.ts +++ b/extension/src/continueIdeClient.ts @@ -497,6 +497,7 @@ class IdeProtocolClient { } async getTerminalContents(): Promise<string> { + const tempCopyBuffer = await vscode.env.clipboard.readText(); await vscode.commands.executeCommand("workbench.action.terminal.selectAll"); await vscode.commands.executeCommand( "workbench.action.terminal.copySelection" @@ -504,7 +505,8 @@ class IdeProtocolClient { await vscode.commands.executeCommand( "workbench.action.terminal.clearSelection" ); - let terminalContents = await vscode.env.clipboard.readText(); + const terminalContents = await vscode.env.clipboard.readText(); + await vscode.env.clipboard.writeText(tempCopyBuffer); return terminalContents; } |