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

Function saveMessageInputDraftV2

src/lib/message-input-draft.ts:230–239  ·  view source on GitHub ↗
(
  draftKey: string,
  doc: JSONContent
)

Source from the content-addressed store, hash-verified

228 * deferred write that later fails cannot lose the draft.
229 */
230export function saveMessageInputDraftV2(
231 draftKey: string,
232 doc: JSONContent
233): void {
234 draftDocCache.set(draftKey, doc)
235 if (typeof window === "undefined") return
236
237 pendingPersistDocs.set(draftKey, doc)
238 scheduleDraftPersistence()
239}
240
241export function clearMessageInputDraftV2(draftKey: string): void {
242 draftDocCache.delete(draftKey)

Callers 2

MessageInputFunction · 0.90

Calls 1

scheduleDraftPersistenceFunction · 0.85

Tested by

no test coverage detected