From b39f233bf65c4a4b1d8d7a813b21d8477699ffae Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 7 Sep 2025 21:10:15 +0300 Subject: feat(tmux): add status line updates via @hexai_status; wire into CLI, LSP stats, and tmux-action --- internal/hexaiaction/run.go | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'internal/hexaiaction') diff --git a/internal/hexaiaction/run.go b/internal/hexaiaction/run.go index b11457c..c8cfcac 100644 --- a/internal/hexaiaction/run.go +++ b/internal/hexaiaction/run.go @@ -11,6 +11,7 @@ import ( "codeberg.org/snonux/hexai/internal/editor" "codeberg.org/snonux/hexai/internal/logging" "codeberg.org/snonux/hexai/internal/llmutils" + "codeberg.org/snonux/hexai/internal/tmux" ) // Run executes the hexai-tmux-action command flow. @@ -21,11 +22,13 @@ var newClientFromApp = llmutils.NewClientFromApp func Run(ctx context.Context, stdin io.Reader, stdout, stderr io.Writer) error { logger := log.New(stderr, "hexai-tmux-action ", log.LstdFlags|log.Lmsgprefix) cfg := appconfig.Load(logger) - client, err := newClientFromApp(cfg) + cli, err := newClientFromApp(cfg) if err != nil { fmt.Fprintf(stderr, logging.AnsiBase+"hexai-tmux-action: LLM disabled: %v"+logging.AnsiReset+"\n", err) return err } + _ = tmux.SetStatus("hexai action ready " + cli.DefaultModel()) + var client chatDoer = cli parts, err := ParseInput(stdin) if err != nil { fmt.Fprintln(stderr, logging.AnsiBase+"hexai-tmux-action: failed to read input"+logging.AnsiReset) @@ -38,12 +41,13 @@ func Run(ctx context.Context, stdin io.Reader, stdout, stderr io.Writer) error { if err != nil { return err } - out, err := executeAction(ctx, kind, parts, cfg, client, stderr) - if err != nil { - return err - } - io.WriteString(stdout, out) - return nil + out, err := executeAction(ctx, kind, parts, cfg, client, stderr) + if err != nil { + return err + } + io.WriteString(stdout, out) + _ = tmux.SetStatus("✅ " + cli.DefaultModel()) + return nil } func executeAction(ctx context.Context, kind ActionKind, parts InputParts, cfg appconfig.App, client chatDoer, stderr io.Writer) (string, error) { -- cgit v1.2.3