feat: add IRONCLAW_BASE_DIR env var with LazyLock caching (#397)

This commit is contained in:
ibhagwan
2026-02-27 17:43:43 +04:00
committed by GitHub
parent a7c0be7f1b
commit c592a8f2de
26 changed files with 255 additions and 127 deletions
+2 -5
View File
@@ -20,6 +20,7 @@ use std::path::PathBuf;
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use crate::bootstrap::ironclaw_base_dir;
use crate::workspace::Workspace;
/// Configuration for workspace hygiene.
@@ -37,15 +38,11 @@ pub struct HygieneConfig {
impl Default for HygieneConfig {
fn default() -> Self {
let state_dir = dirs::home_dir()
.unwrap_or_else(|| PathBuf::from("."))
.join(".ironclaw");
Self {
enabled: true,
retention_days: 30,
cadence_hours: 12,
state_dir,
state_dir: ironclaw_base_dir(),
}
}
}