mirror of
https://github.com/Dasemu/Grove.git
synced 2026-11-26 07:16:11 +00:00
feat(daemon): report worktree path in status JSON
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9572da6763
commit
6377c02fec
2 files changed
+3
-1
No files matched your search
@@ -42,6 +42,7 @@ impl Settings {
|
||||
pub struct WtStatus {
|
||||
pub branch: Option<String>,
|
||||
pub state: String,
|
||||
pub path: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
@@ -417,6 +418,7 @@ fn pass(
|
||||
now_wts.push(WtStatus {
|
||||
branch: w.branch.clone(),
|
||||
state,
|
||||
path: w.path.display().to_string(),
|
||||
});
|
||||
}
|
||||
status.worktrees = now_wts;
|
||||
|
||||
@@ -161,7 +161,7 @@ fn handle(req: &Request, ctx: &Ctx) -> Value {
|
||||
"last_error": r.last_error,
|
||||
"failures": r.failures,
|
||||
"worktrees": r.worktrees.iter()
|
||||
.map(|w| json!({"branch": w.branch, "state": w.state}))
|
||||
.map(|w| json!({"branch": w.branch, "state": w.state, "path": w.path}))
|
||||
.collect::<Vec<_>>(),
|
||||
})
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user