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

Function serializeRecentExecutions

apps/sim/lib/copilot/vfs/serializers.ts:61–84  ·  view source on GitHub ↗
(
  executions: Array<{
    id: string
    executionId: string
    status: string
    trigger: string
    startedAt: Date
    endedAt?: Date | null
    totalDurationMs?: number | null
  }>
)

Source from the content-addressed store, hash-verified

59 * Takes recent execution log rows and produces a summary.
60 */
61export function serializeRecentExecutions(
62 executions: Array<{
63 id: string
64 executionId: string
65 status: string
66 trigger: string
67 startedAt: Date
68 endedAt?: Date | null
69 totalDurationMs?: number | null
70 }>
71): string {
72 return JSON.stringify(
73 executions.map((e) => ({
74 executionId: e.executionId,
75 status: e.status,
76 trigger: e.trigger,
77 startedAt: e.startedAt.toISOString(),
78 endedAt: e.endedAt?.toISOString(),
79 durationMs: e.totalDurationMs,
80 })),
81 null,
82 2
83 )
84}
85
86/**
87 * Serialize knowledge base metadata for VFS meta.json

Callers 2

materializeWorkflowsMethod · 0.90
materializeJobsMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected