MCPcopy Create free account
hub / github.com/MagicCube/agentara / addKeysToTokens

Function addKeysToTokens

web/src/components/ai-elements/code-block.tsx:56–63  ·  view source on GitHub ↗
(lines: ThemedToken[][])

Source from the content-addressed store, hash-verified

54}
55
56const addKeysToTokens = (lines: ThemedToken[][]): KeyedLine[] =>
57 lines.map((line, lineIdx) => ({
58 key: `line-${lineIdx}`,
59 tokens: line.map((token, tokenIdx) => ({
60 key: `line-${lineIdx}-${tokenIdx}`,
61 token,
62 })),
63 }));
64
65// Token rendering component
66const TokenSpan = ({ token }: { token: ThemedToken }) => (

Callers 1

code-block.tsxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected