Skip to content

Render inline tool-generated images in chat#189

Merged
SDSLeon merged 1 commit into
masterfrom
lightcode/bold-newt-7fe52fa4
Jun 16, 2026
Merged

Render inline tool-generated images in chat#189
SDSLeon merged 1 commit into
masterfrom
lightcode/bold-newt-7fe52fa4

Conversation

@SDSLeon

@SDSLeon SDSLeon commented Jun 16, 2026

Copy link
Copy Markdown
Owner
  • Feature: Show agent-generated images (Codex imageGeneration, Claude/ACP image tools) inline in chat instead of folding them into generic tool-call rows
  • Map inline image content from ACP and Claude SDK tool results onto canonical toolCallPayload.images so provider-native picture data reaches the renderer
  • Add ImageView and shared image-source resolution for base64/data: payloads, with copy, download, and lightbox; render image blocks in assistant messages too
  • Exempt image-bearing tool rows from tool-group summarization in chat selectors and persistence so pictures survive thread reload
  • Add main-process IPC (saveImageFile, copyImageToClipboard) to save or copy generated images from the UI

- Extract tool-result image blocks in ACP and Claude canonical mappers
- Add ImageView with lightbox, clipboard copy, and save-as IPC handlers
- Extend tool-call payload schema and keep image tool calls discrete on reload
- Reuse ImageLightbox for shared fullscreen preview in chat and composer
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
lightcode-landing Skipped Skipped Jun 16, 2026 2:50am

@SDSLeon SDSLeon merged commit 76ed121 into master Jun 16, 2026
6 checks passed
@SDSLeon SDSLeon deleted the lightcode/bold-newt-7fe52fa4 branch June 16, 2026 02:52

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 48b5338fde

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

for (const value of record.images) {
if (typeof value !== "string" || value.length === 0) continue;
const classification = classifyCandidate(value);
if (classification) return { value, classification };

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Render every collected tool image

When an ACP/Claude tool result contains more than one image block, the mappers now preserve all of them on payload.images, but this resolver returns as soon as it finds the first renderable entry. In that scenario the chat card, lightbox, copy/download actions, and persisted row only expose the first image while silently dropping the rest; consider resolving and rendering the full images array instead of a single candidate.

Useful? React with 👍 / 👎.

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.

1 participant