Get all context files (global + profile-specific). This method: 1. Processes all paths in the global and profile configurations 2. Expands glob patterns to include matching files 3. Reads the content of each file 4. Returns a vector of (filename, content) pairs # Returns A Result containing a vector of (filename, content) pairs or an error
(&self, os: &Os)
| 195 | /// # Returns |
| 196 | /// A Result containing a vector of (filename, content) pairs or an error |
| 197 | pub async fn get_context_files(&self, os: &Os) -> Result<Vec<(String, String)>> { |
| 198 | let mut context_files = Vec::new(); |
| 199 | |
| 200 | self.collect_context_files(os, &self.paths, &mut context_files).await?; |
| 201 | |
| 202 | context_files.sort_by(|a, b| a.0.cmp(&b.0)); |
| 203 | context_files.dedup_by(|a, b| a.0 == b.0); |
| 204 | |
| 205 | Ok(context_files) |
| 206 | } |
| 207 | |
| 208 | pub async fn get_context_files_by_path(&self, os: &Os, path: &str) -> Result<Vec<(String, String)>> { |
| 209 | let mut context_files = Vec::new(); |