Commit Graph

14 Commits

Author SHA1 Message Date
roboomp bd06c5dd4e fix(coding-agent): honor app.message.followUp chord in ask prompt-style editor
The ask tool's "Other (type your own)" free-text input is a prompt-style
HookEditorComponent. The hook-style branch already called matchesAppFollowUp
(Ctrl+Q / Ctrl+Enter) so Windows Terminal users — which can't deliver a
distinct Ctrl+Enter (#1903 / fixed by #1905) — had a working chord on the
main editor, hook editors, and the agent dashboard. The prompt-style branch
did not, so Ctrl+Q was unbound and Ctrl+Enter fell through to Editor as a
newline that WT silently swallowed: pressing Ctrl+Enter did nothing.

#handlePromptStyleInput now checks matchesAppFollowUp before the rest of
the dispatch (mirroring #handleHookStyleInput), so plain Enter remains the
primary submit and the chord is a secondary submit for cross-terminal
muscle memory. The prompt-style hint now reads "enter or ctrl+q submit"
so the fallback is discoverable.

Fixes #3353
2026-06-24 14:12:05 +00:00
can1357 5c9fe0bfa0 Merge PR #2134: fix(coding-agent): submit /agents create form and hook editor on Ctrl+Q (@roboomp) 2026-06-21 17:06:15 +02:00
can1357 8351536641 refactor(coding-agent): consolidated and prioritize perplexity authentication
- Moved authentication logic to `perplexity-auth.ts` to share logic between search providers and CLI commands.
- Updated authentication priority to prefer browser cookies over OAuth tokens during search operations.
- Modified the `token` CLI command to display active OAuth tokens when both an OAuth token and an API key are configured.
- Added comprehensive unit tests in `perplexity.test.ts` to verify authentication priority and precedence.
2026-06-19 17:44:59 +02:00
can1357 9478e3cc5c refactor: replaced ReturnType<typeof setTimeout> with Timer type
- Replaced usage of `ReturnType<typeof setTimeout>` and `ReturnType<typeof setInterval>` with the explicit `Timer` type across the codebase.
- Updated several type definitions and function signatures to use concrete types instead of inferred return types for improved clarity and maintainability.
2026-06-19 17:38:07 +02:00
can1357 037aa6b345 fix(coding-agent): routed non-bracketed paste payloads to hook components
- Added a `pasteText` handler to `HookEditorComponent` to forward non-bracketed OSC 5522 paste text into its inner editor.
- Added a `pasteText` handler to `HookInputComponent` that forwards text to the input and resets the interaction timeout.
- Extended hook editor and timeout tests to cover enhanced-paste payload absorption and behavior retention.
2026-06-10 04:25:08 +02:00
roboomp b91b6aa0da 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
2026-06-08 20:42:50 +00:00
can1357 cf352b7277 fix(coding-agent/modes): serialized hook dialogs to prevent overlapping modal surfaces
- Serialized hook selector, input, and editor dialogs to prevent overlapping surfaces.
- Queued dialog requests FIFO and skipped requests aborted before they could be shown.
- Added a shared #presentDialog path for modal focus and hide lifecycle.
2026-06-08 14:57:44 +02:00
can1357 d0d5b547ff feat(editor): added atomic deletion and metadata display for image and paste markers
- Added atomicTokenPattern support to treat image and paste markers as indivisible tokens, enabling atomic deletion on backspace and forward-delete instead of character-by-character removal.
- Extended image marker format to include pixel dimensions [Image #N, WxH] and updated paste marker format to [Paste #N, +X lines] or [Paste #N, Y chars] with consistent comma-separated metadata.
- Implemented accent styling for paste markers in editor rendering while preserving hyperlinks for image markers, improving visual distinction between marker types.
- Refactored image reference handling to unified placeholder system supporting both image and paste markers with kind-aware rendering callbacks and regex patterns.
2026-06-08 13:34:22 +02:00
SuperHedge 70e873aa8d Fix review custom instructions submission 2026-05-25 20:48:46 +02:00
Patrik Sundberg 915e04300c fix(tui): accept NumLock Ctrl+Enter variants
Some keyboards lack a physical NumLock and it's inconvenient for this to
block hitting Ctrl+Enter.
2026-04-27 18:21:45 +01:00
can1357 83d0dc39fc test(coding-agent): corrected hook-editor assertion for keybinding render
- Corrected assertion in hook-editor test to verify external editor keybinding is rendered.
2026-03-26 20:05:19 +01:00
can1357 d841c3b778 fix(ask): restore prompt-style enter handling 2026-03-26 19:12:50 +01:00
Vu Anh Nguyen d28e3eb950 fix(ask): honor app interrupt in prompt editor 2026-03-26 16:50:03 +07:00
Vu Anh Nguyen 99dabb7c18 fix(ask): keep multiline custom input in prompt gutter 2026-03-26 16:14:52 +07:00