diff options
author | Ty Dunn <ty@tydunn.com> | 2023-07-07 17:57:45 -0700 |
---|---|---|
committer | Ty Dunn <ty@tydunn.com> | 2023-07-07 17:57:45 -0700 |
commit | 59dc2a776268da2567aad17421053011c1263cf1 (patch) | |
tree | de906c1202c72a8008cdee405a489c08bb4e3b85 /extension/react-app/src/tabs | |
parent | 128e5b5cf46dee72f6f72b3f36adb83b13dcc0d8 (diff) | |
parent | 4d3a10c0324e451b6481104fcaff47e80ce5db70 (diff) | |
download | sncontinue-59dc2a776268da2567aad17421053011c1263cf1.tar.gz sncontinue-59dc2a776268da2567aad17421053011c1263cf1.tar.bz2 sncontinue-59dc2a776268da2567aad17421053011c1263cf1.zip |
Merge branch 'main' of github.com:continuedev/continue
Diffstat (limited to 'extension/react-app/src/tabs')
-rw-r--r-- | extension/react-app/src/tabs/gui.tsx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/extension/react-app/src/tabs/gui.tsx b/extension/react-app/src/tabs/gui.tsx index 1ea70dd2..e1ecec9e 100644 --- a/extension/react-app/src/tabs/gui.tsx +++ b/extension/react-app/src/tabs/gui.tsx @@ -217,9 +217,13 @@ function GUI(props: GUIProps) { [client] ); - const onMainTextInput = () => { + const onMainTextInput = (event?: any) => { if (mainTextInputRef.current) { - const input = (mainTextInputRef.current as any).inputValue; + let input = (mainTextInputRef.current as any).inputValue; + // cmd+enter to /edit + if (event?.metaKey) { + input = `/edit ${input}`; + } (mainTextInputRef.current as any).setInputValue(""); if (!client) return; @@ -352,7 +356,7 @@ function GUI(props: GUIProps) { // } ref={mainTextInputRef} onEnter={(e) => { - onMainTextInput(); + onMainTextInput(e); e.stopPropagation(); e.preventDefault(); }} |