File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9292 return normalized ;
9393 });
9494
95+ let paramsReady = $state (false );
96+
9597 // Initialize default params when model changes
9698 $effect (() => {
99+ paramsReady = false ;
97100 if (currentModel ) {
98101 const defaults: Record <string , any > = {};
99102
180183
181184 // Update parent bindable
182185 Object .assign (imageParams , newParams );
186+ paramsReady = true ;
183187 });
188+ } else {
189+ paramsReady = true ;
184190 }
185191 });
186192 </script >
204210 Please select an image model in the chat to configure settings.
205211 </div >
206212 {:else }
213+ {#if ! paramsReady }
214+ <div class =" text-muted-foreground p-4 text-center text-sm" >Loading settings...</div >
215+ {:else }
207216 <!-- Resolution selector -->
208217 {#if currentModel .resolutions && currentModel .resolutions .length > 0 }
209218 <div class =" flex flex-col gap-2" >
300309 No configurable settings for this model.
301310 </div >
302311 {/if }
312+ {/if }
303313 {/if }
304314
305315 <div class =" flex justify-end pt-4" >
Original file line number Diff line number Diff line change 9292 return normalized ;
9393 });
9494
95+ let paramsReady = $state (false );
96+
9597 // Initialize default params when model changes
9698 $effect (() => {
99+ paramsReady = false ;
97100 if (currentModel ) {
98101 const defaults: Record <string , any > = {};
99102
145148 }
146149 // Update parent bindable
147150 Object .assign (videoParams , newParams );
151+ paramsReady = true ;
148152 });
153+ } else {
154+ paramsReady = true ;
149155 }
150156 });
151157 </script >
168174 <div class =" text-muted-foreground p-4 text-center text-sm" >
169175 Please select a video capable model in the chat to configure settings.
170176 </div >
177+ {:else if ! paramsReady }
178+ <div class =" text-muted-foreground p-4 text-center text-sm" >Loading settings...</div >
171179 {:else if normalizedParams .length > 0 }
172180 {#each normalizedParams as param }
173181 <div class =" flex flex-col gap-2" >
You can’t perform that action at this time.
0 commit comments