diff options
| author | Paul Buetow <paul@buetow.org> | 2026-02-08 17:33:04 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-02-08 17:33:04 +0200 |
| commit | 944838bb0f753a0920ddb2f506758c410ed7ca43 (patch) | |
| tree | 12d6ae9e2de8878891159e363134a3f07686ed7a /config.toml.example | |
| parent | c802ba5803de1a53749bb5c4ecbc0159fceb385f (diff) | |
Fix amp agent prompt extraction to use TUI box pattern
Amp CLI runs in TUI mode with box-drawing UI (│ text │) similar to
Cursor, not shell-style (> prompt). Updated prompt pattern from
`(?m)>\s*(.+)$` to `(?m)│\s*(.+?)\s*│\s*$` to correctly extract
text from amp's box UI.
Changes:
- internal/tmuxedit/config_agent.go: Update amp promptPat to box pattern
- internal/tmuxedit/config_agent_test.go: Update test to use box format
- docs/usage.md: Document detection order and clear methods for all agents
- docs/tmux.md: Clarify input mode handling (Vim vs Emacs/readline)
- config.toml.example: Add detailed agent descriptions and patterns
- prompts/tmux-edit-integration-tests.md: Add test status, mock editor best practices
Integration tests verified:
- Amp detection: amp/sourcegraph keywords
- Prompt extraction: "hello world test" correctly captured
- End-to-end workflow: text modification and sending works
- Multi-line support: all lines delivered correctly
- All unit tests pass (67/67)
- Coverage: 80.9% (meets requirement)
- Cursor and Claude implementations unchanged
Co-authored-by: Cursor <cursoragent@cursor.com>
Diffstat (limited to 'config.toml.example')
| -rw-r--r-- | config.toml.example | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/config.toml.example b/config.toml.example index cc4471d..781dc19 100644 --- a/config.toml.example +++ b/config.toml.example @@ -160,7 +160,11 @@ temperature = 0.2 # default_agent = "" # force agent name; skip auto-detect # Override or add agent definitions (merged with built-in defaults by name). -# Built-in agents: claude, cursor, amp, aider. +# Built-in agents (checked in order): cursor, claude, amp, aider. +# - cursor: Box UI │...│, clears with End+BSpace*200 +# - claude: Prompt symbol ❯, clears with Escape gg C-v G d i (Vi/Vim) +# - amp: Box UI │...│ (TUI mode), clears with C-u (Emacs/readline) +# - aider: Shell-style > prompt, clears with C-u (Emacs/readline) # Tmux keybinding (add to ~/.tmux.conf): # bind e run-shell -b "hexai-tmux-edit --pane '#{pane_id}'" |
