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:
1 parent
8080ea843a
commit
9261e731ce
88 files changed
+2854
-1734
No files matched your search
@@ -21,12 +21,7 @@ import { SlashCommandText } from "@/components/SlashCommandText";
|
||||
import { ReasoningRow } from "@/components/thread/activity/ReasoningRow";
|
||||
import { ContextCompactionNotice } from "@/components/thread/ContextCompactionNotice";
|
||||
import { UserMessageText } from "@/components/UserMessageText";
|
||||
import {
|
||||
Tooltip,
|
||||
TooltipContent,
|
||||
TooltipProvider,
|
||||
TooltipTrigger,
|
||||
} from "@/components/ui/tooltip";
|
||||
import { HoverHint } from "@/components/ui/tooltip";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { copyTextToClipboard } from "@/lib/clipboard";
|
||||
import { formatMessageEndTime } from "@/lib/format";
|
||||
@@ -124,7 +119,7 @@ export function MessageCopyButton({ message, className }: { message: UIMessage;
|
||||
const content = messageCopyContent(message, t);
|
||||
const { copied, label, onCopy } = useMessageCopy(content);
|
||||
if (!content.trim()) return null;
|
||||
return <TooltipProvider><Tooltip><TooltipTrigger asChild><button type="button" data-message-block-copy-action
|
||||
return <HoverHint content={label} side="top" align="center"><button type="button" data-message-block-copy-action
|
||||
data-assistant-copy-action={message.role === "assistant" || undefined}
|
||||
onClick={onCopy} aria-label={label}
|
||||
className={cn(
|
||||
@@ -135,7 +130,7 @@ export function MessageCopyButton({ message, className }: { message: UIMessage;
|
||||
)}>
|
||||
{copied ? <Check className="h-3.5 w-3.5" strokeWidth={1.75} aria-hidden />
|
||||
: <Copy className="h-3.5 w-3.5" strokeWidth={1.75} aria-hidden />}
|
||||
</button></TooltipTrigger><TooltipContent side="top" align="center">{label}</TooltipContent></Tooltip></TooltipProvider>;
|
||||
</button></HoverHint>;
|
||||
}
|
||||
|
||||
interface MessageBlockMenuActivity {
|
||||
@@ -185,7 +180,6 @@ export function MessageBlockMenuActions({
|
||||
: "";
|
||||
|
||||
return (
|
||||
<TooltipProvider>
|
||||
<div
|
||||
data-message-block-menu-actions
|
||||
className={cn("flex max-w-full flex-col items-start gap-1", sheet ? "w-full" : "w-max")}
|
||||
@@ -199,8 +193,7 @@ export function MessageBlockMenuActions({
|
||||
<div className="flex min-h-[var(--message-block-control-size)] items-center gap-0.5">
|
||||
{!sheet && hasText ? <MessageCopyButton message={message} /> : null}
|
||||
{showFork ? (
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<HoverHint content={t("message.forkFromHere")} side="top" align="center">
|
||||
<button
|
||||
type="button"
|
||||
data-message-block-fork-action
|
||||
@@ -219,11 +212,7 @@ export function MessageBlockMenuActions({
|
||||
<ForkArrowIcon className="h-3.5 w-3.5" />
|
||||
{sheet ? <span>{t("message.forkFromHere")}</span> : null}
|
||||
</button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="top" align="center">
|
||||
{t("message.forkFromHere")}
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</HoverHint>
|
||||
) : null}
|
||||
</div>
|
||||
) : null}
|
||||
@@ -298,7 +287,6 @@ export function MessageBlockMenuActions({
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
</TooltipProvider>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -355,8 +343,15 @@ function UserDeliveryStatus({
|
||||
const { title, body } = deliveryErrorCopy(errorKind, t);
|
||||
return (
|
||||
<>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<HoverHint
|
||||
side="top"
|
||||
align="end"
|
||||
contentClassName="max-w-72 px-3 py-2.5 text-left"
|
||||
content={<>
|
||||
<p className="font-medium text-popover-foreground">{title}</p>
|
||||
<p className="mt-1 leading-relaxed text-muted-foreground">{body}</p>
|
||||
</>}
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
aria-label={`${label}: ${title}`}
|
||||
@@ -370,16 +365,7 @@ function UserDeliveryStatus({
|
||||
<CircleAlert className="h-3.5 w-3.5" aria-hidden />
|
||||
{label}
|
||||
</button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent
|
||||
side="top"
|
||||
align="end"
|
||||
className="max-w-72 px-3 py-2.5 text-left"
|
||||
>
|
||||
<p className="font-medium text-popover-foreground">{title}</p>
|
||||
<p className="mt-1 leading-relaxed text-muted-foreground">{body}</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</HoverHint>
|
||||
<span role="alert" aria-live="assertive" className="sr-only">
|
||||
{title}. {body}
|
||||
</span>
|
||||
@@ -526,14 +512,12 @@ export function MessageBubble({
|
||||
</p>
|
||||
) : null}
|
||||
{showDeliveryStatus ? (
|
||||
<TooltipProvider>
|
||||
<div className="flex min-h-8 items-center justify-end gap-1.5 text-muted-foreground">
|
||||
<UserDeliveryStatus
|
||||
status={message.deliveryStatus}
|
||||
errorKind={message.deliveryErrorKind}
|
||||
/>
|
||||
</div>
|
||||
</TooltipProvider>
|
||||
) : null}
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user