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

Function clearMessageInputDraft

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

Source from the content-addressed store, hash-verified

167}
168
169export function clearMessageInputDraft(draftKey: string): void {
170 draftTextCache.delete(draftKey)
171 pendingPersistDrafts.delete(draftKey)
172 if (typeof window === "undefined") return
173
174 try {
175 localStorage.removeItem(storageKeyForDraftKey(draftKey))
176 } catch {
177 /* ignore */
178 }
179}
180
181/**
182 * Result of loading a v2 draft: a parsed composer document, a legacy v1 Markdown

Callers 4

saveMessageInputDraftFunction · 0.85
clearMessageInputDraftV2Function · 0.85

Calls 1

storageKeyForDraftKeyFunction · 0.85

Tested by

no test coverage detected