]> git.giacomolli.uk - onechat/blobdiff - probe.go
Resume queued appends at their saved log ID
[onechat] / probe.go
index d788fa99cfe7d2f95269be231b0815c04c10ff95..b00482952bdb10b18d47dcaff524805ed85c089e 100644 (file)
--- a/probe.go
+++ b/probe.go
@@ -7,7 +7,7 @@ import (
        "errors"
        "fmt"
        "io"
        "errors"
        "fmt"
        "io"
-       "log"
+       "log/slog"
        "os"
        "path/filepath"
        "strconv"
        "os"
        "path/filepath"
        "strconv"
@@ -103,13 +103,13 @@ func probe(ctx context.Context, args []string, out io.Writer) (err error) {
        client.LimitCalls(probeCallLimit)
 
        summarizer := ProbeSlotSummarizer{
        client.LimitCalls(probeCallLimit)
 
        summarizer := ProbeSlotSummarizer{
-               inner: newCompactor(client, probePrompt, config.Compactor),
+               inner: newCompactor(client, probePrompt, config.Compactor, promptTools()),
                slots: make(chan struct{}, builds),
        }
 
        // The report of the probe counts the failed calls, so the lines of the
        // failed builds are not needed.
                slots: make(chan struct{}, builds),
        }
 
        // The report of the probe counts the failed calls, so the lines of the
        // failed builds are not needed.
-       memory, err := openMemory(ctx, root, time.Now, summarizer, log.New(io.Discard, "", 0))
+       memory, err := openMemory(ctx, root, time.Now, summarizer, slog.New(slog.DiscardHandler))
        if err != nil {
                return fmt.Errorf("open probe memory: %w", err)
        }
        if err != nil {
                return fmt.Errorf("open probe memory: %w", err)
        }