Skip to content

Commit 8f60f05

Browse files
committed
brain: fix thinking always appending messages
For #94.
1 parent aa9e3e5 commit 8f60f05

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

brain/speak.go

+1
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ func term(ctx context.Context, s Interface, tag string, prompt []string, wid, wt
138138
n--
139139
continue
140140
}
141+
*wid, *wtok = (*wid)[:0], (*wtok)[:0]
141142
if err := f(wid, wtok); err != nil {
142143
return n, seen, fmt.Errorf("couldn't think: %w", err)
143144
}

0 commit comments

Comments
 (0)