X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/a606686934b4028c29dca8e9dae6b2e188cee9c5..b2fc2d6a737dd5bab25e57ba822dd07258de93e6:/probe_log_helper_test.go diff --git a/probe_log_helper_test.go b/probe_log_helper_test.go index ddce81d..0097dda 100644 --- a/probe_log_helper_test.go +++ b/probe_log_helper_test.go @@ -38,6 +38,7 @@ func (g *ProbeWriter) message() (string, string) { // fill joins lines of write until the text has about size bytes. func (g *ProbeWriter) fill(write func() string, size int) string { var text strings.Builder + for text.Len() < size { if text.Len() > 0 { text.WriteByte(' ') @@ -82,7 +83,9 @@ func (g *ProbeWriter) pick(words []string) string { // toolCall returns a tool name and its JSON input of about size bytes. func (g *ProbeWriter) toolCall(size int) string { name := g.pick([]string{"shell", "read", "write", "edit"}) + var input map[string]string + switch name { case "shell": input = map[string]string{"command": "grep -n '" + g.pick(probeThings) + "' " + g.pick(probeFiles)}