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

Function loadCollapsedWorkspaces

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

Source from the content-addressed store, hash-verified

139 * server-side source of truth for this UI-only state.
140 */
141export function loadCollapsedWorkspaces(): string[] {
142 const parsed = safeGetJson<unknown>(STORAGE_KEYS.collapsedWorkspaces);
143 if (!Array.isArray(parsed)) return [];
144 return parsed.filter((id): id is string => typeof id === 'string');
145}
146
147export function saveCollapsedWorkspaces(ids: Iterable<string>): void {
148 safeSetJson(STORAGE_KEYS.collapsedWorkspaces, Array.from(ids));

Callers 1

Calls 1

safeGetJsonFunction · 0.85

Tested by

no test coverage detected