Initial import of streamline
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { test, expect } from "bun:test";
|
||||
import { classifyExecutorPrompt } from "../src/transcripts";
|
||||
|
||||
test("执行会话按第一条用户消息归类", () => {
|
||||
expect(classifyExecutorPrompt("你是 TikTok 项目的自主 Bug 修复 Agent。本次任务的工作区在 /Users/fei/bug_workspace/7372671522。"))
|
||||
.toEqual({ stage: "bug.run", workspaceKey: "7372671522" });
|
||||
expect(classifyExecutorPrompt("你是 TikTok 项目的自主 Feature 实现 Agent。本次为 **第 2 批执行(再实现)**,工作区在 /Users/fei/bug_workspace/feature-67954619-ea39-46b8-a5af-4b520e4a266f"))
|
||||
.toEqual({ stage: "feature.run.second", workspaceKey: "67954619-ea39-46b8-a5af-4b520e4a266f" });
|
||||
expect(classifyExecutorPrompt("你是 TikTok 项目的自主 Feature 实现 Agent。工作区在 /Users/x/bug_workspace_android/feature-abc")?.stage)
|
||||
.toBe("feature.run.first");
|
||||
});
|
||||
|
||||
test("复核协作 / 评估等其它会话不列", () => {
|
||||
expect(classifyExecutorPrompt("你是 TikTok 项目「人工复核」阶段的复核协作 Agent(代号 Asking)。")).toBeNull();
|
||||
});
|
||||
Reference in New Issue
Block a user