X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/ec38dadaaf127d8bd2ffb72df450e8d3f5ac88c0..d302957c09b192d0fbc09287ba7dcb7c32426556:/probe.go diff --git a/probe.go b/probe.go index 0b809e8..92a35b1 100644 --- a/probe.go +++ b/probe.go @@ -8,6 +8,7 @@ import ( "errors" "fmt" "io" + "log" "maps" "os" "path/filepath" @@ -105,7 +106,9 @@ func probe(ctx context.Context, args []string, out io.Writer) (err error) { slots: make(chan struct{}, builds), } - memory, err := openMemory(ctx, root, time.Now, summarizer) + // 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)) if err != nil { return err } @@ -287,9 +290,9 @@ func probeReadLog(path string, count int) (entries []ProbeEntry, err error) { } // probePrompt returns the system prompt of a probe run: the prompt of the agent -// probeName, without instructions. +// probeName, without instructions and with a fixed instructions file path. func probePrompt() (string, error) { - return prompt(probeName, ""), nil + return prompt(probeName, "/PROBE/instructions.md", ""), nil } // probeModelLines returns the sizes of the nodes that the model wrote, in tree @@ -435,7 +438,7 @@ func probeStop(records []ModelUsageRecord) string { // probeBuiltByModel tells if the node key needed a model call: a leaf whose // source is over nodeBytes, or a merge whose children do not fit in one node. -func probeBuiltByModel(memory *Memory, key nodeKey) (bool, error) { +func probeBuiltByModel(memory *Memory, key NodeKey) (bool, error) { if key.level == 0 { message, err := memory.log.Message(key.index) if err != nil {