30 lines
1.4 KiB
TypeScript
30 lines
1.4 KiB
TypeScript
import assert from "node:assert/strict";
|
|
import test from "node:test";
|
|
import { classifyMasterAgentControlIntentForTesting } from "@/lib/boss-master-agent";
|
|
|
|
test("routes ordinary product discussion to discussion_only", () => {
|
|
const result = classifyMasterAgentControlIntentForTesting("帮我总结一下这个项目当前目标");
|
|
assert.equal(result.intentCategory, "discussion_only");
|
|
assert.equal(result.executionMode, "discussion");
|
|
});
|
|
|
|
test("routes development ask to project_development", () => {
|
|
const result = classifyMasterAgentControlIntentForTesting("继续开发这个项目,修掉登录闪退并跑测试");
|
|
assert.equal(result.intentCategory, "project_development");
|
|
assert.equal(result.executionMode, "development");
|
|
});
|
|
|
|
test("routes browser asks to browser_control", () => {
|
|
const result = classifyMasterAgentControlIntentForTesting("打开 Chrome 去后台看一下订单页");
|
|
assert.equal(result.intentCategory, "browser_control");
|
|
assert.equal(result.executionMode, "browser");
|
|
assert.equal(result.riskLevel, "medium");
|
|
});
|
|
|
|
test("routes desktop gui asks to desktop_control", () => {
|
|
const result = classifyMasterAgentControlIntentForTesting("打开微信并切到和产品经理的聊天窗口");
|
|
assert.equal(result.intentCategory, "desktop_control");
|
|
assert.equal(result.executionMode, "desktop");
|
|
assert.equal(result.riskLevel, "medium");
|
|
});
|