diff --git a/designer/src/codex-pcb/CodexPcbDock.tsx b/designer/src/codex-pcb/CodexPcbDock.tsx index 20c99e7..6d7db7a 100644 --- a/designer/src/codex-pcb/CodexPcbDock.tsx +++ b/designer/src/codex-pcb/CodexPcbDock.tsx @@ -1,6 +1,7 @@ import { useEffect, useRef, useState } from 'react'; import { createPortal } from 'react-dom'; import './codex-pcb.css'; +import { DeliveryModel3D } from './DeliveryModel3D.js'; import { Markdown as RichMarkdown } from '@ziroeda/ai/markdown.js'; type Artifact = { name: string; kind: string; label: string; bytes: number; sha256: string }; @@ -56,6 +57,7 @@ export function CodexPcbDock(): JSX.Element { const cancel = () => action(async () => { setTask(await api(`/sessions/${active}/cancel`, {})); }); const resume = () => action(async () => { setTask(await api(`/sessions/${active}/resume`, {})); setTab('activity'); }); const downloadable = (f: Artifact) => `${BASE}/sessions/${active}/files/${encodeURIComponent(f.name)}`; + const step = task?.delivery?.files.find(f => f.kind === 'step' && /\.(step|stp)$/i.test(f.name)); const canReview = task && !task.approval && !task.busy && ['review','needs_input','failed'].includes(task.state); const interesting = entries.filter(e => ['message','activity','eda.started','eda.error','session.reconnecting','session.failed','production.blocked','delivery.completed','proposal.approved','session.resumed'].includes(e.type)); const view =
@@ -69,7 +71,7 @@ export function CodexPcbDock(): JSX.Element { {task.error &&
{task.error}
} {tab === 'plan' &&
原始需求

{task.request}

{task.proposal ? :

AI 正在研究需求和制定方案,可以在运行记录中查看进度。

}{task.approval &&
已确认方案 v{task.approval.revision},设计按此方案执行。
}{canReview &&