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

Method startCLIActivity

src/utils/activityManager.ts:86–101  ·  view source on GitHub ↗

* Starts tracking CLI activity (tool execution, AI response, etc.)

(operationId: string)

Source from the content-addressed store, hash-verified

84 * Starts tracking CLI activity (tool execution, AI response, etc.)
85 */
86 startCLIActivity(operationId: string): void {
87 // If operation already exists, it likely means the previous one didn't clean up
88 // properly (e.g., component crashed/unmounted without calling end). Force cleanup
89 // to avoid overestimating time - better to underestimate than overestimate.
90 if (this.activeOperations.has(operationId)) {
91 this.endCLIActivity(operationId)
92 }
93
94 const wasEmpty = this.activeOperations.size === 0
95 this.activeOperations.add(operationId)
96
97 if (wasEmpty) {
98 this.isCLIActive = true
99 this.lastCLIRecordedTime = this.getNow()
100 }
101 }
102
103 /**
104 * Stops tracking CLI activity

Callers 3

trackOperationMethod · 0.95
SpinnerWithVerbInnerFunction · 0.80
BriefSpinnerFunction · 0.80

Calls 3

endCLIActivityMethod · 0.95
hasMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected