Treat WeChat travel-guide requests as page.generate and re-sync Kimi before Goose fallback.
Memind CI / Test, build, and release guards (push) Failing after 4m15s

Fixes Tang-style「做攻略」messages missing the 页面 keyword from entering Cursor, and forces provider refresh before DeepSeek/Kimi fallback after Cursor failures.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-31 10:36:04 +08:00
parent fa20f735a5
commit 61ba554feb
3 changed files with 18 additions and 0 deletions
+5
View File
@@ -17,6 +17,10 @@ export const PAGE_GENERATE_NEWS_PATTERN =
export const PAGE_GENERATE_FORMAT_PATTERN =
/按照.{0,32}格式.{0,32}(?:页面|网页|html)/iu;
/** 用户口头说「做攻略/行程」但未显式说「页面」——服务号仍应走 page.generate + Cursor */
export const PAGE_GENERATE_GUIDE_PATTERN =
/(?:帮我.{0,12})?(?:做|写|生成|整理).{0,48}(?:游玩|旅行|旅游)?(?:攻略|指南|行程)(?!.*(?:不要|别|无需).*(?:页面|网页))/iu;
export const PAGE_GENERATE_NEGATION_PATTERN =
/(?:不要|无需|不用|别|不需要)\s*(?:再\s*)?(?:生成|创建|制作|做|写)\s*(?:任何|一个|新的)?\s*(?:html|页面|网页|page|文件)/iu;
@@ -44,6 +48,7 @@ export function isPageGenerateText(text) {
|| PAGE_GENERATE_AFTER_PAGE_PATTERN.test(normalized)
|| PAGE_GENERATE_NEWS_PATTERN.test(normalized)
|| PAGE_GENERATE_FORMAT_PATTERN.test(normalized)
|| PAGE_GENERATE_GUIDE_PATTERN.test(normalized)
|| isWechatPageRetryText(normalized)
|| isWechatPageEditText(normalized)
);