Ask agents to reply to mid-turn messages before their next tool call
This commit is contained in:
@@ -310,18 +310,18 @@ func (m *Manager) recordQueued(ctx context.Context, l *live, msgs []queued) stri
|
|||||||
b.WriteString("\n\n")
|
b.WriteString("\n\n")
|
||||||
}
|
}
|
||||||
if q.actor == boardActor {
|
if q.actor == boardActor {
|
||||||
fmt.Fprintf(b, "While you were working, %s\n\nTake it into account now.", q.text)
|
fmt.Fprintf(b, "While you were working, %s\n\nReply to it now, before your next tool call, then continue or change course as it says.", q.text)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if isLeadActor(q.actor) {
|
if isLeadActor(q.actor) {
|
||||||
fmt.Fprintf(b, "%s (not %s) sent you this message while you were working; take it into account now:\n\n%s", actorName(q.actor), leadOwner(q.actor), q.text)
|
fmt.Fprintf(b, "%s (not %s) interrupted you with this message. Reply to it now, before your next tool call, then continue or change course as it says:\n\n%s", actorName(q.actor), leadOwner(q.actor), q.text)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if q.client != "" {
|
if q.client != "" {
|
||||||
fmt.Fprintf(b, "%s sent you this message from %s while you were working; take it into account now:\n\n%s", q.actor, m.clientName(q.client), q.text)
|
fmt.Fprintf(b, "%s interrupted you from %s with this message. Reply to it now, before your next tool call, then continue or change course as it says:\n\n%s", q.actor, m.clientName(q.client), q.text)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
fmt.Fprintf(b, "%s sent you this message while you were working; take it into account now:\n\n%s", q.actor, q.text)
|
fmt.Fprintf(b, "%s interrupted you with this message. Reply to it now, before your next tool call, then continue or change course as it says:\n\n%s", q.actor, q.text)
|
||||||
}
|
}
|
||||||
slog.Info("queued messages sent mid-turn", "session", l.id, "count", len(msgs))
|
slog.Info("queued messages sent mid-turn", "session", l.id, "count", len(msgs))
|
||||||
return b.String()
|
return b.String()
|
||||||
|
|||||||
Reference in New Issue
Block a user