Skip to content

[Feature]: Show image files inline when asking the agent to load it. #3111

@MathisWellmann

Description

@MathisWellmann

1. Why Do You NEED This Feature?

I NEED this feature because:

  • Seeing Images rendered inline are much nicer to work with vs quitting forge and opening it with a dedicated image viewer or viu in the terminal.
  • Not having this breaks the flow and external programs need to be used.
  • Agents can write code to generate images, e.g through plotting with matplotlib for one off analysis. If the agent can then show the code inline, it makes the iteration cycle much quicker.
  • Pi Agent supports this and its blocking my full-time adoption of forge.

2. What Is NOT Possible Right Now?

Currently I cannot:

  • Ask the agent to display an image it previously listed or talked about.

What I've tried:

  • Explicitly asked it to show me a concrete image from a file inline.
  • It suggests I open another terminal with xdg-open or similar things, depending on the model.
  • This works with the pi-mono agent natively and would work in this implementation too using the viuer crate.

Agent refusal here for forge:
Image

Vs with pi:

Image

3. What WILL Be Possible With This Feature?

Chat with the Agent about existing image files during repo exploration or when it has just plotted a chart using one-off python scripts, etc.

Tell it "show me the image.png inline here" and it would render it on supported termiinals like ghostty or kitty with a crate like viuer, just like the cli command viu would do.

Proposed Solution (User Experience)

What I like to do in Rust binaries is using viuer to render images inline that were just plotted like this:

    let conf = viuer::Config {
        absolute_offset: false,
        ..Default::default()
    };
    if let Err(e) = viuer::print_from_file(filename, &conf) {
        warn!("image printing failed due to {e}");
    };

Alternatives Considered

Using pi agent instead, which can show me full-res images inline.
I would strongly prefer using codeforge as its Rust based and its performance is excellent otherwise.

Feature Category

File Operations

Priority/Impact

High - Would significantly improve my workflow

Examples from Other Tools

Here is an example when using pi, that leverages the agentica MCP server to write python code for plotting data with matplotlib:

Image

This is highly useful for chatting with data, creating ad-hoc visualizations and iterating quickly on the plot result.

Additional Context

Terminals that have image protocol support include ghostty, kitty and a bunch more.
Alacritty for example does not support the image protocol and even pi does not display the image inline there.
The viuer crate achieves inline image rendering and its API is easy to integrate.
Most likely just a tool calling / prompting change.

Pre-submission Checklist

  • I have searched existing issues and confirmed this is not a duplicate
  • I am willing to submit a PR to implement this feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: featureBrand new functionality, features, pages, workflows, endpoints, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions