Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(config): update Config clone and default for snapshot fields

Steven Enamakel272484bec23e
diff --git a/crates/openhuman-core/src/config/schema/types/config_clone.rs b/crates/openhuman-core/src/config/schema/types/config_clone.rs
index 9c038750f0..7fa4421a88 100644
--- a/crates/openhuman-core/src/config/schema/types/config_clone.rs
+++ b/crates/openhuman-core/src/config/schema/types/config_clone.rs
@@ -12,7 +12,8 @@ impl Clone for Config {
#[inline(never)]
fn clone(&self) -> Self {
Self {
- document_version: std::sync::Mutex::new(*self.document_version.lock().unwrap()),
+ document_snapshot: std::sync::Mutex::new(self.document_snapshot.lock().unwrap().clone()),
+ context_snapshot: self.context_snapshot.clone(),
profile_providers: self.profile_providers.clone(),
workspace_dir: self.workspace_dir.clone(),
action_dir: self.action_dir.clone(),
diff --git a/crates/openhuman-core/src/config/schema/types/defaults.rs b/crates/openhuman-core/src/config/schema/types/defaults.rs
index 6f6f057752..4c6870a838 100644
--- a/crates/openhuman-core/src/config/schema/types/defaults.rs
+++ b/crates/openhuman-core/src/config/schema/types/defaults.rs
@@ -25,7 +25,8 @@ impl Default for Config {
});
Self {
- document_version: std::sync::Mutex::new(None),
+ document_snapshot: std::sync::Mutex::new(Default::default()),
+ context_snapshot: None,
profile_providers: None,
workspace_dir: openhuman_dir.join("workspace"),
action_dir: crate::config::default_action_dir(),