use second_brain_core::project_path;
use serde_json::Value;
pub(super) fn of(input: &Value) -> Option<String> {
input["transcript_path"]
.as_str()
.and_then(project_path::from_transcript)
.or_else(|| {
input["cwd"]
.as_str()
.filter(|cwd| !cwd.is_empty())
.map(project_path::encode)
})
}