- 节点循环:配方开局直坐 DAG 第一步;验收后先问下一步意向,再确认开干并可钉编排参数;「按意见修改」只重跑当前节点。 - 询问分流:能力 opening 走说话面引导,可跳过追问按题干去重;追问与产物同轮挂载,避免拆成两段历史。 - 运行时:补强 revision 重跑、创作流程合并/进度指针、工具循环与 worker 执行;新增运行日志与 web:watch。 - 前端:统一等待态文案与底栏主按钮,完善询问卡/产物验收/呈现壳样式与交互。 - 同步世界模拟器模块提示、编排文档与相关测试。 Co-authored-by: Cursor <cursoragent@cursor.com>
50 lines
1.8 KiB
TypeScript
50 lines
1.8 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
import {
|
|
displayStageLabel,
|
|
displayWorkerLabel,
|
|
formatWorkerDisplayTitle,
|
|
reviewComposerCopy,
|
|
} from "../src/server/display-labels.js";
|
|
|
|
describe("display-labels", () => {
|
|
it("maps lifecycle stages", () => {
|
|
expect(displayStageLabel("design")).toBe("创作");
|
|
expect(displayStageLabel("play")).toBe("游玩");
|
|
});
|
|
|
|
it("maps design workers", () => {
|
|
expect(displayWorkerLabel("design-flow")).toBe("创作 · 流程编排");
|
|
expect(displayWorkerLabel("design-step")).toBe("创作 · 执行步骤");
|
|
expect(formatWorkerDisplayTitle("design-flow", "output")).toBe(
|
|
"创作 · 流程编排 · 产出",
|
|
);
|
|
});
|
|
|
|
it("maps creation unit ids", () => {
|
|
expect(displayWorkerLabel("phase:core")).toBe("单位 · 核心");
|
|
expect(displayWorkerLabel("fixed:interaction")).toBe("技能 · 交互范式");
|
|
expect(displayWorkerLabel("fixed:aesthetics-interaction")).toBe(
|
|
"技能 · 美学纲领与交互范式",
|
|
);
|
|
expect(displayWorkerLabel("worker:narrator")).toBe("执行单元 · 叙事转述");
|
|
});
|
|
|
|
it("maps review composer copy by worker", () => {
|
|
const flow = reviewComposerCopy("design-flow");
|
|
expect(flow.acceptLabel).toBe("确认编排");
|
|
expect(flow.submitLabel).toBe("按意见改编排");
|
|
expect(flow.kicker).toBe("核对编排");
|
|
expect(flow.tone).toBe("plan");
|
|
|
|
const step = reviewComposerCopy("design-step");
|
|
expect(step.acceptLabel).toBe("接受");
|
|
expect(step.submitLabel).toBe("按意见修改");
|
|
expect(step.kicker).toBe("待验收");
|
|
expect(step.tone).toBe("accept");
|
|
|
|
const opening = reviewComposerCopy("opening-generator");
|
|
expect(opening.acceptLabel).toBe("选定此开场");
|
|
expect(opening.kicker).toBe("待选定");
|
|
});
|
|
});
|