fix Ooutboundmedia

This commit is contained in:
afjcjsbx
2026-03-23 00:08:43 +01:00
parent f735b0551c
commit 1e98f86fa9
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -2413,7 +2413,7 @@ turnLoop:
})
}
if len(toolResult.Media) > 0 {
if len(toolResult.Media) > 0 && toolResult.ResponseHandled {
parts := make([]bus.MediaPart, 0, len(toolResult.Media))
for _, ref := range toolResult.Media {
part := bus.MediaPart{Ref: ref}
+6
View File
@@ -522,6 +522,12 @@ func TestProcessMessage_MediaArtifactCanBeForwardedBySendFile(t *testing.T) {
default:
t.Fatal("expected outbound media from send_file")
}
select {
case extra := <-msgBus.OutboundMediaChan():
t.Fatalf("expected exactly one outbound media delivery, got extra %+v", extra)
default:
}
}
// TestAgentLoop_GetStartupInfo verifies startup info contains tools