Repository navigation
feat: describe CLI image attachments with a Gemma vision sidecar - #206
Conversation
QualityMax ReviewVerdict: COMMENT · Confidence: evidence-backed scan Re-review: Open the QualityMax check and select Re-review after it completes. Files eligible: 14 · Files reviewed: 14 · Files with findings: 0 · Findings: 0 · Inline cards: 0 Priority findings
Review gates
Important files
Change diagram — Flowflowchart TD
Start[User Prompt with Images] --> CheckMode{Vision Sidecar Mode?}
CheckMode -- Off --> Skip[Use Primary Model Directly]
CheckMode -- Always --> CallSidecar[Call Cerebras Gemma 4]
CheckMode -- Auto --> CheckModel{Is Model Text-Only?}
CheckModel -- Yes --> CallSidecar
CheckModel -- No --> Skip
CallSidecar --> Describe[Get Description]
Describe --> Augment[Inject Description into Prompt]
Augment --> Send[Send to Primary Model]
Review lifecycleUse the inline cards to inspect evidence and suggested remediation. Re-run the QualityMax review after pushing a fix; unchanged cards are identified by their stable finding marker. Dismiss with a reason through the existing QualityMax/GitHub review feedback flow. 1 prior card(s) are stale/resolved on this head. Thread reconciliation resolved 0/0 superseded QualityMax thread(s). Proof legend: GROUNDED deterministic scanner evidence · MODEL-ONLY advisory model judgment · MODEL-REVIEWED patch model judgment, not reproduction. QualityMax project results are available in the configured project. Receipt · commit |
|
| Gate | Result |
|---|---|
| 🔍 AI diff review | ✅ Clean · gemini-3.1-flash-lite · completed · 12 eligible / 12 reviewed · gemini-3.1-flash-lite |
| 🔍 SAST | completed · 14 eligible / 14 reviewed · qwen3.7-plus |
| 🔍 Canonical PR review delivery | completed · 0 eligible / 0 reviewed · exact-head review #5557511330 and overview #5728556476 confirmed |
| 🧪 Repo Tests | ✅ 1551/1551 passed (go) |
| 🤖 AI Tests |
Powered by QualityMax — AI-Powered Test Automation
…event injection and exhaustion
cfda63d to
849c5da
Compare
67ffe06 to
2650b2b
Compare
|
|
👋 Thanks for the vision sidecar! A review turned up 4 bugs plus the lint errors that fail CI. The fixes are in #213, which targets
Once #213 is merged in, please rebase on |
- Esc now cancels the Gemma sidecar call: it runs on a cancellable context wired into the turn's cancel hook, and a cancelled sidecar skips the CLI turn instead of starting it after the timeout. - Escape every '<' in the Gemma description so case/whitespace variants of </image-descriptions> in screenshot text can't close the block. - Build the sidecar header from the same usable-image filter as the Gemma request, so [n] numbering matches the named files. - /screenshot and /paste images fall back to the embedded multimodal backend when the sidecar fails (or fail with a clear error if none is configured) instead of being silently dropped. - Check Decode/Encode errors in the sidecar test server (errcheck). Adds regression tests for tag breakout, cancellation and the header mismatch.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
CLI backends receive text only, so images need a description before a text-only coding model can use them. Add a Gemma 4 sidecar that sends attached images to Cerebras and passes the description to the selected CLI.
The default
automode applies to OpenCode with Z.AI coding-plan models;alwaysenables the sidecar for every CLI backend, andoffdisables it. A Cerebras key is required. Configure it with/set vision_sidecar auto|always|offorqmax-code config set vision_sidecar off.Screenshots and clipboard images fall back to the configured built-in multimodal backend when the sidecar fails, or stop with an explicit image-not-sent message. Dragged image paths retain the text-only CLI fallback. Cancellation skips the turn. Image descriptions escape markup delimiters.
Merged current main (including #214), resolved the changelog conflict while preserving both features, and removed an unreachable fallback. Added regression coverage for screenshot/paste routing, fallback, cancellation, config persistence/validation, unknown provider catalogues, invalid attachments, rejected/empty provider responses, request contents, Unicode truncation, and disabled-sidecar routing.
Validation:
go vet ./..., golangci-lint, and release-style build pass.QualityMax follow-up: the REPL tests use
replEnv, which restoreshttp.DefaultTransportwitht.Cleanup; these tests do not run in parallel. The reported missing cleanup is already present in the shared helper.