mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
fix Ooutboundmedia
This commit is contained in:
+1
-1
@@ -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))
|
parts := make([]bus.MediaPart, 0, len(toolResult.Media))
|
||||||
for _, ref := range toolResult.Media {
|
for _, ref := range toolResult.Media {
|
||||||
part := bus.MediaPart{Ref: ref}
|
part := bus.MediaPart{Ref: ref}
|
||||||
|
|||||||
@@ -522,6 +522,12 @@ func TestProcessMessage_MediaArtifactCanBeForwardedBySendFile(t *testing.T) {
|
|||||||
default:
|
default:
|
||||||
t.Fatal("expected outbound media from send_file")
|
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
|
// TestAgentLoop_GetStartupInfo verifies startup info contains tools
|
||||||
|
|||||||
Reference in New Issue
Block a user