tui: render markdown at the panel's available width, not the terminal width
Long assistant messages vanished past the chat panel's right edge instead
of wrapping: ThemedMarkdownRenderable built its rich Console at
console.width, which is the physical terminal width (e.g. 80), but the
markdown lives in a narrower Panel. options.max_width holds the real
available columns (panel inner width minus borders/padding); rich wrapped
to the terminal width while the visible area was narrower, so the right
side of every long line was cut off. Use options.max_width, falling back to
console.width only when it is unset.
1 parent bb8e20e commit 16b6e1592401afc97e4babd14ff0a5d6a8627288
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored 10 hours ago
Showing 1 changed file
View
clients/terminal/tui/renderers/markdown_content.py