fix(wechat): recognize news page intents and harden scheduled task delivery
Memind CI / Test, build, and release guards (push) Failing after 4s

Expand page.generate rules for post-page verbs and link-missing retries,
recover HTML artifacts when shadow LLM agrees, and stop marking scheduled
tasks failed when WeChat notification hits rate limits.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-02 06:46:33 +08:00
parent 26fe5912a3
commit b9f5720ce0
6 changed files with 114 additions and 4 deletions
+12
View File
@@ -9,6 +9,15 @@ import { shouldUseScheduledTaskAutomation } from '../../scheduled-task-intent.mj
export const PAGE_GENERATE_PATTERN =
/(?:生成|创建|做|写|帮我.*(?:生成|创建|做|写)).*(?:html|页面|网页|page|文件)/iu;
export const PAGE_GENERATE_AFTER_PAGE_PATTERN =
/(?:html|页面|网页|page|文件).*(?:做出来|做好|做完|弄出来|生成好|制作好|发我|给我)/iu;
export const PAGE_GENERATE_NEWS_PATTERN =
/(?:新闻|早报).{0,16}(?:页面|网页|html)/iu;
export const PAGE_GENERATE_FORMAT_PATTERN =
/按照.{0,32}格式.{0,32}(?:页面|网页|html)/iu;
export const PAGE_GENERATE_NEGATION_PATTERN =
/(?:不要|无需|不用|别|不需要)\s*(?:再\s*)?(?:生成|创建|制作|做|写)\s*(?:任何|一个|新的)?\s*(?:html|页面|网页|page|文件)/iu;
@@ -34,6 +43,9 @@ export function isPageGenerateText(text) {
if (PAGE_GENERATE_NEGATION_PATTERN.test(normalized)) return false;
return (
PAGE_GENERATE_PATTERN.test(normalized)
|| PAGE_GENERATE_AFTER_PAGE_PATTERN.test(normalized)
|| PAGE_GENERATE_NEWS_PATTERN.test(normalized)
|| PAGE_GENERATE_FORMAT_PATTERN.test(normalized)
|| isWechatPageRetryText(normalized)
|| isWechatPageEditText(normalized)
);