fix: treat decorated HTML page requests as WeChat immediate context
Memind CI / Test, build, and release guards (push) Successful in 4m32s

Match phrases like「生成一个精美的 HTML 页面」so poem follow-ups skip fresh-thumbnail forcing and reuse the same session poem context.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-07-28 16:27:28 +08:00
parent 491a62aed6
commit 6307f974cf
2 changed files with 20 additions and 1 deletions
+3
View File
@@ -341,6 +341,9 @@ test('WeChat immediate-context page guard does not match complete page requests'
const pageIntent = { kind: 'page.generate' };
assert.equal(isWechatImmediateContextFollowup(pageIntent, '帮我做成页面吧'), true);
assert.equal(isWechatImmediateContextFollowup(pageIntent, '把刚才的诗做成页面'), true);
assert.equal(isWechatImmediateContextFollowup(pageIntent, '生成一个精美的 HTML 页面'), true);
assert.equal(isWechatImmediateContextFollowup(pageIntent, '生成一个HTML页面'), true);
assert.equal(isWechatImmediateContextFollowup(pageIntent, '生成一个上海旅游攻略页面'), false);
assert.equal(isWechatImmediateContextFollowup(pageIntent, '帮我做一个上海旅游页面'), false);
assert.equal(
isWechatImmediateContextFollowup({ kind: 'chat.general' }, '帮我做成页面吧'),