diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-25 08:49:02 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-25 08:49:02 +0300 |
| commit | e33cd60277bc717ad7a8c73cf01c7bedad0d1837 (patch) | |
| tree | cf3e72b6e16223a207883c7049ae200ac57aee2d /cmd | |
| parent | caa7876ac8bdb5cc23e12db4d4cb65cf86861151 (diff) | |
Release v0.35.0: fix-typos action and tmux popup for hexai-tmux-actionv0.35.0
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/hexai-tmux-action/main.go | 24 | ||||
| -rw-r--r-- | cmd/hexai-tmux-action/main_test.go | 6 |
2 files changed, 15 insertions, 15 deletions
diff --git a/cmd/hexai-tmux-action/main.go b/cmd/hexai-tmux-action/main.go index 715c41f..a0f240b 100644 --- a/cmd/hexai-tmux-action/main.go +++ b/cmd/hexai-tmux-action/main.go @@ -22,15 +22,15 @@ func main() { uiChild := flag.Bool("ui-child", false, "INTERNAL: run interactive UI and write to -outfile atomically") defaultPath := appconfig.DefaultConfigPath() configPath := flag.String("config", "", fmt.Sprintf("path to config file (default: %s)", defaultPath)) - tmuxTarget := flag.String("tmux-target", "", "tmux split target (advanced)") - tmuxSplit := flag.String("tmux-split", "v", "tmux split orientation: v or h") - tmuxPercent := flag.Int("tmux-percent", 33, "tmux split size percentage (1-100)") + tmuxTarget := flag.String("tmux-target", "", "tmux popup target pane (advanced)") + tmuxPopupWidth := flag.String("tmux-popup-width", "60%", "tmux popup width, e.g. 60% or 120") + tmuxPopupHeight := flag.String("tmux-popup-height", "50%", "tmux popup height, e.g. 50% or 30") flag.Parse() opts := actionOptions{ infile: *infile, outfile: *outfile, uiChild: *uiChild, configPath: *configPath, - tmuxTarget: *tmuxTarget, tmuxSplit: *tmuxSplit, tmuxPercent: *tmuxPercent, + tmuxTarget: *tmuxTarget, tmuxPopupWidth: *tmuxPopupWidth, tmuxPopupHeight: *tmuxPopupHeight, } if err := run(opts, os.Stdin, os.Stdout, os.Stderr); err != nil { fmt.Fprintln(os.Stderr, err) @@ -40,13 +40,13 @@ func main() { // actionOptions holds the parsed command-line flags for hexai-tmux-action. type actionOptions struct { - infile string - outfile string - uiChild bool - configPath string - tmuxTarget string - tmuxSplit string - tmuxPercent int + infile string + outfile string + uiChild bool + configPath string + tmuxTarget string + tmuxPopupWidth string + tmuxPopupHeight string } // run builds the hexaiaction.Options and context, then delegates to runCommand. @@ -54,7 +54,7 @@ func run(opts actionOptions, stdin io.Reader, stdout, stderr io.Writer) error { haOpts := hexaiaction.Options{ Infile: opts.infile, Outfile: opts.outfile, UIChild: opts.uiChild, TmuxTarget: opts.tmuxTarget, - TmuxSplit: opts.tmuxSplit, TmuxPercent: opts.tmuxPercent, + TmuxPopupWidth: opts.tmuxPopupWidth, TmuxPopupHeight: opts.tmuxPopupHeight, } ctx := context.Background() if path := strings.TrimSpace(opts.configPath); path != "" { diff --git a/cmd/hexai-tmux-action/main_test.go b/cmd/hexai-tmux-action/main_test.go index 8abd420..c2cc95f 100644 --- a/cmd/hexai-tmux-action/main_test.go +++ b/cmd/hexai-tmux-action/main_test.go @@ -21,7 +21,7 @@ func TestRun_DelegatesToRunCommand(t *testing.T) { opts := actionOptions{ infile: "in.txt", outfile: "out.txt", - tmuxSplit: "h", tmuxPercent: 50, + tmuxPopupWidth: "90%", tmuxPopupHeight: "70%", } if err := run(opts, nil, nil, nil); err != nil { t.Fatalf("run: %v", err) @@ -29,7 +29,7 @@ func TestRun_DelegatesToRunCommand(t *testing.T) { if gotOpts.Infile != "in.txt" || gotOpts.Outfile != "out.txt" { t.Fatalf("unexpected opts: %+v", gotOpts) } - if gotOpts.TmuxSplit != "h" || gotOpts.TmuxPercent != 50 { + if gotOpts.TmuxPopupWidth != "90%" || gotOpts.TmuxPopupHeight != "70%" { t.Fatalf("unexpected tmux opts: %+v", gotOpts) } } @@ -42,7 +42,7 @@ func TestRun_WithConfigPath(t *testing.T) { return nil } - opts := actionOptions{configPath: " /tmp/test.toml ", tmuxSplit: "v", tmuxPercent: 33} + opts := actionOptions{configPath: " /tmp/test.toml "} if err := run(opts, nil, nil, nil); err != nil { t.Fatalf("run: %v", err) } |
