MCPcopy Create free account
hub / github.com/ecomfe/tempad-dev / createTree

Function createTree

packages/extension/tests/mcp/tools/code/test-helpers.ts:29–41  ·  view source on GitHub ↗
(snapshots: NodeSnapshot[])

Source from the content-addressed store, hash-verified

27}
28
29export function createTree(snapshots: NodeSnapshot[]): VisibleTree {
30 return {
31 rootIds: snapshots.filter((item) => !item.parentId).map((item) => item.id),
32 order: snapshots.map((item) => item.id),
33 stats: {
34 totalNodes: snapshots.length,
35 maxDepth: 1,
36 capped: false,
37 cappedNodeIds: []
38 },
39 nodes: new Map(snapshots.map((item) => [item.id, item]))
40 }
41}

Callers 8

index.test.tsFile · 0.90
stacking.test.tsFile · 0.90
svg.test.tsFile · 0.90
shell.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected