style: apply cargo fmt across workspace

This commit is contained in:
Karim Jerbi committed 2026-10-11 03:14:29 +01:00
1 parent 85710e5454
commit 9cf9ff2c5c
531 files changed
+57740 -33906

No files matched your search

+33 -28
View File
@@ -57,10 +57,7 @@ fn cmd_input_id() -> iced::widget::Id {
/// "something is running".
fn mcp_status(enabled: bool, busy: bool, waiting: bool) -> (&'static str, Color) {
if !enabled {
(
"MCP control is off",
Color::from_rgb(0.90, 0.35, 0.35),
)
("MCP control is off", Color::from_rgb(0.90, 0.35, 0.35))
} else if waiting {
(
"MCP is waiting for you to pick — Enter confirms, Esc cancels",
@@ -72,10 +69,7 @@ fn mcp_status(enabled: bool, busy: bool, waiting: bool) -> (&'static str, Color)
Color::from_rgb(0.95, 0.72, 0.25),
)
} else {
(
"MCP control is ready",
Color::from_rgb(0.35, 0.85, 0.55),
)
("MCP control is ready", Color::from_rgb(0.35, 0.85, 0.55))
}
}
@@ -96,9 +90,9 @@ fn strip_option_listing(s: &str, options: &[CmdOption]) -> String {
let is_listing = inner.contains('/')
|| inner.contains('|')
|| inner.contains('=')
|| options.iter().any(|o| {
o.label.eq_ignore_ascii_case(inner) || o.keyword.eq_ignore_ascii_case(inner)
});
|| options
.iter()
.any(|o| o.label.eq_ignore_ascii_case(inner) || o.keyword.eq_ignore_ascii_case(inner));
if !is_listing {
return s.to_string();
}
@@ -547,8 +541,11 @@ impl CommandLine {
if self.cliprompt_lines == 0 {
return 0;
}
let visible: Vec<&HistoryEntry> =
self.history.iter().filter(|e| self.entry_visible(e)).collect();
let visible: Vec<&HistoryEntry> = self
.history
.iter()
.filter(|e| self.entry_visible(e))
.collect();
visible.len().min(self.cliprompt_lines as usize)
}
@@ -671,10 +668,7 @@ impl CommandLine {
if matches.is_empty() {
return None;
}
let index = self
.autocomplete_cursor
.unwrap_or(0)
.min(matches.len() - 1);
let index = self.autocomplete_cursor.unwrap_or(0).min(matches.len() - 1);
matches.get(index).cloned()
}
@@ -710,8 +704,11 @@ impl CommandLine {
// Only the most recent entries pushed within COMMANDLINEFADETIME
// show on the overlay (0 means never fade). The dropdown button
// keeps the full backlog reachable when the user actually wants it.
let mut visible: Vec<&HistoryEntry> =
self.history.iter().filter(|e| self.entry_visible(e)).collect();
let mut visible: Vec<&HistoryEntry> = self
.history
.iter()
.filter(|e| self.entry_visible(e))
.collect();
// Keep the active prompt/options immediately above the input. Commands
// may emit informational lines while waiting for the next option; those
// lines belong above the pinned interaction row, not below it.
@@ -793,9 +790,7 @@ impl CommandLine {
p.background.base.text,
4.5,
);
iced::widget::text::Style {
color: Some(color),
}
iced::widget::text::Style { color: Some(color) }
},
))
.padding([5, 8]);
@@ -996,8 +991,8 @@ impl CommandLine {
let mcp_tip = container(text(t!(mcp_tooltip)).size(11))
.padding([3, 6])
.style(container::bordered_box);
let mcp_btn = container(tooltip(mcp_btn, mcp_tip, tooltip::Position::Top).gap(4))
.padding(Padding {
let mcp_btn =
container(tooltip(mcp_btn, mcp_tip, tooltip::Position::Top).gap(4)).padding(Padding {
top: 0.0,
right: 6.0,
bottom: 0.0,
@@ -1087,15 +1082,25 @@ impl CommandLine {
.style(header_btn_style)
.padding([2, 6]);
let header = container(
row![Space::new().width(Length::Fill), copy_btn, clear_btn, collapse_btn]
.spacing(6)
.align_y(iced::Center),
row![
Space::new().width(Length::Fill),
copy_btn,
clear_btn,
collapse_btn
]
.spacing(6)
.align_y(iced::Center),
)
.width(Length::Fill)
.padding([2, 8]);
let panel = container(column![header, log])
.width(Length::Fill)
.padding(Padding { top: 2.0, right: 8.0, bottom: 4.0, left: 8.0 });
.padding(Padding {
top: 2.0,
right: 8.0,
bottom: 4.0,
left: 8.0,
});
let resize = iced::widget::mouse_area(
container(crate::ui::icons::themed_primary(
crate::ui::icons::RESIZE,