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
chore(release): 版本号改为 0.2.0,CHANGELOG 加 0.2.0 一节
chipfighter345e311536eb
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.ymlindex 2ba9a7e..6ff9c7c 100644--- a/.github/ISSUE_TEMPLATE/bug_report.yml+++ b/.github/ISSUE_TEMPLATE/bug_report.yml@@ -28,7 +28,7 @@ body:id: pluginattributes:label: 插件版本 / Plugin version- placeholder: "0.1.0"+ placeholder: "0.2.0"- type: textareaid: whatattributes:diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 6b98aa7..3f0de0c 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -2,6 +2,22 @@When a version is released, its section here becomes the GitHub release notes.+## [0.2.0] - 2026-09-29++Filter the panel's list by where each image came from.++### Features++- A filter button next to refresh unfolds the task's sources, each with its count: uploads, PDF pages, web page screenshots, and images the model viewed, got from a tool or generated. Pick one or several to show only their images; *All* shows everything again. The button shows only when a task has images from two sources or more, and it keeps a dot while a filter is on and the bar is folded away.+- The screenshots Codex attaches when you comment on a PDF page or a web page are told apart from your uploads. A PDF page shows its page number and the PDF's name.+- Filtering changes what you see, never what is sent: the request estimate still counts every image, a turn's checkbox covers only the images shown, and jumping to an image the model asked for shows it even when the filter hides it.+- The text sent to the model is the same as in 0.1.0.++### Notes++- Only images are managed, because Codex sends the model text and images only. PDFs and videos reach the model as text or images the model makes of them, and those images are listed like any other. The models in Codex don't accept audio yet, so Codex replaces audio with a short note before sending; audio support waits for a model that accepts it.+- Platforms are the same as in 0.1.0: tested on Windows with the Codex desktop app 26.924; CI checks that the plugin installs and starts on macOS and Linux.+## [0.1.0] - 2026-09-28The first public release (MVP): in the same Codex task, decide turn by turn which past images go to the model with your next message.diff --git a/docs/spec.md b/docs/spec.mdindex f32018d..93a7004 100644--- a/docs/spec.md+++ b/docs/spec.md@@ -1,6 +1,6 @@# 规格:Codex Attachment Manager(上下文素材管理器)-> 本文件是目标、范围、约束和验收标准的唯一事实来源(2026-09-24 经用户、Claude、Codex 三方确认),描述当前版本 v0.1.0 和下一版 v0.2.0,以后随版本更新。+> 本文件是目标、范围、约束和验收标准的唯一事实来源(2026-09-24 经用户、Claude、Codex 三方确认),描述当前版本 v0.2.0,以后随版本更新。> 技术方案见 [design.md](design.md)。v0.1 的开发记录(原方案、任务记录、各阶段报告、最初的构想)归档在 [history/v0.1/](history/v0.1/),只作参考。## 1. 目标diff --git a/plugin/.codex-plugin/plugin.json b/plugin/.codex-plugin/plugin.jsonindex e5e073a..31eb491 100644--- a/plugin/.codex-plugin/plugin.json+++ b/plugin/.codex-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "codex-attachment-manager",- "version": "0.1.0",+ "version": "0.2.0","description": "Choose which images from a Codex task's history go out with the next message. Unchecked images become short placeholders; the task and the conversation stay the same.","author": {"name": "chipfighter"diff --git a/plugin/src/panel.html b/plugin/src/panel.htmlindex 7b9d889..44f2170 100644--- a/plugin/src/panel.html+++ b/plugin/src/panel.html@@ -1200,7 +1200,7 @@// ---- start: handshake, then Codex sends its own cam_panel result; poll so new images show up ----if (window.matchMedia?.("(prefers-color-scheme: dark)").matches) document.documentElement.dataset.theme = "dark";applyLanguage();- request("ui/initialize", { protocolVersion: "2026-01-26", appInfo: { name: "codex-attachment-manager", version: "0.1.0" }, appCapabilities: {} })+ request("ui/initialize", { protocolVersion: "2026-01-26", appInfo: { name: "codex-attachment-manager", version: "0.2.0" }, appCapabilities: {} }).then((init) => { applyHost(init?.hostContext); post({ method: "ui/notifications/initialized", params: {} }); reportFrame(); }).catch(() => {}).finally(() => setTimeout(() => { if (!S.data) refresh(); }, 1200));diff --git a/plugin/src/plugin-server.ts b/plugin/src/plugin-server.tsindex 97c162f..6dacf99 100644--- a/plugin/src/plugin-server.ts+++ b/plugin/src/plugin-server.ts@@ -90,7 +90,7 @@ const icon = (theme: "light" | "dark", color: string) => ({src: `data:image/svg+xml;base64,${Buffer.from(ICON_SVG.replace("currentColor", color)).toString("base64")}`,mimeType: "image/svg+xml", sizes: ["any"], theme,});-export const serverInfo = (lang: Lang) => ({ name: "codex-attachment-manager", title: say(lang, "server.title"), version: "0.1.0", icons: [icon("light", "#5d5d5d"), icon("dark", "#cdcdcd")] });+export const serverInfo = (lang: Lang) => ({ name: "codex-attachment-manager", title: say(lang, "server.title"), version: "0.2.0", icons: [icon("light", "#5d5d5d"), icon("dark", "#cdcdcd")] });export function readResource(uri: string): Json {if (uri !== PANEL_URI) throw new Error(`unknown resource ${uri}`);