From 6e0f6e12fcb2e4b9024ce27ea0cd1dfb24d7b1ca Mon Sep 17 00:00:00 2001 From: claire_wangjia Date: Thu, 9 Apr 2026 13:49:34 +0800 Subject: [PATCH] feat: hint Claude to read image files with Read tool When a WeChat image is received, the extracted content now includes a prompt telling Claude to use its Read tool to view the image file. Previously, only the file path was passed as plain text, so Claude had no cue to actually look at the image content. Co-Authored-By: Claude Opus 4.6 --- media.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/media.ts b/media.ts index 7fd2c7f..8294b3c 100644 --- a/media.ts +++ b/media.ts @@ -380,6 +380,9 @@ export async function extractContent(msg: { item_list?: MessageItem[] }): Promis video: "视频", }; parts.push(`[${labels[media.type]}] 已保存到 ${media.filePath}`); + if (media.type === "image") { + parts.push(`请用 Read 工具查看该图片文件来了解图片内容。`); + } log(`📎 ${labels[media.type]}: ${media.filePath}`); // For videos, list extracted frames so Claude can read them