diff options
| author | Paul Buetow <paul@buetow.org> | 2025-09-07 17:58:32 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-09-07 17:58:32 +0300 |
| commit | 3246ebcc5246ed357f45ac32234d5cd34922b9f3 (patch) | |
| tree | c594f2fd2ebc01689574c721f4e85e1065a124c4 /internal/hexaicli/run.go | |
| parent | 77e41a1018715fa5ac4e6156354710b3b224b4fc (diff) | |
test+docs: add editor tests; document HEXAI_EDITOR/EDITOR and Custom prompt; seam client in CLI for tests
Diffstat (limited to 'internal/hexaicli/run.go')
| -rw-r--r-- | internal/hexaicli/run.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/internal/hexaicli/run.go b/internal/hexaicli/run.go index 98e4c40..6017e51 100644 --- a/internal/hexaicli/run.go +++ b/internal/hexaicli/run.go @@ -25,7 +25,7 @@ func Run(ctx context.Context, args []string, stdin io.Reader, stdout, stderr io. // Load configuration with a logger so file-based config is respected. logger := log.New(stderr, "hexai ", log.LstdFlags|log.Lmsgprefix) cfg := appconfig.Load(logger) - client, err := llmutils.NewClientFromApp(cfg) + client, err := newClientFromApp(cfg) if err != nil { fmt.Fprintf(stderr, logging.AnsiBase+"hexai: LLM disabled: %v"+logging.AnsiReset+"\n", err) return err @@ -154,6 +154,7 @@ func printProviderInfo(errw io.Writer, client llm.Client) { } // newClientFromConfig is kept for tests; delegates to llmutils. -func newClientFromConfig(cfg appconfig.App) (llm.Client, error) { - return llmutils.NewClientFromApp(cfg) -} +var newClientFromApp = llmutils.NewClientFromApp + +// Backcompat for tests referencing the older helper name. +func newClientFromConfig(cfg appconfig.App) (llm.Client, error) { return newClientFromApp(cfg) } |
