update: fmt + memoryに用いる言語の構成
This commit is contained in:
@@ -69,7 +69,9 @@ impl Renderer {
|
||||
|
||||
fn span_style(&self) -> Style {
|
||||
if self.in_inline_code > 0 {
|
||||
return Style::default().fg(Color::Yellow).bg(Color::Rgb(40, 40, 40));
|
||||
return Style::default()
|
||||
.fg(Color::Yellow)
|
||||
.bg(Color::Rgb(40, 40, 40));
|
||||
}
|
||||
if self.in_code_block {
|
||||
return Style::default().fg(Color::Cyan);
|
||||
@@ -211,10 +213,8 @@ impl Renderer {
|
||||
}
|
||||
Tag::BlockQuote(_) => {
|
||||
self.emit_blank(out);
|
||||
self.line_prefix.push(Span::styled(
|
||||
"│ ",
|
||||
Style::default().fg(Color::DarkGray),
|
||||
));
|
||||
self.line_prefix
|
||||
.push(Span::styled("│ ", Style::default().fg(Color::DarkGray)));
|
||||
}
|
||||
Tag::Strong => self.bold += 1,
|
||||
Tag::Emphasis => self.italic += 1,
|
||||
|
||||
@@ -309,10 +309,7 @@ mod tests {
|
||||
s.apply_system_message_text(&text);
|
||||
let t = &s.tasks()[0];
|
||||
assert_eq!(t.subject, "subject with\nembedded newline");
|
||||
assert_eq!(
|
||||
t.description,
|
||||
"desc:\n status: not-actually-a-field"
|
||||
);
|
||||
assert_eq!(t.description, "desc:\n status: not-actually-a-field");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -165,10 +165,7 @@ fn mini_view_summary_line(counts: TaskCounts, width: u16) -> Line<'static> {
|
||||
counts.deleted,
|
||||
);
|
||||
let shown = truncate_with_ellipsis(&text, width as usize);
|
||||
Line::from(Span::styled(
|
||||
shown,
|
||||
Style::default().fg(Color::DarkGray),
|
||||
))
|
||||
Line::from(Span::styled(shown, Style::default().fg(Color::DarkGray)))
|
||||
}
|
||||
|
||||
/// Two-character status marker + the style to render it with. Mirrors
|
||||
@@ -591,7 +588,10 @@ fn render_block_into(lines: &mut Vec<Line<'static>>, block: &Block, width: u16,
|
||||
}
|
||||
Block::AssistantText { text } => match mode {
|
||||
Mode::Overview => push_overview_line(lines, text, width, MessageKind::Assistant, ""),
|
||||
_ => lines.extend(crate::markdown::render(text, kind_style(MessageKind::Assistant))),
|
||||
_ => lines.extend(crate::markdown::render(
|
||||
text,
|
||||
kind_style(MessageKind::Assistant),
|
||||
)),
|
||||
},
|
||||
Block::Thinking(t) => render_thinking(lines, t, width, mode),
|
||||
// ToolCall is dispatched in `compute_history` via `tool::render_tool`
|
||||
|
||||
Reference in New Issue
Block a user