Expand description
Pure view: fn render(&State, &mut RenderCache, &mut Frame).
Three contracts:
- Never mutates
State. The view is fully derived. - Never performs I/O. All state — model lists, MCP status,
file contents — is whatever the reducer put in
State. - Never holds a
&mut App/&mut anythingother than theFrameratatui owns and the render-layerRenderCache(which is memoization + scroll-position bookkeeping, not reducer state).
Signature: fn render(&State, &mut RenderCache, &mut Frame).
The &mut RenderCache is memoization only (markdown parse
cache, scroll position, theme choice) — it never affects
reducer outcomes or persisted state.
Modules§
- diff
- Diff rendering shared between the file-mutating tools (
write_file,apply_patch) that PRODUCE diff output and the chat renderer that COLORS added/removed lines. Both the marker conventions and the producer ([generate_display_diff]) live here in the render layer, so every tool that needs a display diff shares one implementation and one format. - markdown
- theme
- widgets
- Stateless TUI widgets.
Structs§
- Render
Cache - Transient render-layer state that lives across frames but isn’t
reducer state. Owned by
app::run_interactive; passed as&muttorender()per frame.
Functions§
- render
- The entrypoint. Call once per render pass from the main loop.