Repository navigation
Show mini blobbys for active subagents - #346367
Lisa Rosenberg (lisa-rosenberg) wants to merge 71 commits into
Conversation
|
@microsoft-github-policy-service agree |
There was a problem hiding this comment.
🟡 Changes recommended
The new CSS variables are unregistered, causing stylelint/hygiene checks to fail, and unresolved mini-pet issues affect animation lifecycle, reduced-motion handling, appearance updates, and positioning.
6 open issues
Register the new subagent CSS variables · New Create mini pets after restoring the main pet's geometry · New Disable mini-pet animations when the chat pet is disabled · New Update mini-pet body animation when reduced motion changes · New Prevent overlapping mini-pet slots when the main pet moves · New Refresh existing mini-pet appearance when settings change · New
What changed in this PR
Adds a decorative mini chat pet for each active subagent, extending the existing pet widget to visualize parallel work requested in #346366.
Changes:
- Tracks subagents individually to create and remove the corresponding mini pets.
- Adds independent arrival, landing, idle, blink, and disappearance animations, with appearance matching and reduced-motion handling.
- Adds tests for lifecycle, placement, accessories, and animation behavior.
| File | Description |
|---|---|
src/vs/workbench/contrib/chat/test/browser/widget/chatPetWidget.test.ts |
Adds mini-pet lifecycle and animation tests; updates model mocks. |
src/vs/workbench/contrib/chat/browser/widget/media/chatPet.css |
Styles the non-interactive mini-pet layer, arrival animation, and eyes. |
src/vs/workbench/contrib/chat/browser/widget/chatPetWidget.ts |
Tracks active subagents and manages mini-pet rendering, placement, and disposal. |
Review effort: Balanced
|
Hi. Copilot Review suggested #346367 (comment) which I did. However, the file How should I proceed? |
|
this is super cute! i'm a little worried what will happen when you have a particularly large number of subagents. could we consider constraining some max width and height for i can resolve the conflict for you if needed. |
…s forbidden to be changed
Hi! Thanks for looking into this. I will try to implement it tomorrow. Regarding the protected file issue: I will think about it and write another comment tomorrow, too. |
Hi! I think I’m finished for now. I’ve updated the PR description and videos. Regarding the constraints: I’ve capped the maximum number of subagent pets at 10 (additional pets will be displayed once the others have finished). There is also a maximum stacking height at 500px. Both could be made into user settings or further lowered if you want. I haven’t added any user-adjustable settings yet, but let me know if I should add those (or other things, of course), too. Maybe users could also toggle subagent pets on and off in the settings. For now, I’ve tried to keep everything as self-contained, efficient, and simple as possible. One small note: for now, I’ve left some comments to make the review easier. I’ve noticed there are relatively few comments in the code, so if you want them removed at the end of the PR, too, just let me know. Thanks again for your time. I hope you like how it turned out. Ah, one more thing: regarding the conflict, I thought about it and changed the implementation, so the CSS variables no longer need to be registered. Thanks for the offer, though. |
There was a problem hiding this comment.
🟡 Changes recommended
Mini-pet animations continue redrawing while chat is hidden, and resizing can leave pets overlapping or floating because collision and support calculations do not account for their new dimensions.
2 open issues
6 resolved since last review
Register the new subagent CSS variables Refresh existing mini-pet appearance when settings change Prevent overlapping mini-pet slots when the main pet moves Update mini-pet body animation when reduced motion changes Disable mini-pet animations when the chat pet is disabled Create mini pets after restoring the main pet's geometry
Review effort: Balanced
There was a problem hiding this comment.
🟡 Changes recommended
An unhandled no-fit case causes an endless mini-pet fall/despawn/respawn cycle, while additional findings affect positioning, scaling, reduced-motion behavior, and restored subagent visibility.
5 open issues
Handle mini pets that cannot fit above the input · New Retarget the active fall animation when an arriving pet is scaled · New Rebase mini-pet positions when the overlay changes coordinate spaces · New Update reduced-motion settings for disappearing mini pets · New Include serialized invocations when detecting active subagents · New
2 resolved since last review
Review effort: Balanced
| } | ||
| } | ||
| // If the area is full, allow overlap instead of shrinking the subagent pets. | ||
| return { ...best!, top: Math.max(best!.top, minimumTop) }; |
| setScale(scale: number, top: number): void { | ||
| this._top = top; | ||
| this.element.style.top = `${this._top}px`; | ||
| this.element.style.transform = `scale(${scale})`; |
| this.parent.classList.add('chat-pet-host'); | ||
| this._overlay = dom.$(`.${CHAT_PET_OVERLAY_CLASS}`); | ||
| this.parent.prepend(this._overlay); | ||
| this._subagentPetLayer = dom.append(this._overlay, dom.$('.chat-subagent-pet-layer')); |
| for (const subagentPet of this._subagentPets.values()) { | ||
| subagentPet.updateBlink(); | ||
| if (enabled && (wasMotionReduced !== this._motionReduced || colorChanged || accessoryChanged)) { | ||
| subagentPet.updateAppearance(wasMotionReduced !== this._motionReduced, variantChanged, accessoryChanged); |
| if (part.kind !== 'toolInvocation') { | ||
| continue; | ||
| } | ||
| part.toolSpecificDataKind.read(responseReader); | ||
| const data = part.toolSpecificData; | ||
| if (data?.kind === 'subagent') { | ||
| // Metadata updates also notify through the tool state. | ||
| part.state.read(responseReader); | ||
| } |


Closes #346366
Adds independent mini pets for active subagents. They fall in near the main pet, have their own animations, and match its size, color, and accessory. They respect reduced motion and are purely visual.
Each mini pet is tracked by subagent, so it disappears when that subagent finishes. Up to 10 are shown at once; additional active subagents get a pet when a slot becomes available. Pets stack within a bounded area and adjust when the chat layout changes.
The attached videos show different sizes, colors, accessories, and numbers of subagents.
How to test
vscode-subagent-pet-10-falling.mp4
vscode-subagent-pet-12-bigger.mp4
vscode-subagent-pet-12-changing.mp4
vscode-subagent-pet-12-agents.mp4