fix(wechat): guard ambiguous memory recall and scheduled task execution

Skip memory injection for short filler messages, demote page-workflow memory
pollution, keep scheduled automation off page.generate, and fail scheduled
tasks that only return clarification instead of deliverables.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-01 22:49:52 +08:00
parent dcf83e9b6f
commit 26fe5912a3
9 changed files with 222 additions and 0 deletions
+9
View File
@@ -33,6 +33,15 @@ test('classifyWechatIntent detects page.generate', () => {
assert.equal(isPageGenerateIntent({ msgType: 'text', agentText: intent.topic }), true);
});
test('classifyWechatIntent keeps scheduled automation on chat.general', () => {
const intent = classifyWechatIntent({
msgType: 'text',
agentText: '我想创建一个定时执行任务,今晚 21:45 分执行做新闻页面',
});
assert.equal(intent.kind, 'chat.general');
assert.equal(isPageGenerateIntent({ msgType: 'text', agentText: intent.text }), false);
});
test('classifyWechatIntent detects session.reset', () => {
assert.equal(classifyWechatIntent({ msgType: 'text', agentText: '换话题' }).kind, 'session.reset');
assert.equal(classifyWechatIntent({ msgType: 'text', agentText: '换新会话' }).kind, 'session.reset');