MCPcopy
hub / github.com/Dimillian/CodexMonitor / loadPinnedThreads

Function loadPinnedThreads

src/features/threads/utils/threadStorage.ts:149–166  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

147}
148
149export function loadPinnedThreads(): PinnedThreadsMap {
150 if (typeof window === "undefined") {
151 return {};
152 }
153 try {
154 const raw = window.localStorage.getItem(STORAGE_KEY_PINNED_THREADS);
155 if (!raw) {
156 return {};
157 }
158 const parsed = JSON.parse(raw) as PinnedThreadsMap;
159 if (!parsed || typeof parsed !== "object") {
160 return {};
161 }
162 return parsed;
163 } catch {
164 return {};
165 }
166}
167
168export function savePinnedThreads(pinned: PinnedThreadsMap) {
169 if (typeof window === "undefined") {

Callers 2

useThreadStorageFunction · 0.90
handleStorageFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected