(target: T, src: { timestamp?: number; endedAt?: number })
| 131 | * persist → normalize → display round-trip — and one rule lives in one place. |
| 132 | */ |
| 133 | export function withBlockTiming<T>(target: T, src: { timestamp?: number; endedAt?: number }): T { |
| 134 | const writable = target as { timestamp?: number; endedAt?: number } |
| 135 | if (typeof src.timestamp === 'number') writable.timestamp = src.timestamp |
| 136 | if (typeof src.endedAt === 'number') writable.endedAt = src.endedAt |
| 137 | return target |
| 138 | } |
| 139 | |
| 140 | function withBlockParent<T>(target: T, src: { parentToolCallId?: string }): T { |
| 141 | if (src.parentToolCallId) { |
no outgoing calls
no test coverage detected