MCPcopy
hub / github.com/claude-code-best/claude-code / trackOperation

Method trackOperation

src/utils/activityManager.ts:130–140  ·  view source on GitHub ↗

* Convenience method to track an async operation automatically (mainly for testing/debugging)

(
    operationId: string,
    fn: () => Promise<T>,
  )

Source from the content-addressed store, hash-verified

128 * Convenience method to track an async operation automatically (mainly for testing/debugging)
129 */
130 async trackOperation<T>(
131 operationId: string,
132 fn: () => Promise<T>,
133 ): Promise<T> {
134 this.startCLIActivity(operationId)
135 try {
136 return await fn()
137 } finally {
138 this.endCLIActivity(operationId)
139 }
140 }
141
142 /**
143 * Gets current activity states (mainly for testing/debugging)

Callers

nothing calls this directly

Calls 2

startCLIActivityMethod · 0.95
endCLIActivityMethod · 0.95

Tested by

no test coverage detected