Skip to content

Fix remote image viewing and better previews in threads - #406

Merged
Tryanks merged 4 commits into
Tryanks:mainfrom
guivieiras:pr/agent-thread-images
Sep 11, 2026
Merged

Tryanks merged 4 commits into
Tryanks:mainfrom
guivieiras:pr/agent-thread-images

Conversation

@guivieiras

Copy link
Copy Markdown
Contributor

Images in agent replies could fail to appear when viewing a thread from another device. Tcode was looking for those files on the viewing device instead of the machine running the thread. It now reads them from that machine and uses the thread’s working folder to find files whose paths do not include a full location.

Web images still load on the viewing device, using the new reqwest library. Images stored on the machine running the thread use Tcode’s existing file reader.

Images fit within the available space and open in a larger viewer when clicked. Images that link somewhere still open their link. Links to image files get a preview button, and the image only loads when you open it. You can reach and open images with the keyboard. While the viewer is open, keyboard navigation stays inside it and returns to the original control when it closes.

The new test covers different file locations, previews loading only when opened, and keyboard navigation into and out of the image viewer.

Before After
image image

Implemented with GPT-6 Astra in Tcode

Load Markdown file images from the attached host and resolve relative paths
against the thread working directory. Use the same source for standalone
rendering, inline rendering and intrinsic measurement. Configure native
HTTP(S) loading with certificate roots that work on Android.

Limit standalone images to 240 logical pixels high while preserving their
aspect ratio. Add a focused host-loading regression and document the image
contract. Select the existing ring provider explicitly in the TLS proxy test
so it continues to run with the HTTP adapter's combined Rustls features.

(cherry picked from commit f4b335a)
@Tryanks
Tryanks force-pushed the pr/agent-thread-images branch from fb8f2f7 to 8c347d5 Compare September 11, 2026 05:40
@Tryanks
Tryanks enabled auto-merge (squash) September 11, 2026 05:40
@Tryanks
Tryanks merged commit 1c90a90 into Tryanks:main Sep 11, 2026
6 checks passed
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.

2 participants