pub fn resolve_database_with_message(
path: Option<&Path>,
action: &str,
) -> Result<(PathBuf, PathBuf)>Expand description
Resolve database path with user-friendly messaging
This is a shared utility used by both search and index commands. It finds the best database and prints appropriate messages when using a database from a parent directory or global location.
§Arguments
path- Optional target path (defaults to current directory)action- Action verb for messaging (e.g., “searching”, “indexing”)
§Returns
Ok((db_path, project_path))- Tuple of database path and project root pathErr(...)- If path resolution fails