From 06782224e42dfd6e18e242781bb8c1346a7b5db1 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 2 Aug 2023 21:54:22 -0700 Subject: keyboard shortcuts --- extension/src/commands.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'extension/src/commands.ts') diff --git a/extension/src/commands.ts b/extension/src/commands.ts index 35d466e8..351c055d 100644 --- a/extension/src/commands.ts +++ b/extension/src/commands.ts @@ -52,6 +52,16 @@ const commandsMap: { [command: string]: (...args: any) => any } = { } focusedOnContinueInput = !focusedOnContinueInput; }, + "continue.focusContinueInputWithEdit": async () => { + vscode.commands.executeCommand("continue.continueGUIView.focus"); + debugPanelWebview?.postMessage({ + type: "focusContinueInputWithEdit", + }); + focusedOnContinueInput = true; + }, + "continue.toggleAuxiliaryBar": () => { + vscode.commands.executeCommand("workbench.action.toggleAuxiliaryBar"); + }, "continue.quickTextEntry": async () => { const text = await vscode.window.showInputBox({ placeHolder: -- cgit v1.2.3-70-g09d2 From 4c1e87f39725aa855493ab7c31ac21a65e7e931c Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 2 Aug 2023 22:10:20 -0700 Subject: more keyboard shortcuts work --- extension/package.json | 2 +- extension/react-app/src/components/ComboBox.tsx | 2 +- extension/src/commands.ts | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'extension/src/commands.ts') diff --git a/extension/package.json b/extension/package.json index 1b4ef3da..edd3dc94 100644 --- a/extension/package.json +++ b/extension/package.json @@ -166,7 +166,7 @@ }, { "command": "continue.toggleAuxiliaryBar", - "mac": "option+cmd+m", + "mac": "alt+cmd+m", "key": "alt+ctrl+m" } ], diff --git a/extension/react-app/src/components/ComboBox.tsx b/extension/react-app/src/components/ComboBox.tsx index 91672b87..3b20cd8d 100644 --- a/extension/react-app/src/components/ComboBox.tsx +++ b/extension/react-app/src/components/ComboBox.tsx @@ -258,7 +258,7 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => { } else if (event.data.type === "focusContinueInputWithEdit") { inputRef.current!.focus(); - inputRef.current!.value = "/edit"; + downshiftProps.setInputValue("/edit"); } }; window.addEventListener("message", handler); diff --git a/extension/src/commands.ts b/extension/src/commands.ts index 351c055d..433982ed 100644 --- a/extension/src/commands.ts +++ b/extension/src/commands.ts @@ -61,6 +61,9 @@ const commandsMap: { [command: string]: (...args: any) => any } = { }, "continue.toggleAuxiliaryBar": () => { vscode.commands.executeCommand("workbench.action.toggleAuxiliaryBar"); + debugPanelWebview?.postMessage({ + type: "focusContinueInputWithEdit", + }); }, "continue.quickTextEntry": async () => { const text = await vscode.window.showInputBox({ -- cgit v1.2.3-70-g09d2 From f5ad3b5baad3c71dc6e77ec313eb9c4f3fd856ac Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 2 Aug 2023 22:54:30 -0700 Subject: keyboard shortcuts again --- extension/react-app/src/components/ComboBox.tsx | 2 +- extension/src/commands.ts | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'extension/src/commands.ts') diff --git a/extension/react-app/src/components/ComboBox.tsx b/extension/react-app/src/components/ComboBox.tsx index 3b20cd8d..31c3ddef 100644 --- a/extension/react-app/src/components/ComboBox.tsx +++ b/extension/react-app/src/components/ComboBox.tsx @@ -258,7 +258,7 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => { } else if (event.data.type === "focusContinueInputWithEdit") { inputRef.current!.focus(); - downshiftProps.setInputValue("/edit"); + downshiftProps.setInputValue("/edit "); } }; window.addEventListener("message", handler); diff --git a/extension/src/commands.ts b/extension/src/commands.ts index 433982ed..351c055d 100644 --- a/extension/src/commands.ts +++ b/extension/src/commands.ts @@ -61,9 +61,6 @@ const commandsMap: { [command: string]: (...args: any) => any } = { }, "continue.toggleAuxiliaryBar": () => { vscode.commands.executeCommand("workbench.action.toggleAuxiliaryBar"); - debugPanelWebview?.postMessage({ - type: "focusContinueInputWithEdit", - }); }, "continue.quickTextEntry": async () => { const text = await vscode.window.showInputBox({ -- cgit v1.2.3-70-g09d2