(kaos: Kaos, workDir: string, projectRoot: string)
| 141 | } |
| 142 | |
| 143 | function dirsRootToLeaf(kaos: Kaos, workDir: string, projectRoot: string): string[] { |
| 144 | const dirs: string[] = []; |
| 145 | let current = kaos.normpath(workDir); |
| 146 | |
| 147 | while (true) { |
| 148 | dirs.push(current); |
| 149 | if (current === projectRoot) break; |
| 150 | const parent = dirname(current); |
| 151 | if (parent === current) break; |
| 152 | current = parent; |
| 153 | } |
| 154 | |
| 155 | return dirs.toReversed(); |
| 156 | } |
| 157 | |
| 158 | interface AgentFile { |
| 159 | readonly path: string; |
no test coverage detected