MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / flush

Method flush

source code/utils/sessionStorage.ts:843–863  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

841 }
842
843 async flush(): Promise<void> {
844 // Cancel pending timer
845 if (this.flushTimer) {
846 clearTimeout(this.flushTimer)
847 this.flushTimer = null
848 }
849 // Wait for any in-flight drain to finish
850 if (this.activeDrain) {
851 await this.activeDrain
852 }
853 // Drain anything remaining in the queues
854 await this.drainWriteQueue()
855
856 // Wait for non-queue tracked operations (e.g. removeMessageByUuid)
857 if (this.pendingWriteCount === 0) {
858 return
859 }
860 return new Promise<void>(resolve => {
861 this.flushResolvers.push(resolve)
862 })
863 }
864
865 /**
866 * Remove a message from the transcript by UUID.

Callers 9

getProjectFunction · 0.45
flushSessionStorageFunction · 0.45
flushAsciicastRecorderFunction · 0.45
flushFunction · 0.45
flushDebugLogsFunction · 0.45
flushFunction · 0.45
flushAndCleanupFunction · 0.45

Calls 1

drainWriteQueueMethod · 0.95

Tested by

no test coverage detected