MCPcopy Index your code
hub / github.com/simstudioai/sim / withBlockTiming

Function withBlockTiming

apps/sim/lib/copilot/chat/persisted-message.ts:133–138  ·  view source on GitHub ↗
(target: T, src: { timestamp?: number; endedAt?: number })

Source from the content-addressed store, hash-verified

131 * persist → normalize → display round-trip — and one rule lives in one place.
132 */
133export 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
140function withBlockParent<T>(target: T, src: { parentToolCallId?: string }): T {
141 if (src.parentToolCallId) {

Callers 3

toDisplayBlockFunction · 0.90
mapContentBlockFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected