diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-07-14 03:24:46 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-07-14 03:24:46 -0700 |
commit | 612c4115a0c74b52b77956867e0f47a84eca98a9 (patch) | |
tree | af1176510dcc4ce368d1c40760c08ca2a1fc81b9 /extension/src/commands.ts | |
parent | c22670ba2122412eca3f2de1f270b5f113db7e25 (diff) | |
download | sncontinue-612c4115a0c74b52b77956867e0f47a84eca98a9.tar.gz sncontinue-612c4115a0c74b52b77956867e0f47a84eca98a9.tar.bz2 sncontinue-612c4115a0c74b52b77956867e0f47a84eca98a9.zip |
warn of large highlighted ranges, cmd+k->m
Diffstat (limited to 'extension/src/commands.ts')
-rw-r--r-- | extension/src/commands.ts | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/extension/src/commands.ts b/extension/src/commands.ts index 0b002549..0025340a 100644 --- a/extension/src/commands.ts +++ b/extension/src/commands.ts @@ -19,6 +19,8 @@ import { debugPanelWebview } from "./debugPanel"; import { sendTelemetryEvent, TelemetryEvent } from "./telemetry"; import { ideProtocolClient } from "./activation/activate"; +let focusedOnContinueInput = false; + // Copy everything over from extension.ts const commandsMap: { [command: string]: (...args: any) => any } = { "continue.suggestionDown": suggestionDownCommand, @@ -30,10 +32,15 @@ const commandsMap: { [command: string]: (...args: any) => any } = { "continue.acceptAllSuggestions": acceptAllSuggestionsCommand, "continue.rejectAllSuggestions": rejectAllSuggestionsCommand, "continue.focusContinueInput": async () => { - vscode.commands.executeCommand("continue.continueGUIView.focus"); - debugPanelWebview?.postMessage({ - type: "focusContinueInput", - }); + if (focusedOnContinueInput) { + vscode.commands.executeCommand("workbench.action.focusActiveEditorGroup"); + } else { + vscode.commands.executeCommand("continue.continueGUIView.focus"); + debugPanelWebview?.postMessage({ + type: "focusContinueInput", + }); + } + focusedOnContinueInput = !focusedOnContinueInput; }, "continue.quickTextEntry": async () => { const text = await vscode.window.showInputBox({ @@ -53,4 +60,4 @@ export function registerAllCommands(context: vscode.ExtensionContext) { vscode.commands.registerCommand(command, callback) ); } -}
\ No newline at end of file +} |