feat(webui): improve model and provider settings UX (#6145)

* feat(webui): improve model and provider settings UX

* refactor(webui): organize provider forms and model picker interactions

* fix(webui): separate OAuth credentials from provider configuration

* fix(webui): stabilize shared combobox navigation

* refactor(config): store provider connections as sparse entries

* fix(webui): preserve provider validation and isolate catalog tests

* refactor(config): manage explicit provider connections

* refactor(webui): decouple settings UX from provider removal

* fix(webui): select current combobox options during rapid input

* feat(webui): refine model preset and provider management

* style(webui): refine preset footer actions

* fix(webui): align model settings with responsive layout rules

* refactor(webui): finalize preset dialogs and simplify provider state

* fix(webui): keep fallback heading stable while sorting presets

Animate card dimensions without changing layout height and keep the section heading outside sortable cards. Remove proxy normalization from this PR.

* docs: update WebUI model and provider setup instructions

* docs: start model setup from new preset

* docs: remove duplicate WebUI model setup instructions
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-11 04:30:43 +08:00
1 parent 8080ea843a
commit 9261e731ce
88 files changed
+2854 -1734

No files matched your search

+10 -13
View File
@@ -29,7 +29,7 @@ import {
SidebarSelectionHighlight,
} from "@/components/SidebarSelectionHighlight";
import { Button } from "@/components/ui/button";
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
import { HoverHint } from "@/components/ui/tooltip";
import type {
ChatSummary,
SidebarViewState,
@@ -149,7 +149,6 @@ export function Sidebar(props: SidebarProps) {
return (
<TooltipProvider>
<nav
ref={props.containActionMenus ? setMenuPortalContainer : undefined}
aria-label={t("sidebar.navigation")}
@@ -174,7 +173,7 @@ export function Sidebar(props: SidebarProps) {
onClick={collapsed ? props.onExpand : undefined}
tabIndex={collapsed ? 0 : -1}
className={cn(
"host-no-drag flex h-8 w-8 shrink-0 items-center justify-center rounded-xl transition-colors",
"host-no-drag flex h-8 w-8 shrink-0 items-center justify-center rounded-control transition-colors",
props.hostChromeInset && "mt-5",
!collapsed && "pointer-events-none",
)}
@@ -333,7 +332,6 @@ export function Sidebar(props: SidebarProps) {
<HostSwitcher collapsed={collapsed} portalContainer={props.containActionMenus ? menuPortalContainer : undefined} />
</div>
</nav>
</TooltipProvider>
);
}
@@ -376,11 +374,11 @@ function SidebarActionButton({
onFocus={onIntent}
onPointerEnter={onIntent}
className={cn(
"touch-target group h-8 min-w-0 gap-2 overflow-hidden rounded-xl font-normal",
"touch-target group h-8 min-w-0 gap-2 overflow-hidden rounded-control font-normal",
SIDEBAR_SELECTION_ACTION_ITEM_CLASS,
collapsed
? "w-8 justify-center gap-0 px-0"
: iconOnly ? "w-8 shrink-0 justify-center gap-0 rounded-xl px-0"
: iconOnly ? "w-8 shrink-0 justify-center gap-0 rounded-control px-0"
: "w-full justify-start gap-2 px-2 text-[13px] leading-5 [&_svg]:h-[18px] [&_svg]:w-[18px] [&_svg]:stroke-[1.75]",
active
? "text-sidebar-accent-foreground"
@@ -399,12 +397,11 @@ function SidebarActionButton({
</Button>
);
return compact || shortcut ? (
<Tooltip>
<TooltipTrigger asChild>{button}</TooltipTrigger>
<TooltipContent side={collapsed ? "right" : "bottom"} className="flex items-center gap-4">
<span>{label}</span>
{shortcut ? <kbd className="whitespace-nowrap font-sans text-muted-foreground">{shortcut}</kbd> : null}
</TooltipContent>
</Tooltip>
<HoverHint side={collapsed ? "right" : "bottom"} contentClassName="flex items-center gap-4" content={<>
<span>{label}</span>
{shortcut ? <kbd className="whitespace-nowrap font-sans text-muted-foreground">{shortcut}</kbd> : null}
</>}>
{button}
</HoverHint>
) : button;
}