* 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
()
| 960 | * Cheap: O(pendingFiles.size), no I/O, no locks. |
| 961 | */ |
| 962 | getPendingFiles(): PendingFile[] { |
| 963 | const result: PendingFile[] = []; |
| 964 | for (const [filePath, info] of this.pendingFiles) { |
| 965 | result.push({ |
| 966 | path: filePath, |
| 967 | firstSeenMs: info.firstSeenMs, |
| 968 | lastSeenMs: info.lastSeenMs, |
| 969 | indexing: this.syncing && this.syncStartedMs >= info.lastSeenMs, |
| 970 | }); |
| 971 | } |
| 972 | return result; |
| 973 | } |
| 974 | } |
| 975 | |
| 976 | /** |
no outgoing calls
no test coverage detected