MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / isUserActive

Function isUserActive

cli/src/utils/activity-tracker.ts:38–40  ·  view source on GitHub ↗
(idleThresholdMs: number = 30_000)

Source from the content-addressed store, hash-verified

36 * @param idleThresholdMs - Time in ms to consider user idle (default: 30 seconds)
37 */
38export function isUserActive(idleThresholdMs: number = 30_000): boolean {
39 return Date.now() - lastActivityTime < idleThresholdMs
40}
41
42/**
43 * Get the time in ms since the last activity.

Callers 4

useGravityAdFunction · 0.90
tickFunction · 0.90
useActivityQueryFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected