AgentRegion.tsx 429 B

12345678910
  1. import type { NodeProps } from "@xyflow/react";
  2. import type { CanvasNodeData } from "@/lib/layout";
  3. export function AgentRegion({ data }: NodeProps) {
  4. const region = (data as unknown as CanvasNodeData).region;
  5. if (!region) return null;
  6. return <section className={`agentRegion region-${region.tone}`} aria-hidden="true">
  7. <header><strong>{region.label}</strong><span>{region.description}</span></header>
  8. </section>;
  9. }