From b8cc3d3c95631aeedca40463932142fb597af12d Mon Sep 17 00:00:00 2001 From: muraa-p Date: Mon, 2 Nov 2026 11:48:40 +0300 Subject: [PATCH] Format the prompt history closure --- crates/ui-egui/src/chat.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/chat.rs b/crates/ui-egui/src/chat.rs index ff08c633..23e43aa9 100644 --- a/crates/ui-egui/src/chat.rs +++ b/crates/ui-egui/src/chat.rs @@ -320,7 +320,13 @@ fn composer(app: &mut CraftApp, ui: &mut Ui, width: f32, dense: bool) { let answering = app.answering(); let hint = if dense { tr("Ask the agent…") } else { tr("Ask anything, e.g. \"What does this program do?\"") }; ui.allocate_ui(Vec2::new(width, 0.0), |ui| { - let history = || app.state.chat.iter().filter_map(|i| if let ChatItem::User(text) = i { Some(crate::prompt_box::Prompt { text: text.clone(), pictures: Vec::new() }) } else { None }).collect(); + let history = || { + app.state + .chat + .iter() + .filter_map(|i| if let ChatItem::User(text) = i { Some(crate::prompt_box::Prompt { text: text.clone(), pictures: Vec::new() }) } else { None }) + .collect() + }; let out = crate::prompt_box::show( ui, &mut app.state.input,