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)
| 723 | /** Key for click-to-expand: tool_use_id where available (so tool_use + its |
| 724 | * tool_result expand together), else uuid for groups/thinking. */ |
| 725 | function expandKey(msg: RenderableMessage): string { |
| 726 | return (msg.type === 'assistant' || msg.type === 'user' ? getToolUseID(msg) : null) ?? msg.uuid; |
| 727 | } |
| 728 | |
| 729 | // Custom comparator to prevent unnecessary re-renders during streaming. |
| 730 | // Default React.memo does shallow comparison which fails when: |
no test coverage detected