Key for click-to-expand: tool_use_id where available (so tool_use + its * tool_result expand together), else uuid for groups/thinking.
(msg: RenderableMessage)
| 397 | /** Key for click-to-expand: tool_use_id where available (so tool_use + its |
| 398 | * tool_result expand together), else uuid for groups/thinking. */ |
| 399 | function expandKey(msg: RenderableMessage): string { |
| 400 | return (msg.type === 'assistant' || msg.type === 'user' ? getToolUseID(msg) : null) ?? msg.uuid; |
| 401 | } |
| 402 | |
| 403 | // Custom comparator to prevent unnecessary re-renders during streaming. |
| 404 | // Default React.memo does shallow comparison which fails when: |
no test coverage detected