MCPcopy
hub / github.com/anomalyco/opencode / collect

Function collect

packages/desktop/src/main/unresponsive.ts:27–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25 }
26
27 const collect = async () => {
28 if (!active()) return
29 const stack = await win.webContents.mainFrame.collectJavaScriptCallStack().catch((error) => {
30 writeLog("window", "failed to collect unresponsive sample", { window: name, error }, "error")
31 return undefined
32 })
33 if (!active()) return
34 if (stack) samples.set(stack, (samples.get(stack) ?? 0) + 1)
35 schedule()
36 }
37
38 const stopAndFlush = () => {
39 const wasSampling = sampling

Callers 1

scheduleFunction · 0.70

Calls 4

activeFunction · 0.70
scheduleFunction · 0.70
getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected