t3code icon indicating copy to clipboard operation
t3code copied to clipboard

[Feature]: Codex image generation support

Open tyler6204 opened this issue 7 months ago • 3 comments

Before submitting

  • [x] I searched existing issues and did not find a duplicate.
  • [x] I am describing a concrete problem or use case, not just a vague idea.

Area

Provider integrations / chat attachments

Problem or use case

When using the Codex provider, Codex can generate images, but t3code does not appear to surface the generated image in the chat UI. In my case, I asked Codex to create a tabby cat image. The generation completed, but the app did not show the image, so I had to ask for the raw file path instead.

That makes image generation hard to use from t3code because the successful output is hidden from the normal conversation flow.

Proposed solution

Support Codex image generation results as first-class chat outputs. When Codex returns or writes a generated image, t3code should display an image preview in the thread and expose the local file location or an action to open the file.

A good UX would be:

  • Show generated images inline in the assistant message.
  • Provide an affordance to open the image file locally.
  • Preserve the generated image reference when the thread is reloaded.

Why this matters

This would make Codex image generation usable inside t3code instead of requiring users to manually inspect filesystem paths. It also keeps multimodal work visible in the same thread where the request was made.

Smallest useful scope

A first pass only needs to detect generated image file outputs from Codex and render them inline in the current thread with the file path available.

Alternatives considered

The current workaround is to ask Codex for the file location and open the image manually outside t3code. That works, but it is easy to miss the result and breaks the chat-based workflow.

Risks or tradeoffs

The implementation may need to handle provider-specific result metadata and local file access carefully. It should also avoid assuming every generated file is safe or renderable as an image.

Examples or references

Example interaction:

  1. Ask Codex: create an image of a tabby cat
  2. Codex generates the image successfully.
  3. t3code does not display the image preview, so the user asks for the saved file path.

Contribution

I would be open to helping implement this.

tyler6204 avatar Apr 29 '26 04:04 tyler6204

This would be pretty nice to have

asheriif avatar May 28 '26 16:05 asheriif

Definitely interested in that one!

toniopelo avatar Jun 01 '26 15:06 toniopelo

I hit a broader local-image rendering problem that also affects AI-generated images, but is not specific to image generation.

T3 Code can open a local PNG through its normal file-link UI, but it cannot render that same local file inline in chat Markdown. This reproduces in both user-authored and assistant-authored messages.

Reproduction

  1. Download GitHub's logo into the project/workspace root:

    curl -L \
      https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png \
      -o GitHub-Mark.png
    
  2. Send this Markdown in a chat message:

    ## Local image test
    
    ![Relative local image](GitHub-Mark.png)
    
    [Relative local image as a file link](GitHub-Mark.png)
    
    ![Remote GitHub image](https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png)
    

Actual behavior

  • The remote HTTPS image renders inline.
  • The relative local Markdown image renders as a broken-image placeholder.
  • The relative local file link works and opens the PNG in T3 Code's side-panel file viewer.

The markdown from above renders like this:

Image

Expected behavior

Supported local workspace images should render inline when referenced in chat Markdown, whether the Markdown was written by the user or emitted by an agent/tool. The existing file-link behavior should remain available.

Why this is related

This affects Codex image generation, but it also affects screenshots, Mermaid-rendering skills, and any other local image an agent or user creates. The underlying issue appears to be local-file image resolution in the chat Markdown renderer, not image generation itself.

I also observed that agent-emitted local image output (view_image) was not visibly surfaced inline in the chat, which may be the same missing local-image rendering path.

berend avatar Jul 29 '26 16:07 berend