webui: apply webui_settings on first load (#18223)
* webui: apply webui_settings on first load The webui_settings from /props were not applied on initial load when default_generation_settings.params was null Now syncs whenever serverProps is available, regardless of params, works for both single-model and router modes * chore: update webui build output
This commit is contained in:
Binary file not shown.
@@ -294,15 +294,14 @@ class SettingsStore {
|
|||||||
* This sets up the default values from /props endpoint
|
* This sets up the default values from /props endpoint
|
||||||
*/
|
*/
|
||||||
syncWithServerDefaults(): void {
|
syncWithServerDefaults(): void {
|
||||||
const serverParams = serverStore.defaultParams;
|
const propsDefaults = this.getServerDefaults();
|
||||||
if (!serverParams) {
|
|
||||||
console.warn('No server parameters available for initialization');
|
if (Object.keys(propsDefaults).length === 0) {
|
||||||
|
console.warn('No server defaults available for initialization');
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const propsDefaults = this.getServerDefaults();
|
|
||||||
|
|
||||||
for (const [key, propsValue] of Object.entries(propsDefaults)) {
|
for (const [key, propsValue] of Object.entries(propsDefaults)) {
|
||||||
const currentValue = getConfigValue(this.config, key);
|
const currentValue = getConfigValue(this.config, key);
|
||||||
|
|
||||||
|
|||||||
@@ -119,7 +119,7 @@
|
|||||||
$effect(() => {
|
$effect(() => {
|
||||||
const serverProps = serverStore.props;
|
const serverProps = serverStore.props;
|
||||||
|
|
||||||
if (serverProps?.default_generation_settings?.params) {
|
if (serverProps) {
|
||||||
settingsStore.syncWithServerDefaults();
|
settingsStore.syncWithServerDefaults();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user