MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / startPolling

Method startPolling

source code/utils/task/TaskOutput.ts:83–93  ·  view source on GitHub ↗

* Begin polling the output file for progress. Called from React * useEffect when the progress component mounts.

(taskId: string)

Source from the content-addressed store, hash-verified

81 * useEffect when the progress component mounts.
82 */
83 static startPolling(taskId: string): void {
84 const instance = TaskOutput.#registry.get(taskId)
85 if (!instance || !instance.#onProgress) {
86 return
87 }
88 TaskOutput.#activePolling.set(taskId, instance)
89 if (!TaskOutput.#pollInterval) {
90 TaskOutput.#pollInterval = setInterval(TaskOutput.#tick, POLL_INTERVAL_MS)
91 TaskOutput.#pollInterval.unref()
92 }
93 }
94
95 /**
96 * Stop polling the output file. Called from React useEffect cleanup

Callers 2

runPowerShellCommandFunction · 0.80
runShellCommandFunction · 0.80

Calls 2

setMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected