refactor(desktop): drop per-session icons, read-only cross-profile reads
The per-session icon picker added more noise than value — rip it out end to end (sessions.icon column, set_session_icon, the PATCH field, the picker UI, and the SessionInfo.icon type). The cross-profile session aggregator now opens each profile's state.db read-only (mode=ro, no schema init), so listing other profiles on every sidebar refresh never DDLs or takes a write lock on their live DBs. The single-profile hot path stays on par with /api/sessions.
This commit is contained in:
@@ -209,20 +209,6 @@ export function renameSession(
|
||||
})
|
||||
}
|
||||
|
||||
// Set ("" clears) a per-session icon glyph. `profile` targets another profile's
|
||||
// session (the backend opens its state.db). Omit for the current profile.
|
||||
export function setSessionIcon(
|
||||
id: string,
|
||||
icon: string,
|
||||
profile?: string | null
|
||||
): Promise<{ ok: boolean; icon: string | null }> {
|
||||
return window.hermesDesktop.api<{ ok: boolean; icon: string | null }>({
|
||||
path: `/api/sessions/${encodeURIComponent(id)}`,
|
||||
method: 'PATCH',
|
||||
body: { icon, ...(profile ? { profile } : {}) }
|
||||
})
|
||||
}
|
||||
|
||||
export function getGlobalModelInfo(): Promise<ModelInfoResponse> {
|
||||
return window.hermesDesktop.api<ModelInfoResponse>({
|
||||
...profileScoped(),
|
||||
|
||||
Reference in New Issue
Block a user