From 4ffb22e7f69f1c9c79b095d4e60bad3d97aac55b Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 18 Jun 2026 07:45:37 +0300 Subject: ik0 replace test seams with dependency injection --- internal/hexaicli/run.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'internal/hexaicli/run.go') diff --git a/internal/hexaicli/run.go b/internal/hexaicli/run.go index 6614bc5..8152618 100644 --- a/internal/hexaicli/run.go +++ b/internal/hexaicli/run.go @@ -157,7 +157,7 @@ func setupCLIPrinter(stdout io.Writer, jobs []cliJob) *termprint.ColumnPrinter { } func runSingleCLIJob(ctx context.Context, job cliJob, msgs []llm.Message, input string, stdout io.Writer, printer *termprint.ColumnPrinter, streamOutput bool, clientFactory cliClientFactory, statusSink cliStatusSink) *cliJobResult { - if res := cachedCLIJobResult(job, msgs, stdout, printer, streamOutput); res != nil { + if res := cachedCLIJobResult(ctx, job, msgs, stdout, printer, streamOutput); res != nil { return res } @@ -181,7 +181,7 @@ func runSingleCLIJob(ctx context.Context, job cliJob, msgs []llm.Message, input printer.Flush(job.index) } if err == nil { - storeCLIResponseCache(newCLIResponseCacheKey(job.provider, model, job.req, jobMsgs), outBuf.String()) + storeCLIResponseCache(ctx, newCLIResponseCacheKey(job.provider, model, job.req, jobMsgs), outBuf.String()) } return &cliJobResult{ provider: job.provider, @@ -192,8 +192,8 @@ func runSingleCLIJob(ctx context.Context, job cliJob, msgs []llm.Message, input } } -func cachedCLIJobResult(job cliJob, msgs []llm.Message, stdout io.Writer, printer *termprint.ColumnPrinter, streamOutput bool) *cliJobResult { - output, age, ok := lookupCLIResponseCache(newCLIResponseCacheKey(job.provider, job.req.model, job.req, msgs)) +func cachedCLIJobResult(ctx context.Context, job cliJob, msgs []llm.Message, stdout io.Writer, printer *termprint.ColumnPrinter, streamOutput bool) *cliJobResult { + output, age, ok := lookupCLIResponseCache(ctx, newCLIResponseCacheKey(job.provider, job.req.model, job.req, msgs)) if !ok { return nil } -- cgit v1.2.3