Skip to content

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.

feat(claude): 面板提示上一次请求去掉了几段对不上的思考记录

chipfighterecf2b32c625b
diff --git a/plugin/src/panel-state.ts b/plugin/src/panel-state.ts
index 88e52af..6a3297f 100644
--- a/plugin/src/panel-state.ts
+++ b/plugin/src/panel-state.ts
@@ -38,8 +38,10 @@ export type SendInfo = {
// What the engine sent for that request.
last: { at: string; bytesBefore: number; bytesAfter: number; replaced: number; skipped: boolean } | null;
// v0.4: "fallback": Anthropic refused the rewritten history under its thinking, so the engine sent the original
- // (claude-rewrite.ts): what the user unchecked went out that time.
- notice: { kind: "skipped"; at: string; reason: SkipReason } | { kind: "websocket"; at: string } | { kind: "fallback"; at: string } | null;
+ // (claude-rewrite.ts): what the user unchecked went out that time. "thinking": the account checks thinking, and the
+ // engine left out `count` thinking records that no longer fit the history as sent (claude-thinking.ts); the model may
+ // think again.
+ notice: { kind: "skipped"; at: string; reason: SkipReason } | { kind: "websocket"; at: string } | { kind: "fallback"; at: string } | { kind: "thinking"; at: string; count: number } | null;
};
// started: the thread has a rollout. A panel opened on a new chat before its first message may be tied to a thread
// Codex prepared and then replaced (v0.1-8); that one never gets a rollout.
@@ -73,6 +75,7 @@ export function sendInfo(stats: RequestStats | null): SendInfo {
else if (latest?.transport === "http" && rewrite?.skipped) {
notice = { kind: "skipped", at: http!.at, reason: SKIP_REASONS.find(([pattern]) => pattern.test(rewrite.skipped))?.[1] ?? "other" };
} else if (latest?.transport === "http" && rewrite?.fallback) notice = { kind: "fallback", at: http!.at };
+ else if (latest?.transport === "http" && rewrite?.thinking?.left > 0) notice = { kind: "thinking", at: http!.at, count: rewrite.thinking.left };
return {
baseline: http && bytes !== null && http.imageSizes ? { at: http.at, bytes } : null,
last: http && bytes !== null ? { at: http.at, bytesBefore: bytes, bytesAfter: rewrite?.fallback ? bytes : rewrite?.decodedAfter ?? bytes, replaced: rewrite?.fallback ? 0 : rewrite?.replaced?.length ?? 0, skipped: !!rewrite?.skipped || !!rewrite?.fallback } : null,
diff --git a/plugin/src/panel.html b/plugin/src/panel.html
index 0299fa8..a864c67 100644
--- a/plugin/src/panel.html
+++ b/plugin/src/panel.html
@@ -33,7 +33,8 @@
(sent every turn; kept apart from the manual ticks), the others are left out unless the model fetches them, the bar
lists what the model fetched in the latest turn instead of what it asked for, and those rows say so.
v0.4: under Claude Code, when Anthropic refused the rewritten history under its thinking and the engine sent the
- original request, the panel says so as for any request it could not rewrite.
+ original request, the panel says so as for any request it could not rewrite. On an account that checks thinking, it
+ also says how many thinking records the last request left out to keep the selection (user 2026-10-11).
-->
<style>
/* Fallbacks follow Codex's own widget palette; inside Codex its theme variables (MCP Apps host styles) win. */
@@ -354,6 +355,7 @@
"notice.engineDown": "代理没有在运行,取消勾选暂时不会生效。关掉 Codex 再打开,一般就能恢复。",
"notice.skipped": "上一次请求({time})没能按勾选替换,图片原样发给了模型。原因:{reason}。",
"notice.websocket": "取消勾选时这一轮对话还在进行,这一轮剩下的请求仍带着原图;从下一条消息起生效。",
+ "notice.thinking": "这个账号会校验思考记录:上一次请求({time})去掉了 {count} 段和现在的勾选对不上的思考记录,模型可能要重新思考,多用一些 token。",
"reason.undecodable": "请求内容无法解压",
"reason.unparsable": "请求内容无法解析",
"reason.format": "请求的格式和预期不同",
@@ -464,6 +466,8 @@
"notice.engineDown": "The proxy is not running, so unchecking has no effect for now. Closing and reopening Codex usually brings it back.",
"notice.skipped": "The last request ({time}) could not be rewritten as selected; the images went to the model as they were. Reason: {reason}.",
"notice.websocket": "This turn was still running when you unchecked images, so its remaining requests still carry the originals; the change applies from the next message.",
+ "notice.thinking": "This account checks thinking records: the last request ({time}) left out {count} thinking records that no longer match the selection, so the model may think again and use more tokens.",
+ "notice.thinking_one": "This account checks thinking records: the last request ({time}) left out {count} thinking record that no longer matches the selection, so the model may think again and use more tokens.",
"reason.undecodable": "the request could not be decompressed",
"reason.unparsable": "the request could not be parsed",
"reason.format": "the request is not in the expected format",
@@ -1213,6 +1217,7 @@
const sendNotice = S.data?.send?.notice;
if (sendNotice?.kind === "skipped") nodes.push(notice("error", t("notice.skipped", { time: timeOf(sendNotice.at), reason: t(MESSAGES[lang][`reason.${sendNotice.reason}`] ? `reason.${sendNotice.reason}` : "reason.other") })));
if (sendNotice?.kind === "fallback") nodes.push(notice("error", t("notice.skipped", { time: timeOf(sendNotice.at), reason: t("reason.thinking") })));
+ if (sendNotice?.kind === "thinking") nodes.push(notice("info", t("notice.thinking", { time: timeOf(sendNotice.at), count: sendNotice.count })));
if (sendNotice?.kind === "websocket") nodes.push(notice("warn", t("notice.websocket")));
const list = images();
if (S.data && !list.length) nodes.push(emptyState);
diff --git a/spike/src/panel-state.test.ts b/spike/src/panel-state.test.ts
index 9794405..932328d 100644
--- a/spike/src/panel-state.test.ts
+++ b/spike/src/panel-state.test.ts
@@ -117,6 +117,17 @@ test("the panel is told when the engine could not rewrite, or a WebSocket turn k
assert.equal(sendInfo({ latest: http, lastHttp: http }).baseline, null, "a request without image sizes is no baseline");
});
+test("v0.4: the panel is told when the engine left out thinking that no longer fits, or had to send the original", () => {
+ const sent = { at: "t4", transport: "http", decodedBytes: 900, rewrite: { replaced: [{ id: "IMG-001" }], thinking: { kept: 1, left: 2 }, decodedAfter: 700 } };
+ assert.deepEqual(sendInfo({ latest: sent, lastHttp: sent }).notice, { kind: "thinking", at: "t4", count: 2 });
+ assert.deepEqual(sendInfo({ latest: sent, lastHttp: sent }).last, { at: "t4", bytesBefore: 900, bytesAfter: 700, replaced: 1, skipped: false });
+ // All of it fitted: nothing to tell.
+ const fitted = { ...sent, rewrite: { ...sent.rewrite, thinking: { kept: 3, left: 0 } } };
+ assert.equal(sendInfo({ latest: fitted, lastHttp: fitted }).notice, null);
+ const original = { ...sent, rewrite: { replaced: [{ id: "IMG-001" }], fallback: "thinking-signature" } };
+ assert.deepEqual(sendInfo({ latest: original, lastHttp: original }).notice, { kind: "fallback", at: "t4" });
+});
+
test("check and uncheck are kept per thread and validated", () => {
const options = sampleSessions();
let state = applySelection(THREAD, { uncheck: ["IMG-001", "IMG-003"] }, options);