Collapse handoff turns in the transcript instead of streaming them
This commit is contained in:
@@ -587,6 +587,10 @@ func (m *Manager) message(ctx context.Context, l *live, actor, text string, imag
|
||||
if len(images) > 0 {
|
||||
payload["images"] = images
|
||||
}
|
||||
compacting := isHandoffPrompt(actor, text)
|
||||
if compacting {
|
||||
payload["handoff"] = true
|
||||
}
|
||||
err := m.emit(ctx, l, actor, "user.message", payload)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -597,7 +601,7 @@ func (m *Manager) message(ctx context.Context, l *live, actor, text string, imag
|
||||
l.asked = false
|
||||
l.bounced = false
|
||||
l.wantCompact = false
|
||||
l.compacting = isHandoffPrompt(actor, text)
|
||||
l.compacting = compacting
|
||||
l.rateLimited = nil
|
||||
m.mu.Unlock()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user