MCPcopy Create free account
hub / github.com/freecodexyz/free-code / getActivityStates

Method getActivityStates

src/utils/activityManager.ts:145–160  ·  view source on GitHub ↗

* Gets current activity states (mainly for testing/debugging)

()

Source from the content-addressed store, hash-verified

143 * Gets current activity states (mainly for testing/debugging)
144 */
145 getActivityStates(): {
146 isUserActive: boolean
147 isCLIActive: boolean
148 activeOperationCount: number
149 } {
150 const now = this.getNow()
151 const timeSinceUserActivity = (now - this.lastUserActivityTime) / 1000
152 const isUserActive =
153 timeSinceUserActivity < this.USER_ACTIVITY_TIMEOUT_MS / 1000
154
155 return {
156 isUserActive,
157 isCLIActive: this.isCLIActive,
158 activeOperationCount: this.activeOperations.size,
159 }
160 }
161}
162
163// Export singleton instance

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected