feat(router): improve direct_chat fast-path and add 103 token env sync
Memind CI / Test, build, and release guards (push) Failing after 12m44s

Route explicit text-only Q&A away from Agent before page-generation rules,
and add a script to enable Router + tighter memory budgets on 103 without
changing the global deepseek-v4-pro model.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-25 15:13:22 +08:00
parent 9dfafb99ca
commit 9332bacabd
7 changed files with 758 additions and 13 deletions
+19
View File
@@ -109,6 +109,25 @@ test('classifyWithRules routes greetings to direct chat', () => {
assert.equal(result.source, 'rule');
});
test('classifyWithRules routes explicit text-only Q&A to direct chat', () => {
for (const text of [
'用三句话介绍苏州园林,不要生成页面',
'简要介绍一下 Rust 和 Go 的区别',
'推荐一个最适合第一次去的,一句话说明理由',
]) {
const result = classifyWithRules({
text,
userMessage: {
role: 'user',
content: [{ type: 'text', text }],
metadata: { displayText: text },
},
});
assert.equal(result.route, CHAT_INTENT_ROUTE.DIRECT_CHAT, text);
assert.equal(result.source, 'rule', text);
}
});
test('classifyWithRules routes page generation to agent orchestration', () => {
const result = classifyWithRules({
text: '帮我做一个秋夜诗的 H5 页面',