pub fn assemble_context(paths: Vec<String>, base_dir: &Path) -> Result<String>Expand description
Assembles context from multiple files into a single markdown document.
§Arguments
paths- File paths to includebase_dir- The base directory to resolve relative paths against
§Returns
Ok(String)- Markdown containing all readable files (empty if none succeed)Err- Ifbase_dircannot be canonicalized
§Behavior
- Validates each resolved path stays within
base_dir(prevents directory traversal) - Skips files that escape the project directory, can’t be read, or are binary/too large
- Continues even if some files fail