MCPcopy Index your code
hub / github.com/xintaofei/codeg / scheduleDraftPersistence

Function scheduleDraftPersistence

src/lib/message-input-draft.ts:112–126  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

110}
111
112function scheduleDraftPersistence(): void {
113 if (typeof window === "undefined") return
114 if (idlePersistHandle != null) return
115
116 ensurePersistenceListeners()
117 if ("requestIdleCallback" in window) {
118 idlePersistHandle = window.requestIdleCallback(() => {
119 flushPendingDraftPersistence()
120 })
121 return
122 }
123
124 // Fallback for runtimes without requestIdleCallback.
125 flushPendingDraftPersistence()
126}
127
128export function buildConversationDraftStorageKey(
129 conversationId: number

Callers 2

saveMessageInputDraftFunction · 0.85
saveMessageInputDraftV2Function · 0.85

Calls 2

Tested by

no test coverage detected