@@ -45,11 +45,7 @@ import { normalizeChatSplitLayout, type ChatSplitLayout } from "../pages/chat/sp
4545import { parseImportedCustomTheme , type ImportedCustomTheme } from "./custom-theme.ts" ;
4646import { normalizeGatewayTokenScope } from "./gateway-scope.ts" ;
4747import { parseThemeSelection , type ThemeMode , type ThemeName } from "./theme.ts" ;
48- import {
49- hasLocalUserIdentity ,
50- normalizeLocalUserIdentity ,
51- type LocalUserIdentity ,
52- } from "./user-identity.ts" ;
48+ import { normalizeLocalUserIdentity , type LocalUserIdentity } from "./user-identity.ts" ;
5349
5450export const BORDER_RADIUS_STOPS = [ 0 , 25 , 50 , 75 , 100 ] as const ;
5551export type BorderRadiusStop = ( typeof BORDER_RADIUS_STOPS ) [ number ] ;
@@ -129,8 +125,6 @@ export type UiSettings = {
129125 locale ?: string ;
130126} ;
131127
132- export type { LocalUserIdentity } from "./user-identity.ts" ;
133-
134128type LastActiveSessionHost = {
135129 settings : UiSettings ;
136130 applySettings ( next : UiSettings ) : void ;
@@ -668,21 +662,6 @@ export function loadLocalUserIdentity(): LocalUserIdentity {
668662 }
669663}
670664
671- export function saveLocalUserIdentity ( next : LocalUserIdentity ) {
672- const storage = getSafeLocalStorage ( ) ;
673- const normalized = normalizeLocalUserIdentity ( next ) ;
674- try {
675- if ( ! hasLocalUserIdentity ( normalized ) ) {
676- storage ?. removeItem ( LOCAL_USER_IDENTITY_KEY ) ;
677- return ;
678- }
679- storage ?. setItem ( LOCAL_USER_IDENTITY_KEY , JSON . stringify ( normalized ) ) ;
680- } catch {
681- // best-effort — quota exceeded or security restrictions should not
682- // prevent in-memory identity updates from being applied
683- }
684- }
685-
686665function persistSettings ( next : UiSettings , options : { selectGateway ?: boolean } = { } ) {
687666 persistSessionToken ( next . gatewayUrl , next . token ) ;
688667 const storage = getSafeLocalStorage ( ) ;
0 commit comments