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 | c9c584c3a7d367651c03afdf7a0648720f818e7e (patch) | |
tree | 692d4debd668f2edb9560b003cf7c94d64476616 /extension/react-app/src/tabs | |
parent | b40fa922a573173c049a664746014cae81080ced (diff) | |
parent | 40cea963de77c0fc83729cb8d885d1595f4da3cf (diff) | |
download | sncontinue-c9c584c3a7d367651c03afdf7a0648720f818e7e.tar.gz sncontinue-c9c584c3a7d367651c03afdf7a0648720f818e7e.tar.bz2 sncontinue-c9c584c3a7d367651c03afdf7a0648720f818e7e.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(); }} |