feat(ai): 优化拆解目标和负责人推荐
This commit is contained in:
14
apps/web/lib/ai-decompose-target.ts
Normal file
14
apps/web/lib/ai-decompose-target.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import type { AgentDecomposeResult, AgentDecomposeTarget } from '@ftb/shared';
|
||||
|
||||
export function filterDecomposeResultByTarget(
|
||||
result: AgentDecomposeResult,
|
||||
target: AgentDecomposeTarget = 'all',
|
||||
): AgentDecomposeResult {
|
||||
if (target === 'dev_tasks') {
|
||||
return { ...result, testCaseDrafts: [] };
|
||||
}
|
||||
if (target === 'test_cases') {
|
||||
return { ...result, devTaskDrafts: [] };
|
||||
}
|
||||
return result;
|
||||
}
|
||||
Reference in New Issue
Block a user