pi-mono/apps/p2/plugins/coding-tools
Armin Ronacher 76c79d8bbe fix(p2): fit images to the model's limits before they enter the transcript
p2 sent uploaded images at full size, so a phone photo failed the request
with a provider 400 and every later one in the conversation.

pi-durable gains @earendil-works/pi-durable/images/fit, a kit that works
with any ImageProcessor and does not load Photon: fitImage/fitImages for a
host's input, and the fit-images extension, an afterTool hook that fits the
images of every tool result before it is committed. Images are fitted once,
before they are stored, so the transcript and prompt caches stay stable.
Every image is decoded, as in the coding agent; one that cannot be prepared
is left out with a note. imageLimits(model) is shared with read.

p2 creates one Photon processor per worker (WorkerParts.images) and uses it
for read, for attachments (resizes noted next to the file) and in the new
fit-images plugin.
2026-11-14 19:28:29 +01:00
..
activity.tsx feat(p2): show subagents' current step in the sidebar 2026-11-11 16:38:24 +01:00
cards.ts p2: code mode's calls and the tools' TUI cards come from their plugins 2026-11-07 00:28:50 +01:00
package.json feat: add apps/p2 (imported from pi-private at 7dadff697) 2026-11-03 13:39:06 +00:00
tui.ts p2: code mode's calls and the tools' TUI cards come from their plugins 2026-11-07 00:28:50 +01:00
web.tsx feat(p2): tools' chat look comes from the plugins that own them 2026-11-06 17:39:08 +01:00
worker.ts fix(p2): fit images to the model's limits before they enter the transcript 2026-11-14 19:28:29 +01:00