perf(webui): streamline model preset saves (#6631)

* perf(webui): streamline model preset saves

* fix(webui): type optional settings usage payload
This commit is contained in:
chengyongru authored and GitHub committed 2026-11-11 22:02:42 +08:00
1 parent 3c61bcfdf0
commit 28d73b6942
10 files changed
+174 -59

No files matched your search

@@ -82,7 +82,7 @@ export function useSettingsController({
onNativeEngineRestart,
}: SettingsControllerOptions) {
const { t } = useTranslation();
const { client, getToken, token } = useClient();
const { client, getToken, token, webuiCapabilities } = useClient();
const pageVisible = usePageVisibility();
const remoteBrowserAccess =
typeof window !== "undefined" && !isLoopbackHost(window.location.hostname);
@@ -433,6 +433,7 @@ export function useSettingsController({
setError,
onModelNameChange,
remoteBrowserAccess,
optimizedPresetSave: webuiCapabilities.includes("webui.model-preset-save.v1"),
closeProviderOAuthFlow,
installCapabilities,
configuredModelProviderOptions,