File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
apps/twig/src/renderer/features/sessions/service Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import type {
44 SessionConfigOption ,
55} from "@agentclientprotocol/sdk" ;
66import { useAuthStore } from "@features/auth/stores/authStore" ;
7+ import { useModelsStore } from "@features/sessions/stores/modelsStore" ;
78import { useSessionAdapterStore } from "@features/sessions/stores/sessionAdapterStore" ;
89import {
910 getPersistedConfigOptions ,
@@ -401,6 +402,16 @@ export class SessionService {
401402 execution_type : "local" ,
402403 } ) ;
403404
405+ // Set the user's preferred model if available
406+ const preferredModel = useModelsStore . getState ( ) . getEffectiveModel ( ) ;
407+ if ( preferredModel ) {
408+ await this . setSessionConfigOptionByCategory (
409+ taskId ,
410+ "model" ,
411+ preferredModel ,
412+ ) ;
413+ }
414+
404415 if ( initialPrompt ?. length ) {
405416 await this . sendPrompt ( taskId , initialPrompt ) ;
406417 }
You can’t perform that action at this time.
0 commit comments