* Snapshot of files seen by the watcher since the last successful sync. * * Used by MCP tool responses to mark stale results without blocking on a * sync: a tool that returns a hit in `src/foo.ts` while `src/foo.ts` is in * this list tells the agent "Read this file directly, the index la
()
| 1212 | * Cheap: O(pendingFiles.size), no I/O, no locks. |
| 1213 | */ |
| 1214 | getPendingFiles(): PendingFile[] { |
| 1215 | const result: PendingFile[] = []; |
| 1216 | for (const [filePath, info] of this.pendingFiles) { |
| 1217 | result.push({ |
| 1218 | path: filePath, |
| 1219 | firstSeenMs: info.firstSeenMs, |
| 1220 | lastSeenMs: info.lastSeenMs, |
| 1221 | indexing: this.syncing && this.syncStartedMs >= info.lastSeenMs, |
| 1222 | }); |
| 1223 | } |
| 1224 | return result; |
| 1225 | } |
| 1226 | } |
| 1227 | |
| 1228 | /** |
no test coverage detected