Skip to content

Commit 922a090

Browse files
committed
docs: update docs for PR #3720/#3721 - markdown image rendering in TUI
1 parent dff7df8 commit 922a090

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

docs/configuration/user-settings/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ You rarely need to hand-edit this file. Most fields are managed from the TUI's `
3939
| `hide_tool_results` | boolean | `false` | Hide tool call results in the TUI by default. Mirrors the `--hide-tool-results` flag and the <kbd>Ctrl</kbd>+<kbd>O</kbd> toggle. |
4040
| `expand_thinking` | boolean | `false` | Start new sessions with thinking/tool blocks expanded instead of collapsed. |
4141
| `split_diff_view` | boolean | `true` | Render file-edit diffs side-by-side instead of unified. |
42-
| `render_images` | boolean | `true` | Render images returned by tools in terminals that support the Kitty graphics protocol. |
42+
| `render_images` | boolean | `true` | Render images in the TUI using the Kitty graphics protocol. Applies to both tool-result images and Markdown images in agent responses. Automatically disabled when the terminal does not support Kitty. |
4343
| `theme` | string | `default` | Theme name, loaded from a built-in theme or `~/.cagent/themes/<name>.yaml`. The special value `auto` follows the terminal's light/dark background. See [Theming](../../features/tui/index.md#theming). |
4444
| `theme_dark` | string | `default` | Theme applied when `theme: auto` and the terminal background is dark. |
4545
| `theme_light` | string | `default-light` | Theme applied when `theme: auto` and the terminal background is light. |

docs/features/tui/index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,12 @@ The TUI renders Mermaid diagram blocks inline rather than displaying raw syntax.
216216

217217
Mermaid rendering works in both the full TUI and the lean TUI. Unsupported or syntactically invalid diagram blocks are displayed as ordinary fenced code blocks — no configuration is required and there is no way to disable it.
218218

219+
### Markdown Images
220+
221+
The TUI fetches and renders images referenced in agent responses using the Kitty graphics protocol. When an assistant message contains a standard Markdown image reference, the TUI downloads the image in the background and displays it inline at the point of the reference. While the image is loading a placeholder is shown; once loaded, the message re-renders with the image in place.
222+
223+
Only `http://`, `https://`, and `data:image/…;base64,…` URIs are resolved. `file://`, `sandbox://`, and any other URI scheme are rejected as a security measure against prompt-injection attacks that could otherwise read local files. Bare relative paths (e.g. `./output.png`, used for agent-generated images) are read via the local filesystem. Images that fail to load are silently dropped — the surrounding message text is unaffected. Image rendering requires a terminal that supports the Kitty graphics protocol; it is automatically disabled when the terminal does not support it. You can also disable it explicitly via `render_images: false` in `~/.config/cagent/config.yaml` or the **Render images** toggle in `/settings`.
224+
219225
### Snapshots, `/undo`, and `/snapshots`
220226

221227
Enable shadow-git snapshots globally in `~/.config/cagent/config.yaml`:

0 commit comments

Comments
 (0)