MCPcopy
hub / github.com/codeaashu/claude-code / flush

Method flush

src/utils/sessionStorage.ts:841–861  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 7

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

Calls 2

drainWriteQueueMethod · 0.95
pushMethod · 0.45

Tested by

no test coverage detected