diff options
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) } |
