fix(wechat): isolate stale images and page links
Memind CI / Test, build, and release guards (pull_request) Successful in 2m36s
Memind CI / Test, build, and release guards (pull_request) Successful in 2m36s
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user