fix(pipes): align artifacts internal array type tracking with stream loops

This commit is contained in:
fujie
2026-02-28 14:17:05 +08:00
parent f32e90e182
commit 6b3eb8064b

View File

@@ -1251,7 +1251,7 @@ class Pipe:
{ {
"filename": safe_filename, "filename": safe_filename,
"content": artifacts_content, "content": artifacts_content,
"type": "message", "type": "artifacts",
} }
) )
except Exception as e: except Exception as e:
@@ -5668,10 +5668,10 @@ class Pipe:
except Exception: except Exception:
pass pass
# 2. Emit UI components (richui or message type) # 2. Emit UI components (richui or artifacts type)
if pending_embeds: if pending_embeds:
for embed in pending_embeds: for embed in pending_embeds:
if embed.get("type") in ["richui", "message"]: if embed.get("type") in ["richui", "artifacts"]:
# Status update # Status update
await __event_emitter__( await __event_emitter__(
{ {
@@ -5709,7 +5709,7 @@ class Pipe:
}, },
} }
) )
elif embed.get("type") == "message": elif embed.get("type") == "artifacts":
# Artifacts mode appends as raw message # Artifacts mode appends as raw message
await __event_emitter__( await __event_emitter__(
{ {