What problem does it solve?
Streaming agent responses that interleave main text with nested sub-conversations (skills, tools, knowledge bases) are hard to render correctly: ordering breaks, typewriter animations flicker, and nested cards lose reactivity. This Skill defines the architectural protocol for recursively nesting and rendering these SSE streams in the Wanwu platform frontend.
Core Features & Use Cases
- Sandwich Sequence Model: Interleaves main text chunks and sub-conversation cards in a single
messageSequence array ordered by an absolute order field.
- Parent-Child Adoption: Routes packets with
parentId into the correct parent component's sequence, supporting arbitrary nesting depth.
- Vue 2 Reactivity Rules: Enforces passing original reactive object references (never shallow copies) so typewriter updates propagate through nested components.
- Use Case: When an agent answer streams text, then a tool call card, then more text, then a nested knowledge-base card inside the tool card, this protocol ensures each piece renders in the right position with continuous typing animation and stable citation anchors (
data-sub-id, data-parent-id).
Quick Start
Apply the agent-stream-nesting-logic skill to implement recursive sub-conversation rendering for SSE messages in the Wanwu Vue 2 frontend.