- 版本目标 → 收录版本(前后端用户可见字符串、能力描述、给模型的提示) - Agent 上游 / 上游 → 模型服务;界面上的 Agent / Agent 会话 → 智能体 / 智能体会话 - 身份歧义 / 识别有歧义 / 无法确定作品 → 没识别出作品;待识别(池) → 未识别 - 建档 → 加入媒体库;资产 → 文件;库根 → 媒体库目录;纳管 → 本工具 / 外部任务; 哨兵 → 标记文件 / 检查目录;站点快照 → 抓取;Feed / RSS 订阅 / 来源健康 → RSS - 代码标识符、API 字段名、迁移文件不改;glossary.md 同步;smoke 选择器跟随 Co-Authored-By: Claude Opus 5.5 <[email protected]>
26 lines
1.1 KiB
TypeScript
26 lines
1.1 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { engineRunStatus } from "./labels.ts";
|
|
|
|
describe("任务行状态", () => {
|
|
const agent = (outcome: string | null) => ({
|
|
kind: "agent" as const,
|
|
refId: "r1",
|
|
title: null,
|
|
triggeredBy: null,
|
|
outcome,
|
|
});
|
|
it("引擎跑完但智能体会话超出预算 / 失败:显示业务结果,不显示「完成」", () => {
|
|
expect(engineRunStatus({ status: "completed", business: agent("budget_exceeded") })).toEqual({
|
|
label: "超出预算",
|
|
tone: "warning",
|
|
});
|
|
expect(engineRunStatus({ status: "completed", business: agent("failed") }).label).toBe("失败");
|
|
expect(engineRunStatus({ status: "completed", business: agent("succeeded") }).label).toBe("完成");
|
|
});
|
|
it("引擎自身失败 / 进行中照旧;没有业务对象照旧", () => {
|
|
expect(engineRunStatus({ status: "failed", business: agent("budget_exceeded") }).label).toBe("失败");
|
|
expect(engineRunStatus({ status: "running", business: agent("running") }).label).toBe("进行中");
|
|
expect(engineRunStatus({ status: "completed", business: null }).label).toBe("完成");
|
|
});
|
|
});
|