Hit enter to add auto-approved commands

This commit is contained in:
Matt Rubens
2024-12-15 23:57:21 -05:00
parent 27b684a911
commit afc22f0d6e

View File

@@ -245,6 +245,12 @@ const SettingsView = ({ onDone }: SettingsViewProps) => {
<VSCodeTextField
value={commandInput}
onInput={(e: any) => setCommandInput(e.target.value)}
onKeyDown={(e: any) => {
if (e.key === 'Enter') {
e.preventDefault()
handleAddCommand()
}
}}
placeholder="Enter command prefix (e.g., 'git ')"
style={{ flexGrow: 1 }}
/>