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

Function loadCustomNames

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

Source from the content-addressed store, hash-verified

107}
108
109export function loadCustomNames(): CustomNamesMap {
110 if (typeof window === "undefined") {
111 return {};
112 }
113 try {
114 const raw = window.localStorage.getItem(STORAGE_KEY_CUSTOM_NAMES);
115 if (!raw) {
116 return {};
117 }
118 const parsed = JSON.parse(raw) as CustomNamesMap;
119 if (!parsed || typeof parsed !== "object") {
120 return {};
121 }
122 return parsed;
123 } catch {
124 return {};
125 }
126}
127
128export function saveCustomName(workspaceId: string, threadId: string, name: string): void {
129 if (typeof window === "undefined") {

Callers 3

useThreadStorageFunction · 0.90
handleStorageFunction · 0.90
saveCustomNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected