MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / flush

Method flush

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

Source from the content-addressed store, hash-verified

861 }
862
863 async flush(): Promise<void> {
864 // Cancel pending timer
865 if (this.flushTimer) {
866 clearTimeout(this.flushTimer)
867 this.flushTimer = null
868 }
869 // Wait for any in-flight drain to finish
870 if (this.activeDrain) {
871 await this.activeDrain
872 }
873 // Drain anything remaining in the queues
874 await this.drainWriteQueue()
875
876 // Wait for non-queue tracked operations (e.g. removeMessageByUuid)
877 if (this.pendingWriteCount === 0) {
878 return
879 }
880 return new Promise<void>(resolve => {
881 this.flushResolvers.push(resolve)
882 })
883 }
884
885 /**
886 * Remove a message from the transcript by UUID.

Callers 9

getProjectFunction · 0.45
flushSessionStorageFunction · 0.45
flushFunction · 0.45
flushDebugLogsFunction · 0.45
flushFunction · 0.45
writeToStdinMethod · 0.45
flushAndCleanupFunction · 0.45

Calls 2

drainWriteQueueMethod · 0.95
pushMethod · 0.45

Tested by

no test coverage detected