(block: PersistedContentBlock)
| 49 | } |
| 50 | |
| 51 | function toDisplayBlock(block: PersistedContentBlock): ContentBlock | undefined { |
| 52 | const displayed = toDisplayBlockBody(block) |
| 53 | if (!displayed) return undefined |
| 54 | if (block.parentToolCallId && displayed.parentToolCallId === undefined) { |
| 55 | displayed.parentToolCallId = block.parentToolCallId |
| 56 | } |
| 57 | if (block.spanId && displayed.spanId === undefined) { |
| 58 | displayed.spanId = block.spanId |
| 59 | } |
| 60 | if (block.parentSpanId && displayed.parentSpanId === undefined) { |
| 61 | displayed.parentSpanId = block.parentSpanId |
| 62 | } |
| 63 | return withBlockTiming(displayed, block) |
| 64 | } |
| 65 | |
| 66 | function toDisplayBlockBody(block: PersistedContentBlock): ContentBlock | undefined { |
| 67 | switch (block.type) { |
nothing calls this directly
no test coverage detected