huskies: merge 858

This commit is contained in:
dave
2026-04-29 10:41:32 +00:00
parent be5db846cc
commit 11d111360d
79 changed files with 265 additions and 0 deletions
+2
View File
@@ -3,6 +3,7 @@ use std::path::PathBuf;
use std::sync::Mutex;
use tokio::sync::watch;
/// Global server session state: the open project root and a cancellation signal.
pub struct SessionState {
pub project_root: Mutex<Option<PathBuf>>,
pub cancel_tx: watch::Sender<bool>,
@@ -21,6 +22,7 @@ impl Default for SessionState {
}
impl SessionState {
/// Return the currently open project root, or an error if no project is open.
pub fn get_project_root(&self) -> Result<PathBuf, String> {
let root_guard = self.project_root.lock().map_err(|e| e.to_string())?;
let root = root_guard.as_ref().ok_or_else(|| {