A local plugin for image-heavy chats in Codex, Claude Code and other agents: earlier images stop going out with every message, and the model fetches the one it needs by its ID, also after compaction.
TypeScript ai-agentsclaude-codeclaude-code-plugincodexcodex-plugincontext-managementdeveloper-toolsimage-generationmcpmultimodal
docs(readme): 加上做这个插件的起因
chipfighter1f730a1611ce
diff --git a/README.md b/README.mdindex 3f092ff..a32c427 100644--- a/README.md+++ b/README.md@@ -20,7 +20,11 @@<img src="docs/images/demo.gif" alt="Every image in the task is unchecked. Asked about v1's chat button, the model replies need IMG-002; the panel points to IMG-002, the user checks it, and the model answers from the image." width="100%"></p>-In a long Codex task, every image you or the model added is sent again with every request, so requests keep growing. Uncheck the images you no longer need: they are left out from the next message on, and the task and the conversation stay the same.+## Why I built this++I was iterating on image generation with GPT in Codex. After a dozen or so images, the task started failing: the connection kept dropping, and the retries every few minutes never went through. Digging into it, I found that Codex sends every image in the task's history again with every request, and each request had grown to about 44 MB. The only way out was a new task, which meant losing the conversation.++So I wanted to keep the long conversation going and decide, turn by turn, which images the model still gets. Uncheck the ones you no longer need: from the next message on they become short placeholders, and the task and the conversation stay the same.## Featuresdiff --git a/README_CN.md b/README_CN.mdindex 623592e..4cee27b 100644--- a/README_CN.md+++ b/README_CN.md@@ -20,7 +20,11 @@<img src="docs/images/demo.gif" alt="任务里的图全部取消勾选。问起 v1 的聊天按钮,模型回复 need IMG-002;面板指出 IMG-002,用户勾上它,模型看图答出颜色。" width="100%"></p>-在 Codex 的长任务里,你上传的、模型查看或生成的每张图,之后每次请求都会重新发给模型,请求越来越大。把不再需要的图取消勾选:从下一条消息起它们就不再发送,任务不换,对话连续。+## 为什么做这个++我在 Codex 里用 GPT 反复生图、改图。图攒到十几张以后,这个任务开始出问题:连接一直断,每隔几分钟自动重试一次,始终发不出去。查下去发现,Codex 每次请求都会把任务历史里的图全部重新发一遍,一次请求已经涨到约 44 MB。想去掉旧图只能新开任务,前面的对话就接不上了。++所以我想要的是:长对话照常继续,每一轮自己决定模型还能看到哪些图。不再需要的图取消勾选,从下一条消息起换成一小段占位文字,任务不换,对话连续。## 功能