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

Function saveCustomName

src/features/threads/utils/threadStorage.ts:128–143  ·  view source on GitHub ↗
(workspaceId: string, threadId: string, name: string)

Source from the content-addressed store, hash-verified

126}
127
128export function saveCustomName(workspaceId: string, threadId: string, name: string): void {
129 if (typeof window === "undefined") {
130 return;
131 }
132 try {
133 const current = loadCustomNames();
134 const key = makeCustomNameKey(workspaceId, threadId);
135 current[key] = name;
136 window.localStorage.setItem(
137 STORAGE_KEY_CUSTOM_NAMES,
138 JSON.stringify(current),
139 );
140 } catch {
141 // Best-effort persistence.
142 }
143}
144
145export function makePinKey(workspaceId: string, threadId: string): string {
146 return `${workspaceId}:${threadId}`;

Callers 1

useThreadsFunction · 0.90

Calls 2

loadCustomNamesFunction · 0.85
makeCustomNameKeyFunction · 0.85

Tested by

no test coverage detected