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

Function generateWorkspaceSnapshot

apps/sim/lib/copilot/chat/workspace-context.ts:547–554  ·  view source on GitHub ↗
(
  workspaceId: string,
  userId: string
)

Source from the content-addressed store, hash-verified

545 * when the workspace is unavailable.
546 */
547export async function generateWorkspaceSnapshot(
548 workspaceId: string,
549 userId: string
550): Promise<{ markdown: string; snapshot: VfsSnapshotV1 } | null> {
551 const data = await buildWorkspaceMdData(workspaceId, userId)
552 if (!data) return null
553 return { markdown: buildWorkspaceMd(data), snapshot: buildVfsSnapshot(data) }
554}
555
556/**
557 * Map the workspace inventory data to the typed VFS snapshot contract. Pure;

Callers 1

handleUnifiedChatPostFunction · 0.90

Calls 3

buildWorkspaceMdDataFunction · 0.85
buildWorkspaceMdFunction · 0.85
buildVfsSnapshotFunction · 0.85

Tested by

no test coverage detected