Upgrade Iced and render Markdown tables
This commit is contained in:
@@ -17,7 +17,7 @@ impl App {
|
||||
icon(ICON_SPARK, 36),
|
||||
text("Start a local coding session").size(28),
|
||||
text("Choose a project folder to create your first session.").size(14),
|
||||
Space::with_height(10),
|
||||
Space::new().height(10),
|
||||
open_project,
|
||||
]
|
||||
.spacing(10)
|
||||
@@ -40,7 +40,7 @@ impl App {
|
||||
);
|
||||
}
|
||||
let header = header
|
||||
.push(Space::with_width(Length::Fill))
|
||||
.push(Space::new().width(Length::Fill))
|
||||
.spacing(10)
|
||||
.align_y(Alignment::Center);
|
||||
|
||||
@@ -124,7 +124,7 @@ impl App {
|
||||
}
|
||||
}
|
||||
if !message.content.is_empty() {
|
||||
if message.user || message.tool || message.markdown.is_empty() {
|
||||
if message.user || message.tool || message.markdown.items().is_empty() {
|
||||
let content = if message.reasoning.is_some() {
|
||||
crate::agent::visible_content(&message.content).trim_start()
|
||||
} else {
|
||||
@@ -134,9 +134,8 @@ impl App {
|
||||
} else {
|
||||
body = body.push(
|
||||
markdown::view(
|
||||
&message.markdown,
|
||||
markdown::Settings::with_text_size(14),
|
||||
markdown_style,
|
||||
message.markdown.items(),
|
||||
markdown::Settings::with_text_size(14, markdown_style),
|
||||
)
|
||||
.map(Message::OpenLink),
|
||||
);
|
||||
@@ -283,7 +282,7 @@ impl App {
|
||||
))
|
||||
.size(11)
|
||||
.color(muted_text()),
|
||||
Space::with_width(Length::Fill),
|
||||
Space::new().width(Length::Fill),
|
||||
icon(ICON_MODEL, 16),
|
||||
text(self.config.model.to_string()).size(12),
|
||||
action,
|
||||
@@ -339,7 +338,7 @@ fn tool_cards(cards: Vec<crate::agent::ToolCard>) -> Element<'static, Message> {
|
||||
let mut rows = column![].spacing(0);
|
||||
for (index, card) in cards.into_iter().enumerate() {
|
||||
if index > 0 {
|
||||
rows = rows.push(horizontal_rule(1));
|
||||
rows = rows.push(rule::horizontal(1));
|
||||
}
|
||||
let parameters = crate::agent::tool_parameters(&card.call);
|
||||
let call = crate::agent::tool_call_text(&card.call);
|
||||
@@ -391,7 +390,7 @@ fn tool_cards(cards: Vec<crate::agent::ToolCard>) -> Element<'static, Message> {
|
||||
let mut content = column![
|
||||
row![
|
||||
text(card.call.name).size(13),
|
||||
Space::with_width(Length::Fill),
|
||||
Space::new().width(Length::Fill),
|
||||
text(card.state.label()).size(11).color(muted_text()),
|
||||
actions,
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user