fix: update mcp and nodes for SiteNode.children string[] schema change
Fixes breakage introduced by #320 which changed `SiteNode.children` from embedded `BuildingNode | ItemNode` objects to flat `string[]` IDs. - `packages/mcp/src/lib/rehydrate-site-children.ts`: replace now-obsolete re-embedding logic with a no-op passthrough (call-site compatible) - `packages/mcp/src/tools/variants/generate-variants.ts`: drop the inline copy of the same function and its call - `packages/nodes/src/site/renderer.tsx`: cast `childId as AnyNodeId` since `SiteNode.children` is now `string[]`, not `AnyNodeId[]` Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
6ea622af56
commit
01639e42e4
@@ -1,6 +1,6 @@
|
||||
'use client'
|
||||
|
||||
import { type SiteNode, type SlabNode, useRegistry, useScene } from '@pascal-app/core'
|
||||
import { type AnyNodeId, type SiteNode, type SlabNode, useRegistry, useScene } from '@pascal-app/core'
|
||||
import { NodeRenderer, unionPolygons, useNodeEvents, useViewer } from '@pascal-app/viewer'
|
||||
import { useMemo, useRef } from 'react'
|
||||
import { BufferGeometry, Float32BufferAttribute, type Group, Path, Shape } from 'three'
|
||||
@@ -117,7 +117,7 @@ export const SiteRenderer = ({ node }: { node: SiteNode }) => {
|
||||
<group ref={ref} {...handlers}>
|
||||
{/* Render children (buildings and items) */}
|
||||
{node.children.map((childId) => (
|
||||
<NodeRenderer key={childId} nodeId={childId} />
|
||||
<NodeRenderer key={childId} nodeId={childId as AnyNodeId} />
|
||||
))}
|
||||
|
||||
{/* Ground fill: site polygon with slab holes, occludes below-grade geometry */}
|
||||
|
||||
Reference in New Issue
Block a user