MCPcopy Index your code
hub / github.com/codeaashu/claude-code / startPreventSleep

Function startPreventSleep

src/services/preventSleep.ts:36–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34 * Call this when starting work that should keep the Mac awake.
35 */
36export function startPreventSleep(): void {
37 refCount++
38
39 if (refCount === 1) {
40 spawnCaffeinate()
41 startRestartInterval()
42 }
43}
44
45/**
46 * Decrement the reference count and allow sleep if no more work is pending.

Callers 1

REPLFunction · 0.85

Calls 2

spawnCaffeinateFunction · 0.85
startRestartIntervalFunction · 0.85

Tested by

no test coverage detected