Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,22 +79,6 @@ pub use tinymemory_api::host::{
DEFAULT_MEMORY_SYNC_INTERVAL_SECS,
};

/// The default OpenHuman root directory, `~/.openhuman`.
///
/// The host resolves this through `config::default_root_openhuman_dir`, which
/// this crate cannot see. Reproduced here rather than added to the config seam
/// because the two callers only need it as a last-resort fallback when no
/// workspace was supplied.
///
/// # Errors
///
/// Returns `Err` when the home directory cannot be determined.
pub fn default_openhuman_dir() -> Result<std::path::PathBuf, String> {
dirs::home_dir()
.ok_or_else(|| "Could not find home directory".to_string())
.map(|home| home.join(".openhuman"))
}

pub use ingestion::{
ExtractedEntity, ExtractedRelation, ExtractionMode, IngestionJob, IngestionQueue,
IngestionState, IngestionStatusSnapshot, MemoryIngestionConfig, MemoryIngestionRequest,
Expand Down
13 changes: 0 additions & 13 deletions core/src/store/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,19 +128,6 @@ impl MemoryClient {
}
}

/// Create a new local memory client using the default `.openhuman` directory.
///
/// # Errors
///
/// Returns an error string if the home directory cannot be resolved or if
/// initialization fails.
pub fn new_local() -> Result<Self, String> {
let workspace_dir = crate::default_openhuman_dir()
.map_err(|e| e.to_string())?
.join("workspace");
Self::from_workspace_dir(workspace_dir)
}

/// Create a new memory client from a specific workspace directory.
///
/// # Arguments
Expand Down
Loading