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
+2
View File
@@ -4,6 +4,7 @@ import {
isWechatPageEditText,
isWechatPageRetryText,
} from './page-continuation.mjs';
import { shouldUseScheduledTaskAutomation } from '../../scheduled-task-intent.mjs';
export const PAGE_GENERATE_PATTERN =
/(?:生成|创建|做|写|帮我.*(?:生成|创建|做|写)).*(?:html|页面|网页|page|文件)/iu;
@@ -29,6 +30,7 @@ export const CONNECTIVITY_TEST_PATTERN = /^(测试\s*\d*|test\s*\d*)[!!。.\s]
export function isPageGenerateText(text) {
const normalized = String(text ?? '').trim();
if (!normalized) return false;
if (shouldUseScheduledTaskAutomation(normalized)) return false;
if (PAGE_GENERATE_NEGATION_PATTERN.test(normalized)) return false;
return (
PAGE_GENERATE_PATTERN.test(normalized)