File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
frontend/src/components/editor/ai Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ export const AddCellWithAI: React.FC<{
9999 const ai = useAtomValue ( aiAtom ) ;
100100 const editModel = ai ?. models ?. edit_model || DEFAULT_AI_MODEL ;
101101 const { saveModelChange } = useModelChange ( ) ;
102+ const [ model , setModel ] = useState ( editModel ) ;
102103 const inputRef = useRef < ReactCodeMirrorRef > ( null ) ;
103104 const runtimeConfig = useAtomValue ( runtimeConfigAtom ) ;
104105
@@ -120,6 +121,7 @@ export const AddCellWithAI: React.FC<{
120121 ...completionBody ,
121122 language : language ,
122123 code : "" ,
124+ model : model ,
123125 ...( runtimeConfig . authToken && { osoApiKey : runtimeConfig . authToken } ) ,
124126 } ,
125127 onError : ( error ) => {
@@ -289,6 +291,7 @@ export const AddCellWithAI: React.FC<{
289291 < AIModelDropdown
290292 value = { editModel }
291293 onSelect = { ( model ) => {
294+ setModel ( model ) ;
292295 saveModelChange ( model , "edit" ) ;
293296 } }
294297 triggerClassName = "h-7 text-xs max-w-64"
You can’t perform that action at this time.
0 commit comments