feat(agent): 用对话起草巡检(schedule.draft_check + 起草巡检 Skill + 计划页入口与对话卡片)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
8eb8a68295
commit
7c4ad901d9
14 files changed
+408
-7
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import type { AgentRunEvent } from "@umt/contracts";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { authDenial, isDenied, pairAudit, runPlanIds, toolSummary } from "./agent-conversation.tsx";
|
||||
import { authDenial, draftCheckOf, isDenied, pairAudit, runPlanIds, toolSummary } from "./agent-conversation.tsx";
|
||||
import { matchesHistory } from "./agent-session-list.tsx";
|
||||
import { contextFromPath, contextPrefix, shortGoalTitle, splitContextGoal } from "./agent-store.ts";
|
||||
import { isLongReport } from "./conversation-model.ts";
|
||||
@@ -168,3 +168,17 @@ describe("shortGoalTitle(会话短标题)", () => {
|
||||
expect(t).toBe("调查待处理事项(下载失败):下载异常:Dune.Part.Two");
|
||||
});
|
||||
});
|
||||
|
||||
describe("起草巡检卡片", () => {
|
||||
it("成功的 schedule.draft_check 取巡检 ID 与名称;失败 / 其它能力不出卡片", () => {
|
||||
const out =
|
||||
'{"jobId":"check.custom.1a2b3c4d","name":"失败下载日报","everyHours":24,"capabilities":["download.list"]';
|
||||
expect(
|
||||
draftCheckOf(call({ capabilityId: "schedule.draft_check", status: "succeeded", outputSummary: out })),
|
||||
).toEqual([{ jobId: "check.custom.1a2b3c4d", name: "失败下载日报" }]);
|
||||
expect(draftCheckOf(call({ capabilityId: "schedule.draft_check", status: "failed", outputSummary: out }))).toEqual(
|
||||
[],
|
||||
);
|
||||
expect(draftCheckOf(call({ capabilityId: "site.list", status: "succeeded", outputSummary: out }))).toEqual([]);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user