summaryrefslogtreecommitdiff
path: root/extension
diff options
context:
space:
mode:
Diffstat (limited to 'extension')
-rw-r--r--extension/package.json10
-rw-r--r--extension/src/commands.ts12
-rw-r--r--extension/src/continueIdeClient.ts4
3 files changed, 26 insertions, 0 deletions
diff --git a/extension/package.json b/extension/package.json
index 30690397..79681f6b 100644
--- a/extension/package.json
+++ b/extension/package.json
@@ -106,6 +106,11 @@
"command": "continue.rejectAllSuggestions",
"category": "Continue",
"title": "Reject All Suggestions"
+ },
+ {
+ "command": "continue.quickTextEntry",
+ "category": "Continue",
+ "title": "Quick Text Entry"
}
],
"keybindings": [
@@ -138,6 +143,11 @@
"command": "continue.rejectDiff",
"mac": "shift+cmd+backspace",
"key": "shift+ctrl+backspace"
+ },
+ {
+ "command": "continue.quickTextEntry",
+ "mac": "cmd+h",
+ "key": "ctrl+h"
}
],
"menus": {
diff --git a/extension/src/commands.ts b/extension/src/commands.ts
index 4414a171..ffb67ab5 100644
--- a/extension/src/commands.ts
+++ b/extension/src/commands.ts
@@ -17,6 +17,7 @@ import { acceptDiffCommand, rejectDiffCommand } from "./diffs";
import * as bridge from "./bridge";
import { debugPanelWebview } from "./debugPanel";
import { sendTelemetryEvent, TelemetryEvent } from "./telemetry";
+import { ideProtocolClient } from "./activation/activate";
// Copy everything over from extension.ts
const commandsMap: { [command: string]: (...args: any) => any } = {
@@ -63,6 +64,17 @@ const commandsMap: { [command: string]: (...args: any) => any } = {
type: "focusContinueInput",
});
},
+ "continue.quickTextEntry": async () => {
+ const text = await vscode.window.showInputBox({
+ placeHolder:
+ "Ask a question, give instructions, or enter a slash command",
+ title: "Continue Quick Input",
+ });
+ if (text) {
+ ideProtocolClient.sendMainUserInput(text);
+ }
+ vscode.commands.executeCommand("continue.continueGUIView.focus");
+ },
};
const textEditorCommandsMap: { [command: string]: (...args: any) => {} } = {
diff --git a/extension/src/continueIdeClient.ts b/extension/src/continueIdeClient.ts
index 3615ab92..9b16a7a2 100644
--- a/extension/src/continueIdeClient.ts
+++ b/extension/src/continueIdeClient.ts
@@ -427,6 +427,10 @@ class IdeProtocolClient {
sendAcceptRejectDiff(accepted: boolean) {
this.messenger?.send("acceptRejectDiff", { accepted });
}
+
+ sendMainUserInput(input: string) {
+ this.messenger?.send("mainUserInput", { input });
+ }
}
export default IdeProtocolClient;