feat: Improve markdown rendering with enhanced line wrapping and indentation for code blocks

This commit is contained in:
asepharyana
2026-07-15 04:36:00 +07:00
parent 3020a0431c
commit b2e848d124
2 changed files with 50 additions and 19 deletions
+2 -3
View File
@@ -18,7 +18,7 @@
use ratatui::layout::Rect;
use ratatui::style::{Color, Style, Modifier};
use ratatui::text::{Line, Span};
use ratatui::widgets::{Block, BorderType, Borders, Paragraph, Wrap};
use ratatui::widgets::{Block, BorderType, Borders, Paragraph};
use ratatui::Frame;
use super::theme::Theme;
use crate::dto::chat::message::Role;
@@ -253,8 +253,7 @@ pub fn draw_chat(frame: &mut Frame, area: Rect, state: &crate::app::state::rest:
let paragraph = Paragraph::new(visible)
.block(block)
.style(Style::default().bg(Theme::BG))
.wrap(Wrap { trim: false });
.style(Style::default().bg(Theme::BG));
frame.render_widget(paragraph, area);
}