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.5.0,CHANGELOG 的 0.5.0 一节写上日期
chipfighter696e0999dc7d
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.jsonindex 948bdb6..1123ddf 100644--- a/.claude-plugin/plugin.json+++ b/.claude-plugin/plugin.json@@ -1,7 +1,7 @@{"name": "codex-attachment-manager","displayName": "Context Attachment Manager",- "version": "0.4.0",+ "version": "0.5.0","description": "Choose which images from a Claude Code session's history go out with the next message. Unchecked images become short placeholders; the session and the conversation stay the same.","author": {"name": "chipfighter"diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.ymlindex 1e508bb..435462f 100644--- a/.github/ISSUE_TEMPLATE/bug_report.yml+++ b/.github/ISSUE_TEMPLATE/bug_report.yml@@ -37,7 +37,7 @@ body:id: pluginattributes:label: 插件版本 / Plugin version- placeholder: "0.4.0"+ placeholder: "0.5.0"- type: textareaid: whatattributes:diff --git a/AGENTS.md b/AGENTS.mdindex f8e745f..6372c34 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -7,7 +7,7 @@ Context Attachment Manager(上下文素材管理器,2026-10-11 前叫 Codex- [docs/spec.md](docs/spec.md):目标、范围、硬约束和验收标准,是唯一的事实来源,描述当前版本。- [docs/design.md](docs/design.md):技术方案,讲现在是怎么实现的。- [docs/v0.4/plan.md](docs/v0.4/plan.md):Claude 桌面 Code 接入的 v0.4 变更方案;任务和验收分别见同目录的 `tasks.md`、`acceptance.md`。当前正式规格仍以 `docs/spec.md` 为准,未通过的迁移关卡不算已实现。-- [docs/v0.5/plan.md](docs/v0.5/plan.md):v0.5 方案,Claude Code 压缩后保留图片(开发中)。+- [docs/v0.5/plan.md](docs/v0.5/plan.md):v0.5 方案,Claude Code 压缩后保留图片(已发布 0.5.0)。- [docs/history/v0.1/](docs/history/v0.1/):v0.1 的开发记录(原方案、任务记录、各阶段报告、最初的构想),只作参考,不作依据。- [CHANGELOG.md](CHANGELOG.md):每个版本的更新记录,发布时就是 Release 说明。diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 01289fa..5a8cce8 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -2,7 +2,7 @@When a version is released, its section here becomes the GitHub release notes.-## [0.5.0] - Unreleased+## [0.5.0] - 2026-10-13Your choice survives compaction in Claude Code.diff --git a/docs/v0.5/plan.md b/docs/v0.5/plan.mdindex f789666..4a122c1 100644--- a/docs/v0.5/plan.md+++ b/docs/v0.5/plan.md@@ -1,6 +1,6 @@# v0.5 方案:Claude Code 压缩后保留图片-> 状态:用户 2026-10-12 确认;开发和实测完成(第 5 节),等用户批准合并和发布。规则由用户 2026-10-12 定(见第 2 节)。规格已写进 [spec.md](../spec.md)(标着 v0.5),实现见 [design.md](../design.md) 第 12 节。+> 状态:用户 2026-10-12 确认;开发和实测完成(第 5 节),2026-10-13 发布 v0.5.0。规则由用户 2026-10-12 定(见第 2 节)。规格已写进 [spec.md](../spec.md)(标着 v0.5),实现见 [design.md](../design.md) 第 12 节。## 1. 背景与目标@@ -67,7 +67,7 @@ Codex 不变:Codex 不会在压缩时丢图。3. **面板**:已完成,截图在验证机的 `local/v04/shots/`:`v050-panel-compacted.jpg`(手动,全部勾着,补回 3 张)、`v050-panel-auto.jpg`(自动选图,固定发送 1 张、占位 2 张,标出模型取回的图)。4. **发给模型的文字**:已完成,中英文实测见第 5 节 5–7 项;勾回后的自我纠正还留着(第 5 节 6 项)。5. **桌面实测**:已完成(第 5 节 6–10 项)。-6. **文档与发布**:spec、design、README 中英文、CHANGELOG(0.5.0 标着 Unreleased)已写好。合并、升版本号和发布等用户批准。+6. **文档与发布**:spec、design、README 中英文、CHANGELOG 已写好;2026-10-13 合并、发布 v0.5.0(用户同意直接发布)。## 7. 验收diff --git a/plugin/.codex-plugin/plugin.json b/plugin/.codex-plugin/plugin.jsonindex c2d05e7..3f6abb6 100644--- a/plugin/.codex-plugin/plugin.json+++ b/plugin/.codex-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "codex-attachment-manager",- "version": "0.4.0",+ "version": "0.5.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 312eed4..5de4bc6 100644--- a/plugin/src/panel.html+++ b/plugin/src/panel.html@@ -1324,7 +1324,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.4.0" }, appCapabilities: {} })+ request("ui/initialize", { protocolVersion: "2026-01-26", appInfo: { name: "codex-attachment-manager", version: "0.5.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 5942019..28783f7 100644--- a/plugin/src/plugin-server.ts+++ b/plugin/src/plugin-server.ts@@ -114,7 +114,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.4.0", icons: [icon("light", "#5d5d5d"), icon("dark", "#cdcdcd")] });+export const serverInfo = (lang: Lang) => ({ name: "codex-attachment-manager", title: say(lang, "server.title"), version: "0.5.0", icons: [icon("light", "#5d5d5d"), icon("dark", "#cdcdcd")] });export function readResource(uri: string): Json {if (uri !== PANEL_URI) throw new Error(`unknown resource ${uri}`);