summaryrefslogtreecommitdiff
path: root/cmd/hexai-tmux-edit/main.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-07-02 09:38:04 +0300
committerPaul Buetow <paul@buetow.org>2026-07-02 09:38:04 +0300
commita68228bfa12f4d8a51fe53e244fcd2e66c1ef692 (patch)
tree94e257b21b93419fef655c9813f68190204c3d0d /cmd/hexai-tmux-edit/main.go
parent9f0e96ce62339ddefa8771891e0864ede9af5064 (diff)
Remove hexai-tmux-edit popup editor featurev0.42.0
The tmux popup editor and its per-agent detection (Cursor/Amp/Aider) added maintenance surface without enough use to justify it; Codex and Claude Code already support external-editor mode natively via Ctrl+G. Drops internal/tmuxedit, cmd/hexai-tmux-edit, the [tmux_edit] config schema, the Mage build target, and all related docs/README mentions. Bump version to 0.42.0. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Diffstat (limited to 'cmd/hexai-tmux-edit/main.go')
-rw-r--r--cmd/hexai-tmux-edit/main.go63
1 files changed, 0 insertions, 63 deletions
diff --git a/cmd/hexai-tmux-edit/main.go b/cmd/hexai-tmux-edit/main.go
deleted file mode 100644
index d61f68a..0000000
--- a/cmd/hexai-tmux-edit/main.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// hexai-tmux-edit opens a tmux popup with $EDITOR for composing 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.
-//
-// Usage:
-//
-// hexai-tmux-edit [--config <path>] [--agent <name>] [--pane <id>]
-//
-// Tmux keybinding (add to ~/.tmux.conf):
-//
-// bind e run-shell -b "cd '#{pane_current_path}' && hexai-tmux-edit --pane '#{pane_id}'"
-package main
-
-import (
- "flag"
- "fmt"
- "io"
- "os"
- "strings"
-
- "codeberg.org/snonux/hexai/internal/appconfig"
- "codeberg.org/snonux/hexai/internal/tmuxedit"
-)
-
-type app struct {
- runTmuxEdit func(tmuxedit.Options) error
-}
-
-func newApp() *app { return &app{runTmuxEdit: tmuxedit.Run} }
-
-func main() { os.Exit(newApp().runMain(os.Args[1:], os.Stderr)) }
-
-// runMain parses flags from args and runs the tmux edit popup. It returns
-// the process exit code; flag errors return 2 (matching stdlib convention),
-// runtime failures return 1.
-func (a *app) runMain(args []string, stderr io.Writer) int {
- defaultPath := appconfig.DefaultConfigPath()
- fs := flag.NewFlagSet("hexai-tmux-edit", flag.ContinueOnError)
- fs.SetOutput(stderr)
- configPath := fs.String("config", "", fmt.Sprintf("path to config file (default: %s)", defaultPath))
- agent := fs.String("agent", "", "AI agent name (auto-detected if omitted)")
- pane := fs.String("pane", "", "tmux target pane ID (e.g. %5)")
- if err := fs.Parse(args); err != nil {
- return 2
- }
-
- opts := buildOptions(*configPath, *agent, *pane)
- if err := a.runTmuxEdit(opts); err != nil {
- fmt.Fprintln(stderr, err)
- return 1
- }
- return 0
-}
-
-// buildOptions constructs tmuxedit.Options from the parsed flag values,
-// trimming whitespace from each field.
-func buildOptions(configPath, agent, pane string) tmuxedit.Options {
- return tmuxedit.Options{
- ConfigPath: strings.TrimSpace(configPath),
- Agent: strings.TrimSpace(agent),
- Pane: strings.TrimSpace(pane),
- }
-}