MCPcopy Create free account
hub / github.com/codeaashu/claude-code / start

Function start

src/utils/idleTimeout.ts:24–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22
23 return {
24 start() {
25 // Clear any existing timer
26 if (timer) {
27 clearTimeout(timer)
28 timer = null
29 }
30
31 // Only start timer if delay is configured and valid
32 if (isValidDelay) {
33 lastIdleTime = Date.now()
34
35 timer = setTimeout(() => {
36 // Check if we've been continuously idle for the full duration
37 const idleDuration = Date.now() - lastIdleTime
38 if (isIdle() && idleDuration >= delayMs) {
39 logForDebugging(`Exiting after ${delayMs}ms of idle time`)
40 gracefulShutdownSync()
41 }
42 }, delayMs)
43 }
44 },
45
46 stop() {
47 if (timer) {

Callers

nothing calls this directly

Calls 2

logForDebuggingFunction · 0.85
gracefulShutdownSyncFunction · 0.85

Tested by

no test coverage detected