Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions packages/mcp/src/templates/empty-studio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,16 +238,6 @@ function buildTemplate(): SceneGraph {
nodes[node.id as AnyNodeId] = node
}

// SiteNode.children is a discriminatedUnion of BuildingNode/ItemNode objects
// (not string ids) — so the site must embed the full building node. The
// rest of the tree uses string ids per the BaseNode/LevelNode/WallNode
// schemas. We mutate the flat-dict copy of the site here so the nested
// representation round-trips through AnyNode.safeParse.
const siteInDict = nodes['site_empty' as AnyNodeId] as unknown as {
children: unknown[]
}
siteInDict.children = [nodes['building_empty' as AnyNodeId]]

return {
nodes,
rootNodeIds: ['site_empty'] as AnyNodeId[],
Expand Down
4 changes: 0 additions & 4 deletions packages/mcp/src/templates/garden-house.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,6 @@ function buildTemplate(): SceneGraph {
],
} as unknown as AnyNode

// SiteNode.children is a discriminatedUnion of BuildingNode/ItemNode objects
// (not string ids) per the schema — embed the full building node here.
;(nodes.site_garden as unknown as { children: unknown[] }).children = [nodes.building_garden!]

return {
nodes: nodes as Record<AnyNodeId, AnyNode>,
rootNodeIds: ['site_garden'] as AnyNodeId[],
Expand Down
4 changes: 0 additions & 4 deletions packages/mcp/src/templates/two-bedroom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,6 @@ function buildTemplate(): SceneGraph {
],
} as unknown as AnyNode

// SiteNode.children is a discriminatedUnion of BuildingNode/ItemNode objects
// (not string ids) per the schema — embed the full building node here.
;(nodes.site_2br as unknown as { children: unknown[] }).children = [nodes.building_2br!]

return {
nodes: nodes as Record<AnyNodeId, AnyNode>,
rootNodeIds: ['site_2br'] as AnyNodeId[],
Expand Down
Loading