Skip to content

Commit 4a81d2b

Browse files
Add Model responding message
1 parent 626ec97 commit 4a81d2b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/runner/runner.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package runner
33
import (
44
"context"
55
"os"
6+
"strings"
67
"sync"
78
"time"
89

@@ -115,11 +116,15 @@ func (r *Runner) call(callCtx engine.Context, input string) (string, error) {
115116
go func() {
116117
defer wg.Done()
117118
for message := range progress {
119+
content := message.String()
120+
if strings.TrimSpace(content) != "" && !strings.Contains(content, "Sent content:") {
121+
content += "\n\nModel responding..."
122+
}
118123
r.display.progress <- Event{
119124
Time: time.Now(),
120125
Context: &callCtx,
121126
Type: EventTypeUpdate,
122-
Content: message.String(),
127+
Content: content,
123128
}
124129
}
125130
}()

0 commit comments

Comments
 (0)