From f8e5ff8227c0cafb140767c9286dd598e7503e45 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 7 Apr 2026 08:57:04 +0300 Subject: feat: remove tmux edit popup support for Claude Code Claude Code CLI now supports Ctrl+G to open the prompt in EDITOR (like OpenAI Codex CLI), making the built-in hexai-tmux-edit agent profile redundant. - Remove internal/tmuxedit/claude_agent.go and its tests - Update builtinAgents() to exclude claude; built-ins are now: cursor, amp, aider - Update all documentation (README, docs/tmux.md, docs/usage.md, docs/configuration.md) - Update config.toml.example to reflect new agent list Co-Authored-By: Claude Sonnet 4.6 --- docs/configuration.md | 4 ++-- docs/tmux.md | 5 ++--- docs/usage.md | 13 +++++-------- 3 files changed, 9 insertions(+), 13 deletions(-) (limited to 'docs') diff --git a/docs/configuration.md b/docs/configuration.md index 013d2c8..645d2ca 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -140,6 +140,6 @@ Hexai Tmux Edit (popup editor) submit_keys = "Enter" ``` -- Built-in agents: `claude`, `cursor`, `amp`, `aider`. See [config.toml.example](../config.toml.example) for all fields. -- OpenAI Codex CLI uses its native external editor shortcut (`Ctrl+G`) instead of a built-in `tmux_edit` agent profile. +- Built-in agents: `cursor`, `amp`, `aider`. See [config.toml.example](../config.toml.example) for all fields. +- OpenAI Codex CLI and Claude Code CLI use their native external editor shortcut (`Ctrl+G`) instead of a built-in `tmux_edit` agent profile. - Tmux keybinding: `bind e run-shell -b "cd '#{pane_current_path}' && hexai-tmux-edit --pane '#{pane_id}'"` diff --git a/docs/tmux.md b/docs/tmux.md index a1628cb..ba024e3 100644 --- a/docs/tmux.md +++ b/docs/tmux.md @@ -71,9 +71,9 @@ window_minutes = 60 # default 60; min 1, max 1440 ## Popup editor for AI agent prompts -`hexai-tmux-edit` opens your `$EDITOR` in a tmux popup to compose longer prompts when working with AI CLI agents (Claude Code, Cursor, Amp, Aider, etc.). +`hexai-tmux-edit` opens your `$EDITOR` in a tmux popup to compose longer prompts when working with AI CLI agents (Cursor, Amp, Aider, etc.). -OpenAI Codex CLI already supports editing in an external editor via `Ctrl+G`, so it does not need a built-in `hexai-tmux-edit` agent profile. +OpenAI Codex CLI and Claude Code CLI both support editing in an external editor natively via `Ctrl+G`, so neither needs a built-in `hexai-tmux-edit` agent profile. ![Popup editor in action](tmux-edit-popup.png) @@ -94,7 +94,6 @@ Then press `prefix + e` in any pane running an AI agent. Hexai auto-detects the See the [configuration guide](configuration.md) for customizing popup dimensions and agent patterns, or the [usage guide](usage.md) for the full workflow description. **Input mode notes**: Each agent uses different clearing methods based on their input handling: -- **Claude Code**: Uses Emacs/readline keybindings (`C-a C-k`) - **Cursor**: Uses simple backspace clearing (`End BSpace*200`) - **Amp**: Uses Emacs/readline keybindings (`C-u`) - **Aider**: Uses Emacs/readline keybindings (`C-u`) diff --git a/docs/usage.md b/docs/usage.md index 8824a44..0786a00 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -250,9 +250,9 @@ Tips: `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 (Claude Code, 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.). +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 is not a built-in `hexai-tmux-edit` agent. Codex already supports editing in an external editor via `Ctrl+G`. +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 @@ -261,17 +261,14 @@ 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. **Claude Code** -- detects `❯` prompt symbol, "claude code", or "anthropic" - - Clears with: `C-a C-k` (Emacs/readline style) - - Prompt pattern: Extracts from last section between `─────` rules -3. **Amp** -- detects "amp" or "sourcegraph" in pane (TUI mode) +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) -4. **Aider** -- detects "aider" in pane +3. **Aider** -- detects "aider" in pane - Clears with: `C-u` (Emacs/readline style) - Prompt pattern: Shell-style `> prompt` -**Detection order matters**: Cursor and Claude are 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. +**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. -- cgit v1.2.3