Commit 971d645
fix(chat): hide message actions on content-less messages (compact subagent cards) (#721)
A subagent delegation renders as its own assistant message whose only content is
the subagent card (no assistant text). It was still getting the full message-
actions toolbar (regenerate/copy/thumbs up/down) — pure whitespace, since there
is nothing to copy/regenerate/rate — which bloated the stream.
Gate <chat-message-actions> on the message having copyable text (`content.trim()`).
Subagent cards and bare tool-call messages now render compact; real answers keep
their actions.
Verified live in examples/ag-ui (research subagent): the delegation card's actions
toolbar is gone; the answer message retains exactly one actions toolbar.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent 6580abb commit 971d645
1 file changed
Lines changed: 15 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
259 | 266 | | |
260 | 267 | | |
261 | 268 | | |
| |||
0 commit comments