summaryrefslogtreecommitdiff
path: root/internal/tmuxedit/config_agent_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-04-07 08:57:04 +0300
committerPaul Buetow <paul@buetow.org>2026-04-07 08:57:04 +0300
commitf8e5ff8227c0cafb140767c9286dd598e7503e45 (patch)
tree05a7cadd468ab3dfc364287b856aed37cfcce4ca /internal/tmuxedit/config_agent_test.go
parentd600ea8c411d5f9962a64ea52bba6ec21ac661be (diff)
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 <noreply@anthropic.com>
Diffstat (limited to 'internal/tmuxedit/config_agent_test.go')
-rw-r--r--internal/tmuxedit/config_agent_test.go35
1 files changed, 19 insertions, 16 deletions
diff --git a/internal/tmuxedit/config_agent_test.go b/internal/tmuxedit/config_agent_test.go
index d7ad649..666525d 100644
--- a/internal/tmuxedit/config_agent_test.go
+++ b/internal/tmuxedit/config_agent_test.go
@@ -9,29 +9,31 @@ import (
func boolP(b bool) *bool { return &b }
func TestResolveAgents_MergeOverride(t *testing.T) {
+ // Override the built-in "amp" agent to verify config merging preserves
+ // builtin fields (detectPattern) while applying user overrides (DisplayName, ClearFirst).
cfgAgents := []appconfig.TmuxEditAgentCfg{
{
- Name: "claude",
- DisplayName: "My Claude",
+ Name: "amp",
+ DisplayName: "My Amp",
ClearFirst: boolP(false),
},
}
agents := resolveAgents(cfgAgents)
- var claude Agent
+ var amp Agent
for _, a := range agents {
- if a.Name() == "claude" {
- claude = a
+ if a.Name() == "amp" {
+ amp = a
break
}
}
- if claude == nil {
- t.Fatal("claude agent not found")
+ if amp == nil {
+ t.Fatal("amp agent not found")
}
- if claude.DisplayName() != "My Claude" {
- t.Errorf("DisplayName = %q, want My Claude", claude.DisplayName())
+ if amp.DisplayName() != "My Amp" {
+ t.Errorf("DisplayName = %q, want My Amp", amp.DisplayName())
}
// ClearInput should be no-op after override to false
- c := claude.(Configurable)
+ c := amp.(Configurable)
if c.Base().clearFirst {
t.Error("clearFirst should be false after override")
}
@@ -42,11 +44,12 @@ func TestResolveAgents_MergeOverride(t *testing.T) {
}
func TestResolveAgents_MergeAllFields(t *testing.T) {
+ // Override the built-in "aider" agent with all fields to verify full merging.
cfgAgents := []appconfig.TmuxEditAgentCfg{
{
- Name: "claude",
- DisplayName: "Custom Claude",
- DetectPattern: "(?i)custom-claude",
+ Name: "aider",
+ DisplayName: "Custom Aider",
+ DetectPattern: "(?i)custom-aider",
PromptPattern: `>\s+(.*)$`,
StripPatterns: []string{"NOISE"},
ClearFirst: boolP(true),
@@ -58,17 +61,17 @@ func TestResolveAgents_MergeAllFields(t *testing.T) {
agents := resolveAgents(cfgAgents)
var a Agent
for _, ag := range agents {
- if ag.Name() == "claude" {
+ if ag.Name() == "aider" {
a = ag
break
}
}
if a == nil {
- t.Fatal("claude agent not found")
+ t.Fatal("aider agent not found")
}
c := a.(Configurable)
base := c.Base()
- if base.detectPattern != "(?i)custom-claude" {
+ if base.detectPattern != "(?i)custom-aider" {
t.Errorf("detectPattern = %q", base.detectPattern)
}
if base.promptPat != `>\s+(.*)$` {