fix: broaden WeChat session page continuation phrasing
Memind CI / Test, build, and release guards (push) Successful in 2m37s

Recognize retry, HTML page, page edits, and poem content edits as session continuations so delivery skips fresh-thumbnail forcing and retains agent context for multi-turn page work.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-07-28 16:54:42 +08:00
parent 6307f974cf
commit 7eedda092d
9 changed files with 397 additions and 42 deletions
+10 -1
View File
@@ -1,5 +1,10 @@
/** WeChat channel intent patterns — not shared with H5 chat-skills routing. */
import {
isWechatPageEditText,
isWechatPageRetryText,
} from './page-continuation.mjs';
export const PAGE_GENERATE_PATTERN =
/(?:生成|创建|做|写|帮我.*(?:生成|创建|做|写)).*(?:html|页面|网页|page|文件)/iu;
@@ -25,7 +30,11 @@ export function isPageGenerateText(text) {
const normalized = String(text ?? '').trim();
if (!normalized) return false;
if (PAGE_GENERATE_NEGATION_PATTERN.test(normalized)) return false;
return PAGE_GENERATE_PATTERN.test(normalized);
return (
PAGE_GENERATE_PATTERN.test(normalized)
|| isWechatPageRetryText(normalized)
|| isWechatPageEditText(normalized)
);
}
export function isTopicResetText(text) {