Skip to content

Attach images and folders to chat messages - #69

Merged
currentbits merged 3 commits into
mainfrom
coder/we-should-be-able-to-add-images-and-fold-53c77b
Aug 15, 2026
Merged

currentbits merged 3 commits into
mainfrom
coder/we-should-be-able-to-add-images-and-fold-53c77b

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Closes #68.

What changed

Users can now attach images and folders to a chat message in the composer:

  • Composer (src/components/Composer.tsx): paperclip button opens a native multi-select dialog (images and folders), images can be pasted from the clipboard, and files/folders can be drag-dropped onto the composer. Attachments appear as removable chips above the textarea, with thumbnails for images, and clear on successful send.
  • Main process (electron/attachments.js, electron/ipc.js, electron/preload.js): new attachments:pick / fromPaths / saveImage / readImage channels. Picked and dropped paths are classified via statSync (image extensions or directories; other files stay in the existing @-mention flow). Pasted images are persisted under userData/attachments/<threadId>/. webUtils.getPathForFile resolves absolute paths for dropped files.
  • Runner (electron/runner.js): attachments are sanitized (absolute paths only), stored on the user transcript message so they survive reload, and appended to the dispatch prompt as an absolute-path list. Every provider (claude stdin, codex/grok/kimi/opencode argv) receives them, since agents run locally and read the paths with their normal file tools. Live-session follow-ups and retries carry the same attachments.
  • Transcript (ThreadView.tsx): user bubbles render their attachment chips/thumbnails.
  • Types and stubs: AttachmentInfo in src/shared/ipc.ts, ChatMessage.attachments, runs.start input, plus devCoder/wireClient implementations and test-fake support. The attach button and drop are hidden in web mode, where no native dialog exists.

Why

Agents frequently need visual context (screenshots, mockups) or a whole folder as input. Since agents execute on the same machine, passing absolute paths is sufficient for every provider and avoids provider-specific image-block protocols.

Tests

  • New: test/composerAttachments.test.tsx (5 tests), electron/test/attachments.test.js (5 tests).

  • Full suites green: 649/649 renderer, 737/737 electron, core and memory-server passing. tsc --noEmit clean.

  • PR created by the Kimi Code agent

Willem and others added 3 commits August 15, 2026 20:11
… devCoder.ts is a 3,756-line second implementation that keeps
… Worklogs and toolcalls dont seem to show up for kimi k3
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@currentbits
currentbits merged commit 2f37fff into main Aug 15, 2026
1 check failed
@currentbits
currentbits deleted the coder/we-should-be-able-to-add-images-and-fold-53c77b branch October 3, 2026 16:07
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.

Attach images and folders to chat messages

1 participant