Skip to content

feat: support multimodal image input - #9

Merged
guima-why merged 1 commit into
mainfrom
feat_multi_modal
May 18, 2026
Merged

feat: support multimodal image input#9
guima-why merged 1 commit into
mainfrom
feat_multi_modal

Conversation

@ruanzhengxin-zhuxing

Copy link
Copy Markdown
Collaborator
  • Add image paste support in the REPL: Ctrl+V inserts [Image #N] placeholders that are assembled into a multimodal message at submit time, with text and multiple images interleaved by position.
  • Add per-model multimodal capability resolution (settings.yml override → built-in registry → openapi_compatible auto-detect via /v1/models architecture.input_modalities → default off), with a disk cache at ~/.iac-code/.multimodal-cache.yml.
  • Add image utilities: clipboard readers (macOS osascript, Wayland wl-paste, X11 xclip, Windows PowerShell) with 2s timeouts and Wayland→X11 fallback, format detection, Pillow-based resizing to the 5 MB Base64 budget, session-scoped cache under ~/.iac-code/image-cache/<session>/, and background cleanup of old session directories.
  • Wire image blocks into Anthropic and OpenAI provider message serialization; extend agent message types accordingly.
  • Show a capability-gated hint when the active model does not support images so placeholders are not inserted.
  • Update README with usage, supported clipboard sources, settings.yml schema, and auto-detect limitations; refresh translations.
  • Add tests covering clipboard adapters, image processing/resizing, capability detection, provider image-block serialization, REPL bracketed-paste handling, and the capability gate.

@ruanzhengxin-zhuxing
ruanzhengxin-zhuxing force-pushed the feat_multi_modal branch 2 times, most recently from 0f49f00 to f13764e Compare May 18, 2026 05:56
Comment thread src/iac_code/services/capabilities/auto_detect.py Outdated
Comment thread src/iac_code/utils/image/processor.py Outdated
Comment thread src/iac_code/utils/background_housekeeping.py Outdated
Comment thread src/iac_code/utils/image/clipboard.py Outdated
Comment thread src/iac_code/services/capabilities/auto_detect.py
Comment thread src/iac_code/ui/core/prompt_input.py Outdated
Comment thread src/iac_code/ui/banner.py
Comment thread src/iac_code/ui/banner.py Outdated
Comment thread src/iac_code/ui/repl.py Outdated
Comment thread src/iac_code/services/capabilities/multimodal.py Outdated
@ruanzhengxin-zhuxing
ruanzhengxin-zhuxing force-pushed the feat_multi_modal branch 5 times, most recently from 04528e8 to 72611f5 Compare May 18, 2026 08:58
@binxin-wbx

Copy link
Copy Markdown
Collaborator

LGTM

- Add image paste support in the REPL: Ctrl+V inserts `[Image #N]`
  placeholders that are assembled into a multimodal message at submit
  time, with text and multiple images interleaved by position.
- Add per-model multimodal capability resolution (settings.yml override
  → built-in registry → openapi_compatible auto-detect via
  `/v1/models` `architecture.input_modalities` → default off), with a
  disk cache at `~/.iac-code/.multimodal-cache.yml`.
- Add image utilities: clipboard readers (macOS osascript, Wayland
  `wl-paste`, X11 `xclip`, Windows PowerShell) with 2s timeouts and
  Wayland→X11 fallback, format detection, Pillow-based resizing to the
  5 MB Base64 budget, session-scoped cache under
  `~/.iac-code/image-cache/<session>/`, and background cleanup of old
  session directories.
- Wire image blocks into Anthropic and OpenAI provider message
  serialization; extend agent message types accordingly.
- Show a capability-gated hint when the active model does not support
  images so placeholders are not inserted.
- Update README with usage, supported clipboard sources, settings.yml
  schema, and auto-detect limitations; refresh translations.
- Add tests covering clipboard adapters, image processing/resizing,
  capability detection, provider image-block serialization, REPL
  bracketed-paste handling, and the capability gate.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@guima-why
guima-why merged commit 7a84b90 into main May 18, 2026
12 checks passed
@guima-why
guima-why deleted the feat_multi_modal branch May 20, 2026 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants