MCPcopy
hub / github.com/21st-dev/1code / loadGlobalDrafts

Function loadGlobalDrafts

src/renderer/features/agents/lib/drafts.ts:83–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81
82// Load all drafts from localStorage
83export function loadGlobalDrafts(): GlobalDraftsRaw {
84 if (typeof window === "undefined") return {}
85 try {
86 const stored = localStorage.getItem(DRAFTS_STORAGE_KEY)
87 return stored ? JSON.parse(stored) : {}
88 } catch {
89 return {}
90 }
91}
92
93// Save all drafts to localStorage
94export function saveGlobalDrafts(drafts: GlobalDraftsRaw): void {

Callers 11

NewChatFormFunction · 0.90
getNewChatDraftsFunction · 0.85
saveNewChatDraftFunction · 0.85
deleteNewChatDraftFunction · 0.85
markDraftVisibleFunction · 0.85
getSubChatDraftFunction · 0.85
saveSubChatDraftFunction · 0.85
clearSubChatDraftFunction · 0.85
buildDraftsCacheFunction · 0.85
getSubChatDraftFullFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected