MCPcopy Create free account
hub / github.com/xintaofei/codeg / clearMessageInputDraftV2

Function clearMessageInputDraftV2

src/lib/message-input-draft.ts:241–253  ·  view source on GitHub ↗
(draftKey: string)

Source from the content-addressed store, hash-verified

239}
240
241export function clearMessageInputDraftV2(draftKey: string): void {
242 draftDocCache.delete(draftKey)
243 pendingPersistDocs.delete(draftKey)
244 // Also drop any legacy v1 draft so a cleared composer stays cleared.
245 clearMessageInputDraft(draftKey)
246 if (typeof window === "undefined") return
247
248 try {
249 localStorage.removeItem(storageKeyForDraftKeyV2(draftKey))
250 } catch {
251 /* ignore */
252 }
253}

Callers 2

MessageInputFunction · 0.90

Calls 2

clearMessageInputDraftFunction · 0.85
storageKeyForDraftKeyV2Function · 0.85

Tested by

no test coverage detected