feat(agent): add support for image generation type in event handling and messaging

This commit is contained in:
HouYunFei
2026-07-29 17:32:06 +08:00
parent 2afe2f3898
commit 2002dff78a
5 changed files with 7 additions and 2 deletions
@@ -754,7 +754,7 @@ export function LocalAgentPanel({ embedded, headless, autoConnect }: { embedded?
return;
}
}
if (event.type === "item.completed" && event.item?.type === "dynamic_tool_call" && event.item.id) {
if (event.type === "item.completed" && event.item?.type === "image_generation" && event.item.id) {
const generated = await importGeneratedImages(endpoint, token, event.item);
if (generated.length) {
const context = canvasContextRef.current;