Stable identity for grid rows: same file path = one row (handles duplicate DB ids).
(model)
| 1325 | let contextUseCount = 0; |
| 1326 | const MAX_CONTEXT_USES = 20; // Reset context after this many uses |
| 1327 | const MAX_CONTEXT_REUSE_COUNT = 100; // Add this missing constant |
| 1328 | |
| 1329 | // Debounce total-count IPC: progressive library load calls updateModelCounts every chunk; one fetch is enough. |
| 1330 | let updateTotalCountDebounce = null; |
| 1331 | function scheduleTotalModelCountRefresh() { |
| 1332 | if (updateTotalCountDebounce) clearTimeout(updateTotalCountDebounce); |
| 1333 | updateTotalCountDebounce = setTimeout(async () => { |
| 1334 | updateTotalCountDebounce = null; |
| 1335 | try { |
| 1336 | const totalCount = await window.electron.getTotalModelCount(); |
no test coverage detected