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

Function isIdleNotification

src/utils/teammateMailbox.ts:435–447  ·  view source on GitHub ↗
(
  messageText: string,
)

Source from the content-addressed store, hash-verified

433 * Checks if a message text contains an idle notification
434 */
435export function isIdleNotification(
436 messageText: string,
437): IdleNotificationMessage | null {
438 try {
439 const parsed = jsonParse(messageText)
440 if (parsed && parsed.type === 'idle_notification') {
441 return parsed as IdleNotificationMessage
442 }
443 } catch {
444 // Not JSON or not a valid idle notification
445 }
446 return null
447}
448
449/**
450 * Permission request message sent from worker to leader via mailbox.

Callers 1

Calls 1

jsonParseFunction · 0.85

Tested by

no test coverage detected