Show progress indicator for /diff command (#2245)
## Summary - Show a temporary Working on diff state in the bottom pan - Add `DiffResult` app event and dispatch git diff asynchronously ## Testing - `just fmt` - `just fix` *(fails: `let` expressions in this position are unstable)* - `cargo test --all-features` *(fails: `let` expressions in this position are unstable)* ------ https://chatgpt.com/codex/tasks/task_i_689a839f32b88321840a893551d5fbef
This commit is contained in:
@@ -41,4 +41,8 @@ pub(crate) trait BottomPaneView<'a> {
|
||||
) -> Option<ApprovalRequest> {
|
||||
Some(request)
|
||||
}
|
||||
|
||||
/// Optional hook for views that expose a live status line. Views that do not
|
||||
/// support this can ignore the call.
|
||||
fn update_status_text(&mut self, _text: String) {}
|
||||
}
|
||||
|
||||
@@ -210,6 +210,19 @@ impl BottomPane<'_> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Update the live status text shown while a task is running.
|
||||
/// If a modal view is active (i.e., not the status indicator), this is a no‑op.
|
||||
pub(crate) fn update_status_text(&mut self, text: String) {
|
||||
if !self.is_task_running || !self.status_view_active {
|
||||
return;
|
||||
}
|
||||
if let Some(mut view) = self.active_view.take() {
|
||||
view.update_status_text(text);
|
||||
self.active_view = Some(view);
|
||||
self.request_redraw();
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn composer_is_empty(&self) -> bool {
|
||||
self.composer.is_empty()
|
||||
}
|
||||
|
||||
@@ -43,4 +43,8 @@ impl BottomPaneView<'_> for StatusIndicatorView {
|
||||
self.view.interrupt();
|
||||
}
|
||||
}
|
||||
|
||||
fn update_status_text(&mut self, text: String) {
|
||||
self.update_text(text);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user