feat: expose master agent evolution dashboard
This commit is contained in:
@@ -359,6 +359,43 @@ test("master-agent 查询当前后端时直接走 fast path 返回后端摘要",
|
||||
assert.equal(reply?.senderLabel ?? "", "主Agent·gpt-5.4");
|
||||
});
|
||||
|
||||
test("master-agent 重复追问状态类问题时会记录 repeated_question 进化信号", async () => {
|
||||
await saveAiAccount({
|
||||
accountId: "openai-repeat-status",
|
||||
label: "OpenAI 主模型",
|
||||
role: "primary",
|
||||
provider: "openai_api",
|
||||
displayName: "OpenAI 主模型",
|
||||
model: "gpt-5.4",
|
||||
apiKey: "sk-openai-repeat-status",
|
||||
enabled: true,
|
||||
setActive: true,
|
||||
loginStatusNote: "用于重复状态问题测试。",
|
||||
});
|
||||
|
||||
const firstResponse = await POST(
|
||||
await createAuthedRequest("master-agent", {
|
||||
body: "当前主节点在线吗",
|
||||
}),
|
||||
{ params: Promise.resolve({ projectId: "master-agent" }) },
|
||||
);
|
||||
assert.equal(firstResponse.status, 200);
|
||||
|
||||
const secondResponse = await POST(
|
||||
await createAuthedRequest("master-agent", {
|
||||
body: "现在主节点在线吗",
|
||||
}),
|
||||
{ params: Promise.resolve({ projectId: "master-agent" }) },
|
||||
);
|
||||
assert.equal(secondResponse.status, 200);
|
||||
|
||||
const state = await readState();
|
||||
assert.ok(
|
||||
state.masterAgentEvolutionSignals.some((signal) => signal.kind === "repeated_question"),
|
||||
"expected at least one repeated_question signal",
|
||||
);
|
||||
});
|
||||
|
||||
test("master-agent 查询全局接管状态时直接走 fast path 返回当前状态", async () => {
|
||||
await saveAiAccount({
|
||||
accountId: "openai-takeover-status",
|
||||
|
||||
Reference in New Issue
Block a user