diff options
Diffstat (limited to 'docs/usage.md')
| -rw-r--r-- | docs/usage.md | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/docs/usage.md b/docs/usage.md index c6c55db..14a85ba 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -275,62 +275,6 @@ Tips: - Ensure Helix runs inside tmux to see the status updates. - You can also set a language-specific binding in `languages.toml` if preferred. -## Hexai Tmux Edit (Popup Editor) - -`hexai-tmux-edit` opens your `$EDITOR` in a tmux popup for composing longer AI agent prompts. It captures existing prompt text from the target pane, pre-fills the editor, and sends the edited text back via `tmux send-keys`. - -This is useful when working with AI CLI agents (Cursor, Amp, Aider, etc.) and you need to compose a longer, multi-line prompt with the comfort of your regular editor (spellcheck, search/replace, etc.). - -OpenAI Codex CLI and Claude Code CLI are not built-in `hexai-tmux-edit` agents. Both support editing in an external editor natively via `Ctrl+G`. - -### Supported agents - -Built-in agent detection (auto-detected from pane content, checked in order): - -1. **Cursor** -- detects box-drawing UI `│ →` or footer `/ commands · @ files` - - Clears with: `End BSpace*200` (backspace method) - - Prompt pattern: Extracts from last `│...│` box -2. **Amp** -- detects "amp" or "sourcegraph" in pane (TUI mode) - - Clears with: `C-u` (Emacs/readline style) - - Prompt pattern: Extracts from `│...│` box UI (similar to Cursor) -3. **Aider** -- detects "aider" in pane - - Clears with: `C-u` (Emacs/readline style) - - Prompt pattern: Shell-style `> prompt` - -**Detection order matters**: Cursor is checked first to avoid false positives. For example, Cursor may display "Claude 4.5 Sonnet" as its model name, but Cursor's distinctive `│ →` box UI is matched first. - -Additional agents can be added via `[tmux_edit.agents]` in config.toml without code changes. - -### Tmux keybinding - -Add to `~/.tmux.conf`: - -``` -bind e run-shell -b "cd '#{pane_current_path}' && hexai-tmux-edit --pane '#{pane_id}'" -``` - -The `#{pane_id}` is expanded by tmux to the active pane at keypress time, so the popup editor always knows which pane to send text back to. - -### Flags - -- `--config` path to config file (default: `$XDG_CONFIG_HOME/hexai/config.toml`) -- `--agent` explicit agent name (auto-detected if omitted) -- `--pane` tmux target pane ID (e.g. `%5`) - -### Workflow - -1. Press your tmux keybinding (e.g. `prefix + e`) -2. A tmux popup opens with your `$EDITOR`, pre-filled with any existing prompt text -3. Edit or compose your prompt -4. Save and close the editor -5. The edited text is sent to the agent's pane via `tmux send-keys` - -If you keep the original text unchanged and append new text, only the appended text is sent. If you rewrite the prompt entirely, the full new text is sent. If you save an empty file or don't change anything, nothing is sent. - -### Configuration - -See `[tmux_edit]` in [config.toml.example](../config.toml.example) for all options, including custom popup dimensions and agent overrides. - ### Slash commands Type a slash command at the end of a chat line (for example `/? reload>`). Available commands: |
