fix(coding-agent): submit /agents create form and hook editor on Ctrl+Q
Windows Terminal does not deliver a distinct Ctrl+Enter event, so the agent dashboard's new-agent description form (`AgentDashboard#handleInput` in the `createInput` branch) and the hook editor's hook-style mode (`HookEditorComponent#handleHookStyleInput`) could not be submitted: both branches only matched Ctrl+Enter encodings, and the user-reported Ctrl+Enter press registers as plain \r — same as Enter — so it fell straight through to the newline branch. Fix #1903 already added Ctrl+Q as the Windows-friendly default for `app.message.followUp`, but the create form and hook editor hardcoded their own Ctrl+Enter check that bypassed that keybinding. Routes both submit checks through a new `matchesAppFollowUp` helper that delegates to `app.message.followUp`, falling back to a Ctrl+Q/Ctrl+Enter literal match for component tests that don't install the app keybindings manager. Updated hint text in both components to surface Ctrl+Q alongside Ctrl+Enter. Added regression tests asserting Ctrl+Q submits after typing a multi-line description (the exact Windows Terminal scenario). Fixes #2118
This commit is contained in:
+1
-1
@@ -42,7 +42,7 @@ app.stt.toggle: []
|
||||
| `app.clipboard.pasteImage` | `Ctrl+V` (`Alt+V` fallback on Windows) | Paste an image from the clipboard |
|
||||
| `app.stt.toggle` | `Alt+H` | Toggle speech-to-text recording |
|
||||
|
||||
On Windows Terminal, `Ctrl+V` may be handled by the terminal paste command before `omp` sees it; use the `Alt+V` fallback when clipboard image paste appears to do nothing. Windows Terminal also swallows `Ctrl+Enter`, so the follow-up shortcut also binds `Ctrl+Q` — the same chord GitHub Copilot CLI uses. If your existing `keybindings.yml` already assigns `Ctrl+Q` to another action, that user remap wins and follow-up keeps `Ctrl+Enter` unless you explicitly bind `app.message.followUp`.
|
||||
On Windows Terminal, `Ctrl+V` may be handled by the terminal paste command before `omp` sees it; use the `Alt+V` fallback when clipboard image paste appears to do nothing. Windows Terminal also swallows `Ctrl+Enter`, so the `app.message.followUp` chord also binds `Ctrl+Q` — the same chord GitHub Copilot CLI uses — and the same chord submits the agent dashboard's new-agent description and hook-editor prompts. If your existing `keybindings.yml` already assigns `Ctrl+Q` to another action, that user remap wins and follow-up keeps `Ctrl+Enter` unless you explicitly bind `app.message.followUp`.
|
||||
|
||||
Terminals that implement OSC 5522 enhanced paste can send clipboard MIME data directly to `omp`; image pastes are attached as `[Image #N]`, while text/plain paste events keep normal paste behavior. When OSC 5522 is unavailable, bracketed paste still handles text, and a pasted single image-file path is loaded as an image when the file is readable from the `omp` host.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user