From 69ce53ac347855fa954b8be932fe9aae21edc42e Mon Sep 17 00:00:00 2001 From: Lka09 Date: Wed, 24 Jun 2026 19:15:31 +0900 Subject: [PATCH 1/2] version 0.1.5 --- .wisp/settings.toml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .wisp/settings.toml diff --git a/.wisp/settings.toml b/.wisp/settings.toml new file mode 100644 index 0000000..1770e3b --- /dev/null +++ b/.wisp/settings.toml @@ -0,0 +1 @@ +execute_agents = true From dd5895aa973ec1f3a78455d495732e39561ec394 Mon Sep 17 00:00:00 2001 From: Lka09 Date: Wed, 24 Jun 2026 19:17:17 +0900 Subject: [PATCH 2/2] style: fix rustfmt formatting in display.rs and tui.rs --- wisp/src/display.rs | 12 ++++++++--- wisp/src/tui.rs | 51 +++++++++++++++++++++------------------------ 2 files changed, 33 insertions(+), 30 deletions(-) diff --git a/wisp/src/display.rs b/wisp/src/display.rs index 7bda5b6..52ef687 100644 --- a/wisp/src/display.rs +++ b/wisp/src/display.rs @@ -241,7 +241,9 @@ pub fn finish(session_path: &str, is_dry_run: bool) { } emit(&rule); emit(""); - emit(&format!(" {GRAY}session {RESET}{DIM}{session_path}{RESET}")); + emit(&format!( + " {GRAY}session {RESET}{DIM}{session_path}{RESET}" + )); if is_dry_run { emit(&format!( " {GRAY} use {WHITE}/run {GRAY} to execute for real{RESET}" @@ -255,7 +257,9 @@ pub fn finish(session_path: &str, is_dry_run: bool) { pub fn init_header() { let rule = heavy_rule(); emit(&rule); - emit(&format!(" {ACCENT}✦{RESET} {BOLD}{WHITE}Wisp Init{RESET}")); + emit(&format!( + " {ACCENT}✦{RESET} {BOLD}{WHITE}Wisp Init{RESET}" + )); emit(&rule); emit(""); } @@ -300,7 +304,9 @@ pub fn init_error(path: &str, err: &dyn std::fmt::Display) { pub fn doctor_header() { let rule = heavy_rule(); emit(&rule); - emit(&format!(" {ACCENT}✦{RESET} {BOLD}{WHITE}Wisp Doctor{RESET}")); + emit(&format!( + " {ACCENT}✦{RESET} {BOLD}{WHITE}Wisp Doctor{RESET}" + )); emit(&rule); emit(""); } diff --git a/wisp/src/tui.rs b/wisp/src/tui.rs index e4e8a0d..2892d63 100644 --- a/wisp/src/tui.rs +++ b/wisp/src/tui.rs @@ -154,11 +154,7 @@ impl App { } self.last_was_blank = is_blank; - let color = if is_blank { - WHITE - } else { - line_color(t) - }; + let color = if is_blank { WHITE } else { line_color(t) }; self.push(line, color); } } @@ -205,8 +201,11 @@ fn line_color(t: &str) -> Color { RED } else if t.starts_with("✦") || t.starts_with("┌") || t.starts_with("└") { LAVENDER - } else if t.starts_with('·') || t.starts_with("files") || t.starts_with("task") - || t.starts_with("branch") || t.starts_with("mode") + } else if t.starts_with('·') + || t.starts_with("files") + || t.starts_with("task") + || t.starts_with("branch") + || t.starts_with("mode") { DIM } else { @@ -296,20 +295,18 @@ fn handle_event(ev: Event, app: &mut App) -> anyhow::Result<()> { Event::Key(k) if k.kind == KeyEventKind::Press => { on_key(k.code, k.modifiers, app)?; } - Event::Mouse(me) => { - match me.kind { - MouseEventKind::ScrollUp => { - app.auto_scroll = false; - app.scroll = app.scroll.saturating_sub(3); - } - MouseEventKind::ScrollDown => { - let max = app.lines.len().saturating_sub(1); - app.scroll = (app.scroll + 3).min(max); - app.auto_scroll = app.scroll >= max; - } - _ => {} + Event::Mouse(me) => match me.kind { + MouseEventKind::ScrollUp => { + app.auto_scroll = false; + app.scroll = app.scroll.saturating_sub(3); } - } + MouseEventKind::ScrollDown => { + let max = app.lines.len().saturating_sub(1); + app.scroll = (app.scroll + 3).min(max); + app.auto_scroll = app.scroll >= max; + } + _ => {} + }, Event::Resize(_, _) => {} _ => {} } @@ -569,7 +566,11 @@ fn draw(f: &mut Frame, app: &mut App) { } fn draw_header(f: &mut Frame, app: &App, area: Rect) { - let mode_str = if app.execute_agents { "execute" } else { "dry-run" }; + let mode_str = if app.execute_agents { + "execute" + } else { + "dry-run" + }; let mode_col = if app.execute_agents { GREEN } else { WHITE }; let cfg_col = if app.config_ok { GREEN } else { RED }; let cfg_str = if app.config_ok { "ok" } else { "!" }; @@ -603,9 +604,7 @@ fn draw_header(f: &mut Frame, app: &App, area: Rect) { let mut spans = vec![ Span::styled( " Wisp ", - Style::default() - .fg(LAVENDER) - .add_modifier(Modifier::BOLD), + Style::default().fg(LAVENDER).add_modifier(Modifier::BOLD), ), Span::styled(" │ ", Style::default().fg(DIM)), Span::styled(app.branch.as_str(), Style::default().fg(WHITE)), @@ -642,9 +641,7 @@ fn draw_output(f: &mut Frame, app: &App, area: Rect) { let lines: Vec = app.lines[start..end] .iter() - .map(|(text, color)| { - Line::from(Span::styled(text.as_str(), Style::default().fg(*color))) - }) + .map(|(text, color)| Line::from(Span::styled(text.as_str(), Style::default().fg(*color)))) .collect(); f.render_widget(Paragraph::new(lines), area);