旧单页 console.html 换成 Vite + React + TypeScript 单文件构建产物 (309525 字节,sha 90345ec8…,重建字节一致),源码在 cloud/console-react/,改页面只改 src 再 npm run build:console, 产物不手改。布局:左侧列表(模块导航 + 任务列表)、中间标准对话 (实时链路时间线 + 继续会话聊天框,共用 Chat 组件)、右侧详情 (元数据、操作、评审、审批、协调子任务、子代理、线程)。 API 与后端语义未改,key 只存浏览器 localStorage。 6 个 console 标记单测随实现改名更新(意图不变:壳确实调了 这些接口、turn 信息仍在详情里、旧 goal 输入仍不存在); P1 标记单测未动且通过。
18 lines
967 B
JavaScript
18 lines
967 B
JavaScript
// build:console 的第二步:把 vite-plugin-singlefile 产出的单文件
|
|
// 原样拷到可部署位置。绝不改动产物内容——以后改页面只改 src 再构建。
|
|
// 在本施工目录,目标是 ../console-redesign/console-react.html(主 agent
|
|
// 审阅用);进仓库后,主 agent 把同一文件拷到 cloud/console.html。
|
|
import { copyFileSync, statSync } from "node:fs";
|
|
import { createHash } from "node:crypto";
|
|
import { readFileSync } from "node:fs";
|
|
import { dirname, join } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
const root = join(dirname(fileURLToPath(import.meta.url)), "..");
|
|
const src = join(root, "dist", "index.html");
|
|
const dest = join(root, "..", "console-redesign", "console-react.html");
|
|
copyFileSync(src, dest);
|
|
const buf = readFileSync(dest);
|
|
console.log(`console-react.html ${buf.length} bytes sha256=${createHash("sha256").update(buf).digest("hex")}`);
|
|
console.log(`built: ${src} -> ${dest}`);
|