feat(agent): 规则计划器按声明的 text/query 参数填充原始问法

让假引擎的默认计划器能把用户原话作为 text/query 参数传给能力,M1 演示与联调不再因为缺参数而失败;能力声明里没有这两个参数时不受影响。
This commit is contained in:
zh 2026-09-28 15:39:21 +08:00
parent d03f8d7414
commit cd883d9ad7
1 changed files with 2 additions and 0 deletions

View File

@ -96,6 +96,8 @@ export function extractArgs(text: string, tool: ToolDescriptor): Record<string,
const hit = ENTITY_WORDS.find((word) => text.includes(word));
if (hit) args.entity = hit;
}
if (wants('text')) args.text = text;
if (wants('query')) args.query = text;
if (/CP-?SAT/i.test(text)) args.strategy = 'cpsat';
return args;
}