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:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user