feat(#3996): render generated images inline via manifest-gated resolution - #4029
Draft
aheritier wants to merge 1 commit into
Draft
feat(#3996): render generated images inline via manifest-gated resolution#4029aheritier wants to merge 1 commit into
aheritier wants to merge 1 commit into
Conversation
Collaborator
Author
|
👋 This PR has merge conflicts with the base branch. Please rebase or merge the latest base branch and resolve them. I've moved it to draft and added |
aheritier
force-pushed
the
generated-image-inline-tui
branch
from
August 24, 2026 15:13
7438c97 to
2bb441e
Compare
aheritier
force-pushed
the
generated-image-inline-tui
branch
from
August 25, 2026 08:01
2bb441e to
105245f
Compare
aheritier
force-pushed
the
generated-image-inline-tui
branch
from
August 25, 2026 08:17
105245f to
d9ac92d
Compare
aheritier
force-pushed
the
generated-image-inline-tui
branch
from
August 25, 2026 08:33
d9ac92d to
781cec4
Compare
aheritier
force-pushed
the
generated-image-inline-tui
branch
from
August 25, 2026 20:24
781cec4 to
5339887
Compare
…tion Render model-generated images inline in the same assistant turn (with a filename-only fallback on non-graphics terminals), resolving strictly through LocalRuntime.ResolveGeneratedFile: one recorded reference resolves to bytes plus a validated canonical path, gated on the generated-media manifest, the owning session's persisted WorkingDir (bounded parent fallback, never the viewer cwd), os.Root containment, and symlink-free path components — a forged DocumentSource or a symlink swapped in after materialization selects nothing. Per-owner roots and manifest records are cached on the runtime and seeded at materialization. The chat page attaches a sanitized "unavailable" placeholder synchronously and resolves inside a routed tea.Cmd — never in Update — then swaps results in by ID, for live MessageAddedEvents and for restored session messages. Successful resolution shows the canonical workspace path in the non-graphics fallback; every failure (missing, replaced, tampered, unknown root kind, unrecorded) degrades to the filename-only wording. Runtimes without the capability (remote) render nothing. TUI regression tests pin that same-turn labels and fallbacks come from the final persisted Document name and the resolver-validated canonical workspace path (including collision-suffixed names) — the TUI never constructs paths or sees provisional MediaDelta names.
aheritier
force-pushed
the
generated-image-inline-tui
branch
from
August 26, 2026 11:11
5339887 to
28ee2f3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Renders generated images inline in the TUI through manifest-gated file resolution, with runtime events, app state, and component coverage.
Why
Users can inspect generated images directly in chat while resolution remains restricted to known session manifest entries.
Validation
task test; generated-file, runtime, message, TUI component, and chat tests.Test instructions
Run:
task testStart a TUI session, generate an image, and inspect the chat. Expected: the generated image renders inline. Attempt to reference an unmanifested path; expected: it is not resolved or displayed.