( draftKey: string, doc: JSONContent )
| 228 | * deferred write that later fails cannot lose the draft. |
| 229 | */ |
| 230 | export 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 | |
| 241 | export function clearMessageInputDraftV2(draftKey: string): void { |
| 242 | draftDocCache.delete(draftKey) |
no test coverage detected