@@ -120,10 +120,7 @@ export const loadSession = createAsyncThunk<
120120 dispatch ( newSession ( session ) ) ;
121121
122122 // Restore selected chat model from session, if present
123- const chatModelTitle = ( session as any ) . chatModelTitle as
124- | string
125- | null
126- | undefined ;
123+ const chatModelTitle = session . chatModelTitle ;
127124 if ( chatModelTitle ) {
128125 const state = getState ( ) ;
129126 const org = state . profiles . organizations . find (
@@ -140,7 +137,7 @@ export const loadSession = createAsyncThunk<
140137 role : "chat" ,
141138 modelTitle : chatModelTitle ,
142139 selectedProfile,
143- } ) as any ,
140+ } ) ,
144141 ) ;
145142 }
146143 }
@@ -173,10 +170,7 @@ export const loadRemoteSession = createAsyncThunk<
173170 dispatch ( newSession ( session ) ) ;
174171
175172 // Restore selected chat model from session, if present
176- const chatModelTitle = ( session as any ) . chatModelTitle as
177- | string
178- | null
179- | undefined ;
173+ const chatModelTitle = session . chatModelTitle ;
180174 if ( chatModelTitle ) {
181175 const state = getState ( ) ;
182176 const org = state . profiles . organizations . find (
@@ -193,7 +187,7 @@ export const loadRemoteSession = createAsyncThunk<
193187 role : "chat" ,
194188 modelTitle : chatModelTitle ,
195189 selectedProfile,
196- } ) as any ,
190+ } ) ,
197191 ) ;
198192 }
199193 }
@@ -228,10 +222,7 @@ export const loadLastSession = createAsyncThunk<void, void, ThunkApiType>(
228222 dispatch ( newSession ( session ) ) ;
229223
230224 // Restore selected chat model from session, if present
231- const chatModelTitle = ( session as any ) . chatModelTitle as
232- | string
233- | null
234- | undefined ;
225+ const chatModelTitle = session . chatModelTitle ;
235226 if ( chatModelTitle ) {
236227 const state = getState ( ) ;
237228 const org = state . profiles . organizations . find (
@@ -248,7 +239,7 @@ export const loadLastSession = createAsyncThunk<void, void, ThunkApiType>(
248239 role : "chat" ,
249240 modelTitle : chatModelTitle ,
250241 selectedProfile,
251- } ) as any ,
242+ } ) ,
252243 ) ;
253244 }
254245 }
@@ -339,7 +330,7 @@ export const saveCurrentSession = createAsyncThunk<
339330 history : state . session . history ,
340331 mode : state . session . mode ,
341332 chatModelTitle : selectedChatModel ?. title ?? null ,
342- } as Session ;
333+ } ;
343334
344335 const result = await dispatch ( updateSession ( session ) ) ;
345336 unwrapResult ( result ) ;
0 commit comments