From afc22f0d6e420b69c6102c6c48025d9845e1ffc1 Mon Sep 17 00:00:00 2001 From: Matt Rubens Date: Sun, 15 Dec 2024 23:57:21 -0500 Subject: [PATCH 1/2] 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 }} /> From e14ccf55dbfa6651c312118aa7e39e52fea90ab2 Mon Sep 17 00:00:00 2001 From: Matt Rubens Date: Sun, 15 Dec 2024 23:58:17 -0500 Subject: [PATCH 2/2] Update unit test command to run webview tests too --- .github/workflows/code-qa.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code-qa.yml b/.github/workflows/code-qa.yml index 0a5f3c1..de3f054 100644 --- a/.github/workflows/code-qa.yml +++ b/.github/workflows/code-qa.yml @@ -42,4 +42,4 @@ jobs: run: npm run install:all - name: Run unit tests - run: npx jest \ No newline at end of file + run: npm test \ No newline at end of file