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

Function consume

src/bridge/bridgeDebug.ts:87–94  ·  view source on GitHub ↗
(method: BridgeFault['method'])

Source from the content-addressed store, hash-verified

85 api: BridgeApiClient,
86): BridgeApiClient {
87 function consume(method: BridgeFault['method']): BridgeFault | null {
88 const idx = faultQueue.findIndex(f => f.method === method)
89 if (idx === -1) return null
90 const fault = faultQueue[idx]!
91 fault.count--
92 if (fault.count <= 0) faultQueue.splice(idx, 1)
93 return fault
94 }
95
96 function throwFault(fault: BridgeFault, context: string): never {
97 logForDebugging(

Callers 4

pollForWorkFunction · 0.85
reconnectSessionFunction · 0.85
heartbeatWorkFunction · 0.85

Calls 1

spliceMethod · 0.80

Tested by

no test coverage detected