From 9090d04e08b31b2ff42bc59a824376bb70f37090 Mon Sep 17 00:00:00 2001 From: weipengzhe <3389096668@qq.com> Date: Wed, 11 Nov 2026 10:36:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A53D=E8=A7=86=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/codex-pcb/CodexPcbDock.tsx | 4 +- designer/src/codex-pcb/DeliveryModel3D.tsx | 70 +++++++++++++++ designer/src/codex-pcb/codex-pcb.css | 2 + .../src/codex-pcb/delivery-step-viewer.ts | 86 +++++++++++++++++++ 4 files changed, 161 insertions(+), 1 deletion(-) create mode 100644 designer/src/codex-pcb/DeliveryModel3D.tsx create mode 100644 designer/src/codex-pcb/delivery-step-viewer.ts 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 &&