diff options
| author | Paul Buetow <paul@buetow.org> | 2025-09-26 19:34:19 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-09-26 19:34:19 +0300 |
| commit | 0583b360ceb606b8e58f12a17f588bd27feeb117 (patch) | |
| tree | ae8ac0d7968a409a76d18d84e080d02da52ce775 /internal/hexaiaction/run.go | |
| parent | 869c018a7a26285263cf7692f25f6aa44e2635c9 (diff) | |
Add per-surface provider overrides and wiring
Diffstat (limited to 'internal/hexaiaction/run.go')
| -rw-r--r-- | internal/hexaiaction/run.go | 9 |
1 files changed, 8 insertions, 1 deletions
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 { |
