MCPcopy Create free account
hub / github.com/codeHappyDananx/SpecWave / queueTaskProgressUpdate

Function queueTaskProgressUpdate

src/stores/project.ts:239–251  ·  view source on GitHub ↗
(node: TreeNode, progress: { completed: number; total: number })

Source from the content-addressed store, hash-verified

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

Callers 1

loadTaskProgressForNodesFunction · 0.85

Calls 2

scheduleIdleFunction · 0.85
normalizePathFunction · 0.85

Tested by

no test coverage detected