From afc22f0d6e420b69c6102c6c48025d9845e1ffc1 Mon Sep 17 00:00:00 2001 From: Matt Rubens Date: Sun, 15 Dec 2024 23:57:21 -0500 Subject: [PATCH] Hit enter to add auto-approved commands --- webview-ui/src/components/settings/SettingsView.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/webview-ui/src/components/settings/SettingsView.tsx b/webview-ui/src/components/settings/SettingsView.tsx index deab3d6..ffa45d0 100644 --- a/webview-ui/src/components/settings/SettingsView.tsx +++ b/webview-ui/src/components/settings/SettingsView.tsx @@ -245,6 +245,12 @@ const SettingsView = ({ onDone }: SettingsViewProps) => { setCommandInput(e.target.value)} + onKeyDown={(e: any) => { + if (e.key === 'Enter') { + e.preventDefault() + handleAddCommand() + } + }} placeholder="Enter command prefix (e.g., 'git ')" style={{ flexGrow: 1 }} />