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

Function saveUnread

apps/kimi-web/src/lib/storage.ts:126–134  ·  view source on GitHub ↗
(changes: Record<string, boolean>)

Source from the content-addressed store, hash-verified

124 * deletes the key (clearing the unread dot).
125 */
126export function saveUnread(changes: Record<string, boolean>): void {
127 const current = loadUnread();
128 const merged: Record<string, boolean> = { ...current };
129 for (const [id, value] of Object.entries(changes)) {
130 if (value) merged[id] = true;
131 else delete merged[id];
132 }
133 safeSetString(STORAGE_KEYS.unread, JSON.stringify(merged));
134}
135
136/**
137 * Collapsed workspace ids in the sidebar. Persisted as a JSON array of ids so

Callers 4

clearActiveUnreadFunction · 0.90
onSessionIdleFunction · 0.90
selectSessionFunction · 0.85

Calls 2

loadUnreadFunction · 0.85
safeSetStringFunction · 0.85

Tested by

no test coverage detected