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

Function parseCount

src/hooks/notifs/useTeammateShutdownNotification.ts:10–16  ·  view source on GitHub ↗
(notif: Notification)

Source from the content-addressed store, hash-verified

8import { isInProcessTeammateTask } from '../../tasks/InProcessTeammateTask/types.js'
9
10function parseCount(notif: Notification): number {
11 if (!('text' in notif)) {
12 return 1
13 }
14 const match = notif.text.match(/^(\d+)/)
15 return match?.[1] ? parseInt(match[1], 10) : 1
16}
17
18function foldSpawn(acc: Notification, _incoming: Notification): Notification {
19 return makeSpawnNotif(parseCount(acc) + 1)

Callers 2

foldSpawnFunction · 0.85
foldShutdownFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected