Keep the handoff continuation message when its turn is folded away
This commit is contained in:
@@ -595,7 +595,11 @@ func TestCompactCarriesHandoff(t *testing.T) {
|
||||
ev.AgentSessionId != nil && *ev.AgentSessionId != old.Id
|
||||
})
|
||||
|
||||
continued := false
|
||||
for _, ev := range events {
|
||||
if ev.Kind == "user.message" && *ev.AgentSessionId != old.Id {
|
||||
continued = ev.Payload["continuation"] == true
|
||||
}
|
||||
if ev.Kind == "turn.ended" && *ev.AgentSessionId == old.Id {
|
||||
if ev.Payload["handoff"] != true || ev.Payload["inbox_item_id"] != nil {
|
||||
t.Fatalf("handoff turn.ended %v: want handoff and no inbox summary", ev.Payload)
|
||||
@@ -605,6 +609,9 @@ func TestCompactCarriesHandoff(t *testing.T) {
|
||||
t.Fatalf("handoff prompt %v: want handoff flag", ev.Payload)
|
||||
}
|
||||
}
|
||||
if !continued {
|
||||
t.Fatalf("new session's first message lacks the continuation flag")
|
||||
}
|
||||
|
||||
sessions, err := e.store.ListSessions(e.ctx, e.task.Id)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user