Render tool output as terminal text

This commit is contained in:
Georg Bauer
2026-07-27 22:07:21 +02:00
parent a7f26ccb71
commit d371d9d659
2 changed files with 22 additions and 3 deletions

View File

@@ -141,6 +141,11 @@ impl App {
})
.padding(0)
.size(14)
.font(if message.tool {
iced::Font::MONOSPACE
} else {
iced::Font::DEFAULT
})
.style(selectable_text_style),
);
} else {
@@ -503,7 +508,7 @@ fn tool_cards(cards: Vec<crate::agent::ToolCard>) -> Element<'static, Message> {
.spacing(5);
if let Some(result) = card.result {
let bounded = crate::agent::bounded_tool_text(&result, 1_200);
content = content.push(text(bounded).size(12));
content = content.push(text(bounded).font(iced::Font::MONOSPACE).size(12));
}
rows = rows.push(container(content).padding(10).width(Length::Fill));
}