MCPcopy
hub / github.com/claude-code-best/claude-code / drainInbox

Function drainInbox

src/utils/udsMessaging.ts:299–306  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

297 * Drain all pending inbox messages and release retained history.
298 */
299export function drainInbox(): UdsInboxEntry[] {
300 const pending = inbox.splice(0, inbox.length)
301 inboxBytes = 0
302 for (const entry of pending) {
303 entry.status = 'processed'
304 }
305 return pending
306}
307
308function getMessageBytes(message: UdsMessage): number {
309 return Buffer.byteLength(jsonStringify(message), 'utf8')

Callers 2

enqueueUdsInboxMessagesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected