Skip to content

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

refactor(core): use config for workspace directory

Steven Enamakeldd499a4a0eea
diff --git a/crates/openhuman-core/src/threads/ops/crud.rs b/crates/openhuman-core/src/threads/ops/crud.rs
index 3df83755fd..a0c990376b 100644
--- a/crates/openhuman-core/src/threads/ops/crud.rs
+++ b/crates/openhuman-core/src/threads/ops/crud.rs
@@ -26,7 +26,11 @@ pub async fn threads_list(
ctx: &DispatchCtx,
_request: EmptyRequest,
) -> Result<Outcome<ApiEnvelope<ConversationThreadsListResponse>>, String> {
- let dir = workspace_dir().await?;
+ let dir = ctx
+ .load_config()
+ .await
+ .map_err(|error| format!("load config: {error}"))?
+ .workspace_dir;
let threads = conversations::blocking::list_threads(ctx.clone(), dir)
.await?
.into_iter()