(root: string)
| 240 | } |
| 241 | |
| 242 | private loadInitialAgentsFiles(root: string): LoadedAgentsFile[] { |
| 243 | const agentDir = resolve(this.config.agentDir); |
| 244 | |
| 245 | return loadProjectContextFiles({ cwd: root, agentDir }) |
| 246 | .filter((file) => { |
| 247 | const path = resolve(file.path); |
| 248 | if (isPathInsideRoot(path, agentDir)) return true; |
| 249 | return isPathInsideRoot(path, root) && dirname(path) === root; |
| 250 | }) |
| 251 | .map((file) => ({ |
| 252 | path: resolve(file.path), |
| 253 | content: file.content, |
| 254 | })); |
| 255 | } |
| 256 | |
| 257 | private async findAvailableAgentsFiles( |
| 258 | root: string, |
no test coverage detected