MCPcopy Index your code
hub / github.com/codeaashu/claude-code / startPolling

Method startPolling

src/utils/task/TaskOutput.ts:81–91  ·  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

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

Callers 2

runPowerShellCommandFunction · 0.80
runShellCommandFunction · 0.80

Calls 2

getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected