MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / loadWorkspaceNameOverrides

Function loadWorkspaceNameOverrides

apps/kimi-web/src/lib/storage.ts:190–198  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

188 * once the daemon accepts a rename for that root.
189 */
190export function loadWorkspaceNameOverrides(): Record<string, string> {
191 const parsed = safeGetJson<unknown>(STORAGE_KEYS.workspaceNameOverrides);
192 if (!parsed || typeof parsed !== 'object') return {};
193 const out: Record<string, string> = {};
194 for (const [root, name] of Object.entries(parsed as Record<string, unknown>)) {
195 if (typeof name === 'string') out[root] = name;
196 }
197 return out;
198}
199
200export function saveWorkspaceNameOverrides(overrides: Record<string, string>): void {
201 safeSetJson(STORAGE_KEYS.workspaceNameOverrides, overrides);

Callers 4

renameWorkspaceFunction · 0.90

Calls 1

safeGetJsonFunction · 0.85

Tested by

no test coverage detected