From 980139b25f3b80ab3b66fcb3ef52c778fd43ba6b Mon Sep 17 00:00:00 2001 From: weipengzhe <3389096668@qq.com> Date: Wed, 11 Nov 2026 11:40:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E4=BA=86=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E8=BF=9B=E5=BA=A6=E6=9D=A1=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/codex-pcb/CodexPcbDock.tsx | 6 +- designer/src/codex-pcb/TaskProgress.tsx | 60 +++++++++++++++ designer/src/codex-pcb/codex-pcb.css | 2 + designer/src/codex-pcb/task-progress.ts | 73 +++++++++++++++++++ .../designer/pcb_task_progress.test.ts | 57 +++++++++++++++ 5 files changed, 196 insertions(+), 2 deletions(-) create mode 100644 designer/src/codex-pcb/TaskProgress.tsx create mode 100644 designer/src/codex-pcb/task-progress.ts create mode 100644 qa/unittests/designer/pcb_task_progress.test.ts diff --git a/designer/src/codex-pcb/CodexPcbDock.tsx b/designer/src/codex-pcb/CodexPcbDock.tsx index 6d7db7a..001b8fa 100644 --- a/designer/src/codex-pcb/CodexPcbDock.tsx +++ b/designer/src/codex-pcb/CodexPcbDock.tsx @@ -2,10 +2,11 @@ import { useEffect, useRef, useState } from 'react'; import { createPortal } from 'react-dom'; import './codex-pcb.css'; import { DeliveryModel3D } from './DeliveryModel3D.js'; +import { TaskProgress } from './TaskProgress.js'; import { Markdown as RichMarkdown } from '@ziroeda/ai/markdown.js'; type Artifact = { name: string; kind: string; label: string; bytes: number; sha256: string }; -type Session = { id: string; request: string; state: string; busy: boolean; thread_id?: string; error?: string; cursor: number; created_at: number; proposal?: { title: string; markdown: string; revision: number; hash: string }; approval?: { revision: number }; delivery?: { files: Artifact[]; notes: string }; }; +type Session = { id: string; request: string; state: string; busy: boolean; thread_id?: string; error?: string; cursor: number; created_at: number; updated_at?: number; proposal?: { title: string; markdown: string; revision: number; hash: string; at?: number }; approval?: { revision: number; at?: number }; delivery?: { files: Artifact[]; notes: string }; }; type Entry = { seq: number; at: number; type: string; data: Record }; const BASE = `${import.meta.env.BASE_URL}pcb-api`; const ACTIVE = 'vibemake.pcb2.persistent-session'; @@ -64,6 +65,7 @@ export function CodexPcbDock(): JSX.Element { {!open ? :
Codex PCB 工作台从方案到真实电路板
+
{active && task && }
{error &&
{error}
} {!active ?
让需求成为电路板

你想设计什么?

描述用途、供电、接口和尺寸要求。AI 会先提出方案,由你审核后再开始绘制。