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
fix(p4): 面板定时刷新和读图不再逐次写日志,只记勾选变动、模型调用和出错
chipfighter58254e359bf9
diff --git a/spike/src/plugin-server.ts b/spike/src/plugin-server.tsindex 2ba5a0a..1200675 100644--- a/spike/src/plugin-server.ts+++ b/spike/src/plugin-server.ts@@ -144,7 +144,8 @@ function main(): void {} else if (method === "tools/call") {try {const result = callTool(params.name, params.arguments ?? {}, params._meta);- log({ event: "tools/call", name: params.name, fromModel: fromModel(params._meta) });+ // The open panel reads its state every few seconds and loads each image once; only changes are worth a line.+ if (params.name === "cam_set_selection" || fromModel(params._meta)) log({ event: "tools/call", name: params.name, fromModel: fromModel(params._meta) });send({ id, result });} catch (error) {log({ event: "tools/call", name: params.name, fromModel: fromModel(params._meta), error: String(error) });