fix(wechat): isolate stale images and page links
Memind CI / Test, build, and release guards (pull_request) Successful in 2m36s

This commit is contained in:
john
2026-07-22 13:30:44 +08:00
parent aea3c1e83e
commit db225b784e
11 changed files with 416 additions and 37 deletions
+4
View File
@@ -102,6 +102,10 @@ export function scrubUserMessageImageAttachments(message) {
let contentChanged = false;
const content = Array.isArray(message.content)
? message.content.map((item) => {
if (item?.type === 'image_url') {
contentChanged = true;
return null;
}
if (item?.type !== 'text' || typeof item.text !== 'string') return item;
const nextText = stripAgentImageText(item.text);
if (nextText === item.text) return item;