diff --git a/studio/frontend/src/features/chat/chat-settings-sheet.tsx b/studio/frontend/src/features/chat/chat-settings-sheet.tsx index 8c852b8189..23b57b7d5e 100644 --- a/studio/frontend/src/features/chat/chat-settings-sheet.tsx +++ b/studio/frontend/src/features/chat/chat-settings-sheet.tsx @@ -58,7 +58,7 @@ import { LayoutAlignRightIcon, } from "@hugeicons/core-free-icons"; import { HugeiconsIcon } from "@hugeicons/react"; -import { ChevronDown } from "lucide-react"; +import { ChevronDown, ExternalLink } from "lucide-react"; import { Tooltip as TooltipPrimitive } from "radix-ui"; import { Fragment, type ReactNode } from "react"; import { useEffect, useMemo, useRef, useState } from "react"; @@ -327,11 +327,14 @@ function saveCollapsibleOpen(label: string, open: boolean) { function CollapsibleSection({ label, + labelHref, children, defaultOpen = false, first = false, }: { label: string; + /** Optional link for the label (e.g. its PR); chevron still toggles. */ + labelHref?: string; children?: ReactNode; defaultOpen?: boolean; first?: boolean; @@ -341,6 +344,17 @@ function CollapsibleSection({ return Object.hasOwn(saved, label) ? saved[label] : defaultOpen; }); + const toggle = () => { + const next = !open; + setOpen(next); + saveCollapsibleOpen(label, next); + }; + + const headerClasses = cn( + "flex w-full items-center justify-between text-[12px] font-medium normal-case tracking-[0.04em] text-nav-fg-muted transition-colors focus-visible:outline-none focus-visible:ring-0", + first ? "pt-4 pb-5" : "py-5", + ); + return (
- + {labelHref ? ( +
+ + {label} + + + +
+ ) : ( + + )} {open &&
{children}
}
); @@ -1345,7 +1376,10 @@ export function ChatSettingsPanel({ ) : null} {!isExternalModel ? ( - + ) : null} diff --git a/studio/frontend/src/index.css b/studio/frontend/src/index.css index 84a34bcf49..ba79fed4f5 100644 --- a/studio/frontend/src/index.css +++ b/studio/frontend/src/index.css @@ -795,7 +795,7 @@ } .composer-pill-btn { - @apply flex items-center gap-1.5 rounded-full px-1.5 py-1.5 text-[14px] font-medium text-muted-foreground/70 transition-colors hover:bg-primary/10 dark:hover:bg-white/[0.08] disabled:cursor-not-allowed disabled:opacity-40; + @apply flex cursor-pointer items-center gap-1.5 rounded-full px-1.5 py-1.5 text-[14px] font-medium text-muted-foreground/70 transition-colors hover:bg-primary/10 dark:hover:bg-white/[0.08] disabled:cursor-not-allowed disabled:opacity-40; } .composer-pill-btn[data-active="true"] { @@ -901,7 +901,7 @@ /* Right-side Thinking pill (toggle or dropdown). */ .unsloth-thinking-pill { - @apply inline-flex shrink-0 items-center gap-1 rounded-full px-2.5 py-1.5 text-[14px] font-medium text-muted-foreground transition-colors hover:bg-muted-foreground/10 disabled:cursor-not-allowed disabled:opacity-40; + @apply inline-flex shrink-0 cursor-pointer items-center gap-1 rounded-full px-2.5 py-1.5 text-[14px] font-medium text-muted-foreground transition-colors hover:bg-muted-foreground/10 disabled:cursor-not-allowed disabled:opacity-40; } .unsloth-thinking-pill[data-active="true"] {