From 6e7b57525a85548273e9c3bc0a0da686e370d11f Mon Sep 17 00:00:00 2001 From: Aleksander Grygier Date: Tue, 22 Sep 2026 10:20:42 +0200 Subject: [PATCH] ui : move the provider settings into the settings dialog Assisted-by: pi:llama.cpp/DeepSeek-V4.1-Flash --- .../app/dialogs/DialogManageModels.svelte | 75 +++---------------- .../SidebarNavigationActions.svelte | 14 +++- .../settings/SettingsChat/SettingsChat.svelte | 5 +- .../SettingsChatProvidersTab.svelte | 34 +++++++++ .../src/lib/components/app/settings/index.ts | 6 ++ .../src/lib/constants/settings.constants.ts | 10 ++- tools/ui/src/lib/constants/ui.constants.ts | 2 +- 7 files changed, 75 insertions(+), 71 deletions(-) create mode 100644 tools/ui/src/lib/components/app/settings/SettingsChat/SettingsChatProvidersTab.svelte diff --git a/tools/ui/src/lib/components/app/dialogs/DialogManageModels.svelte b/tools/ui/src/lib/components/app/dialogs/DialogManageModels.svelte index b6b6d45c31..5c86904bac 100644 --- a/tools/ui/src/lib/components/app/dialogs/DialogManageModels.svelte +++ b/tools/ui/src/lib/components/app/dialogs/DialogManageModels.svelte @@ -1,19 +1,9 @@ + +
+

Endpoints this UI can talk to.

+ + (protocol = value as BackendProtocol)} + value={protocol} + > + + {#each PROTOCOL_TABS as protocolTab (protocolTab.value)} + {protocolTab.label} + {/each} + + + {#each PROTOCOL_TABS as protocolTab (protocolTab.value)} + + + + {/each} + +
diff --git a/tools/ui/src/lib/components/app/settings/index.ts b/tools/ui/src/lib/components/app/settings/index.ts index 7473e6af8e..2b40e948b6 100644 --- a/tools/ui/src/lib/components/app/settings/index.ts +++ b/tools/ui/src/lib/components/app/settings/index.ts @@ -74,3 +74,9 @@ export { default as SettingsChatFields } from './SettingsChat/SettingsChatFields * server favicons and permission management controls. */ export { default as SettingsChatToolsTab } from './SettingsChat/SettingsChatToolsTab.svelte'; + +/** + * Providers panel for chat settings. Switches between the llama.cpp and + * OpenAI-compatible protocols and lists the endpoints configured for each. + */ +export { default as SettingsChatProvidersTab } from './SettingsChat/SettingsChatProvidersTab.svelte'; diff --git a/tools/ui/src/lib/constants/settings.constants.ts b/tools/ui/src/lib/constants/settings.constants.ts index b08781e54d..361279d2ba 100644 --- a/tools/ui/src/lib/constants/settings.constants.ts +++ b/tools/ui/src/lib/constants/settings.constants.ts @@ -11,6 +11,7 @@ import { Monitor, Moon, PencilRuler, + Server, SlidersVertical, Sun } from '@lucide/svelte'; @@ -28,7 +29,7 @@ import type { /** Settings sections — slug is the routing identity, title is the display label. */ export const SETTINGS_SECTIONS = { AGENTIC: { slug: 'agentic', title: 'Agentic' }, - BACKENDS: { slug: 'backends', title: 'Backends' }, + BACKENDS: { slug: 'backends', title: 'Providers' }, DEVELOPER: { slug: 'developer', title: 'Developer' }, DISPLAY: { slug: 'display', title: 'Display' }, GENERAL: { slug: 'general', title: 'General' }, @@ -196,6 +197,13 @@ export const SETTINGS_REGISTRY: SettingsSectionEntry[] = [ slug: SETTINGS_SECTION_SLUGS.GENERAL, title: SETTINGS_SECTION_TITLES.GENERAL }, + // Providers + { + icon: Server, + settings: [], + slug: SETTINGS_SECTION_SLUGS.BACKENDS, + title: SETTINGS_SECTION_TITLES.BACKENDS + }, // Display { icon: Monitor, diff --git a/tools/ui/src/lib/constants/ui.constants.ts b/tools/ui/src/lib/constants/ui.constants.ts index 8199f187eb..ea4ad03042 100644 --- a/tools/ui/src/lib/constants/ui.constants.ts +++ b/tools/ui/src/lib/constants/ui.constants.ts @@ -81,7 +81,7 @@ export const SIDEBAR_ACTIONS_ITEMS: DesktopIconStripItem[] = [ { action: SidebarAction.MANAGE_MODELS, icon: Boxes, - tooltip: 'Manage models' + tooltip: 'Discover models' }, { action: SidebarAction.SETTINGS,