* Sort comparator: lastModified desc, then sessionId desc for stable * ordering across mtime ties.
(a: Candidate, b: Candidate)
| 228 | * ordering across mtime ties. |
| 229 | */ |
| 230 | function compareDesc(a: Candidate, b: Candidate): number { |
| 231 | if (b.mtime !== a.mtime) return b.mtime - a.mtime |
| 232 | return b.sessionId < a.sessionId ? -1 : b.sessionId > a.sessionId ? 1 : 0 |
| 233 | } |
| 234 | |
| 235 | async function applySortAndLimit( |
| 236 | candidates: Candidate[], |
nothing calls this directly
no outgoing calls
no test coverage detected