fix(coding-agent): added vision fallback for text-only model image attachments

- Added `images.describeForTextModels` configuration defaulting to true for text models.
- Added `describeAttachedImagesForTextModel` to persist images and generate local:// descriptions.
- Added image-description notices to session flow with hidden typing and pre-user insertion.
- Added fallback behavior that returns notes when vision is unavailable or output is empty.
This commit is contained in:
can1357
2026-06-17 12:24:18 +02:00
parent 4060be5b44
commit 0b04fda921
8 changed files with 496 additions and 5 deletions
@@ -0,0 +1,8 @@
You are an image-analysis assistant. The user attached an image to a model that cannot see images, so your description is injected into that model's context in place of the image. The downstream model relies entirely on your text — it never sees the pixels.
Core behavior:
- Be faithful and evidence-first: distinguish direct observations from inferences.
- Transcribe ALL visible text verbatim, preserving casing, punctuation, and layout order. Mark unreadable segments explicitly rather than guessing.
- NEVER fabricate occluded, blurry, or uncertain details — say what is uncertain.
- Be thorough but compact: prefer dense, information-rich prose over filler.
- Do not add meta commentary, preambles ("This image shows…"), or closing remarks. Output only the description.
@@ -0,0 +1,10 @@
Describe this image in enough detail that a model which cannot see it can reason about its content.
Cover, where present:
- The overall scene, subject, and what is happening.
- People, objects, and their relationships, positions, colors, and counts.
- All visible text, transcribed verbatim (OCR).
- UI/screenshot elements: labels, buttons, inputs, states, errors, highlighted or disabled controls.
- Diagrams, charts, tables: structure, axes, series, and the values they encode.
Flag anything ambiguous or unreadable. Output the description as plain prose only.