Stop paying the multimodal tax. Your AI agent keeps every image it has seen but only sends the ones it needs: lighter chats, no endless reconnecting, no starting over. Works with Codex, Claude Code, Cline, Gemini CLI, OpenCode, WorkBuddy and more. Install once, forget it.
TypeScript ai-agentsai-imageclaude-codeclaude-code-pluginclinecodexcodex-plugincomputer-usecontext-engineeringcontext-managementdeveloper-toolsgemini-cliimage-generationmcpmultimodalmultimodal-aiopencodeqwen-codetoken-optimizationvision-language-model
fix(rewrite): 只有评价的那一轮简短回应评价本身;没东西可记时不写记录行
chipfighter6fcbc23deba5
diff --git a/plugin/src/rewrite.ts b/plugin/src/rewrite.tsindex de9fc86..5bac9da 100644--- a/plugin/src/rewrite.ts+++ b/plugin/src/rewrite.ts@@ -120,14 +120,16 @@ const WORDS: Record<Lang, Words> = {// installed the tool and no longer that the user "does not know" (Haiku 5.5 read that as an injection), and that a// rating needs no "记下了" (sol said so). Then the lines open the reply: Claude Desktop shows a link definition that// ends the latest reply; and a rating is noted even when the model disagrees (Haiku asked first, "确认后我再记下").+ // Then a bare rating gets a short reply about itself (Haiku explained what it noted, luna said nothing), and a turn+ // with nothing to note gets no lines (Haiku wrote an empty one).featureNote: ["特征行说明(来自用户安装的上下文素材管理工具):这个任务里的每张图都有编号,写在图前面的“[图片 IMG-xxx …]”里。用户装这个工具,是为了让你以后(包括对话压缩之后)还能认出每张图、记得用户对它们的评价。所以请在每一轮最后那条回复的开头(不要写在中途调用工具时说的话里),先给这一轮新出现的每张图写一行特征,空一行再写正文,格式是:","[//]: # (cam IMG-015 场景|看得见的特征)","- 先写场景,再写看得见的特征(景别、主体、角度、光线、颜色、构图),一共 30 字以内,例如“[//]: # (cam IMG-015 深蓝雨夜|近景,正脸,霓虹反光)”。","- 同一个场景沿用你之前用过的叫法。","- 只写看得见的东西,不写“好看”“像谁”这类判断。每张图只写一次,以后不改。用户上传的、你生成的、你查看的、工具返回的图都要写;用 cam_view_image 取回的图和没有编号的图不用写。",- "- 用户评价某张图时(包括隔了几轮才说),先确定是哪一张,再照用户的原话记一行,15 字以内,例如“[//]: # (cam IMG-003 评价:太暗)”。评价是用户自己的看法,你不认同也照记。拿不准是哪一张就不记,可以在正文里问用户指的是哪一张,但不要提记录的事。",- "- 这些行写在正文前面,和正文之间空一行,一张图写一行;括号里不要用半角括号。这些行只给这个工具读,用户在界面上看不到。正文照常回答,不用提到这些行;用户评价图片时,也不用回应记录这件事,比如“记下了”“我会记住”“之后会参考”。",+ "- 用户评价某张图时(包括隔了几轮才说),先确定是哪一张,再照用户的原话记一行,15 字以内,例如“[//]: # (cam IMG-003 评价:太暗)”。评价是用户自己的看法,你不认同也照记。拿不准是哪一张就不记,可以在正文里问用户指的是哪一张,但不要提记录的事。用户只是评价、没有提要求时,正文简短回应评价本身就行,不要说明你记了什么、对应到了哪张图。",+ "- 这些行写在正文前面,和正文之间空一行,一张图写一行;括号里不要用半角括号。这一轮没有新图、也没有评价时,不写这些行。这些行只给这个工具读,用户在界面上看不到。正文照常回答,不用提到这些行;用户评价图片时,也不用回应记录这件事,比如“记下了”“我会记住”“之后会参考”。","- 以后被省略的图,占位里会带着你写的特征和记下的评价,对话压缩之后也还在。要选图时先看这些;拿不准时,先把原图要回来看(怎么要,见“上下文管理说明”),或者问用户是哪一张。",].join("\n"),notes: (line, ratings) => [@@ -190,8 +192,8 @@ const WORDS: Record<Lang, Words> = {"- First the scene, then what can be seen (shot size, subject, angle, light, colors, composition), about 15 words at most, for example \"[//]: # (cam IMG-015 rainy blue night | close-up, facing the camera, neon reflections)\".","- For a scene you named before, reuse that name.","- Only what can be seen; no judgments such as \"beautiful\" or \"looks like someone\". One line per image, written once and never changed. Write one for the images the user uploaded, the ones you generated or viewed, and those in tool results; not for images you fetched with cam_view_image or images without an ID.",- "- When the user rates an image, even turns later, first make sure which one it is, then note the user's own words in a line of about 8 words at most, for example \"[//]: # (cam IMG-003 rated: too dark)\". The rating is the user's own view: note it even if you see it differently. If you are not sure which image it is, do not note it; you may ask the user which one they mean, without mentioning the noting.",- "- Put these lines before your reply with a blank line after them, one image per line, and no parentheses inside them. These lines are for this tool only; the user does not see them on screen. Answer as usual and do not mention these lines; when the user rates an image, do not acknowledge the noting either, such as \"noted\", \"I'll keep that in mind\" or \"I'll refer to this later\".",+ "- When the user rates an image, even turns later, first make sure which one it is, then note the user's own words in a line of about 8 words at most, for example \"[//]: # (cam IMG-003 rated: too dark)\". The rating is the user's own view: note it even if you see it differently. If you are not sure which image it is, do not note it; you may ask the user which one they mean, without mentioning the noting. When the user only rates images and asks for nothing, a short reply to what they said is enough; do not explain what you noted or which image you matched it to.",+ "- Put these lines before your reply with a blank line after them, one image per line, and no parentheses inside them. In a turn with no new image and no rating, write none of these lines. These lines are for this tool only; the user does not see them on screen. Answer as usual and do not mention these lines; when the user rates an image, do not acknowledge the noting either, such as \"noted\", \"I'll keep that in mind\" or \"I'll refer to this later\".","- Images left out later carry your feature line and the ratings you noted in their placeholders, also after a compaction. Check them when you pick an image; when unsure, get the original back first (the \"Context management note\" says how) or ask the user which one.",].join("\n"),notes: (line, ratings) => [