()
| 188 | * once the daemon accepts a rename for that root. |
| 189 | */ |
| 190 | export 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 | |
| 200 | export function saveWorkspaceNameOverrides(overrides: Record<string, string>): void { |
| 201 | safeSetJson(STORAGE_KEYS.workspaceNameOverrides, overrides); |
no test coverage detected