* 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
()
| 842 | * Cheap: O(pendingFiles.size), no I/O, no locks. |
| 843 | */ |
| 844 | getPendingFiles(): PendingFile[] { |
| 845 | const result: PendingFile[] = []; |
| 846 | for (const [filePath, info] of this.pendingFiles) { |
| 847 | result.push({ |
| 848 | path: filePath, |
| 849 | firstSeenMs: info.firstSeenMs, |
| 850 | lastSeenMs: info.lastSeenMs, |
| 851 | indexing: this.syncing && this.syncStartedMs >= info.lastSeenMs, |
| 852 | }); |
| 853 | } |
| 854 | return result; |
| 855 | } |
| 856 | } |
| 857 | |
| 858 | /** |
no outgoing calls
no test coverage detected