File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
src/browser/components/ChatInput Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -176,6 +176,15 @@ export const ChatInput: React.FC<ChatInputProps> = (props) => {
176176 [ storageKeys . modelKey , addModel ]
177177 ) ;
178178
179+ // When entering creation mode, always reset the model selection to the global default.
180+ // We don't want manual selections to persist to subsequent workspace creations.
181+ useEffect ( ( ) => {
182+ if ( variant === "creation" && defaultModel ) {
183+ updatePersistedState ( storageKeys . modelKey , defaultModel ) ;
184+ }
185+ // eslint-disable-next-line react-hooks/exhaustive-deps
186+ } , [ ] ) ; // Run once on mount
187+
179188 // Creation-specific state (hook always called, but only used when variant === "creation")
180189 // This avoids conditional hook calls which violate React rules
181190 const creationState = useCreationWorkspace (
You can’t perform that action at this time.
0 commit comments