(node: TreeNode, progress: { completed: number; total: number })
| 237 | } |
| 238 | |
| 239 | function queueTaskProgressUpdate(node: TreeNode, progress: { completed: number; total: number }) { |
| 240 | pendingTaskProgressUpdates.push({ node, progress }) |
| 241 | if (taskProgressFlushPending) return |
| 242 | taskProgressFlushPending = true |
| 243 | scheduleIdle(() => { |
| 244 | taskProgressFlushPending = false |
| 245 | const updates = pendingTaskProgressUpdates.splice(0, pendingTaskProgressUpdates.length) |
| 246 | for (const update of updates) { |
| 247 | update.node.progress = update.progress |
| 248 | taskProgressCache.set(normalizePath(update.node.path || ''), update.progress) |
| 249 | } |
| 250 | }) |
| 251 | } |
| 252 | |
| 253 | async function loadTaskProgressForNodes(nodes: TreeNode[], phase: 'initial' | 'background') { |
| 254 | if (!projectPath.value || !isElectron()) return |
no test coverage detected