mirror of
https://github.com/instructkr/claw-code.git
synced 2026-04-08 00:54:49 +08:00
fix(cli): wire sessions_dir() through SessionStore::from_cwd() (#41)
The CLI was using a flat cwd/.claw/sessions/ path without workspace fingerprinting, while SessionStore::from_cwd() adds a hash subdirectory. This mismatch meant the isolation machinery existed but wasn't actually used by the main session management codepath. Now sessions_dir() delegates to SessionStore::from_cwd(), ensuring all session operations use workspace-fingerprinted directories.
This commit is contained in:
@@ -4305,9 +4305,9 @@ impl LiveCli {
|
|||||||
|
|
||||||
fn sessions_dir() -> Result<PathBuf, Box<dyn std::error::Error>> {
|
fn sessions_dir() -> Result<PathBuf, Box<dyn std::error::Error>> {
|
||||||
let cwd = env::current_dir()?;
|
let cwd = env::current_dir()?;
|
||||||
let path = cwd.join(".claw").join("sessions");
|
let store = runtime::SessionStore::from_cwd(&cwd)
|
||||||
fs::create_dir_all(&path)?;
|
.map_err(|e| Box::new(e) as Box<dyn std::error::Error>)?;
|
||||||
Ok(path)
|
Ok(store.sessions_dir().to_path_buf())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn create_managed_session_handle(
|
fn create_managed_session_handle(
|
||||||
|
|||||||
Reference in New Issue
Block a user