···29293030 Some(prefix.to_string())
3131}
3232+3333+pub fn get_beads_last_changed(path: &Path) -> Option<String> {
3434+ let beads_dir = path.join(".beads");
3535+ if !beads_dir.exists() {
3636+ return None;
3737+ }
3838+3939+ let output = Command::new("bd")
4040+ .current_dir(path)
4141+ .args(["sql", "--json"])
4242+ .arg("SELECT MAX(updated_at) AS last_changed FROM issues")
4343+ .output()
4444+ .ok()?;
4545+4646+ if !output.status.success() {
4747+ return None;
4848+ }
4949+5050+ let stdout = String::from_utf8_lossy(&output.stdout);
5151+ let parsed: Vec<serde_json::Value> = serde_json::from_str(&stdout).ok()?;
5252+ let first = parsed.first()?;
5353+ let val = first.get("last_changed")?;
5454+5555+ match val {
5656+ serde_json::Value::Null => None,
5757+ serde_json::Value::String(s) => Some(s.clone()),
5858+ other => Some(other.to_string()),
5959+ }
6060+}
+1-1
src/detect/mod.rs
···88mod workparent;
991010pub use ahead::get_ahead;
1111-pub use beads::get_beads_prefix;
1111+pub use beads::{get_beads_last_changed, get_beads_prefix};
1212pub use date::{get_change_date, get_commit_date};
1313pub use repo::{detect_repo, RepoInfo, RepoType};
1414pub use variant::get_variant;