From 0583b360ceb606b8e58f12a17f588bd27feeb117 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 26 Sep 2025 19:34:19 +0300 Subject: Add per-surface provider overrides and wiring --- internal/hexaiaction/run.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'internal/hexaiaction/run.go') diff --git a/internal/hexaiaction/run.go b/internal/hexaiaction/run.go index a48bf94..953da80 100644 --- a/internal/hexaiaction/run.go +++ b/internal/hexaiaction/run.go @@ -41,12 +41,19 @@ func Run(ctx context.Context, stdin io.Reader, stdout, stderr io.Writer) error { if len(cfg.CustomActions) > 0 { chooseActionFn = func() (ActionKind, error) { return RunTUIWithCustom(cfg.CustomActions, cfg.TmuxCustomMenuHotkey) } } + if providerOverride := strings.TrimSpace(cfg.CodeActionProvider); providerOverride != "" { + cfg.Provider = providerOverride + } 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(tmux.FormatLLMStartStatus(cli.Name(), cli.DefaultModel())) + primaryModel := strings.TrimSpace(reqOptsFrom(cfg).model) + if primaryModel == "" { + primaryModel = cli.DefaultModel() + } + _ = tmux.SetStatus(tmux.FormatLLMStartStatus(cli.Name(), primaryModel)) var client chatDoer = cli parts, err := ParseInput(stdin) if err != nil { -- cgit v1.2.3