MCPcopy Index your code
hub / github.com/codeaashu/claude-code / expandKey

Function expandKey

src/components/Messages.tsx:725–727  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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. */
725function 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:

Callers 1

MessagesImplFunction · 0.85

Calls 1

getToolUseIDFunction · 0.85

Tested by

no test coverage detected