Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Studio: tidy the message action bars, branch picker and fork icon (#12735)

Michael Hanf237582fc46f
diff --git a/studio/frontend/src/components/app-sidebar.tsx b/studio/frontend/src/components/app-sidebar.tsx
index d6afc3d080f..ddcd4b9060c 100644
--- a/studio/frontend/src/components/app-sidebar.tsx
+++ b/studio/frontend/src/components/app-sidebar.tsx
@@ -148,7 +148,8 @@ import {
} from "@/components/ui/tooltip";
import { Tooltip as TooltipPrimitive } from "radix-ui";
import { HugeiconsIcon, type IconSvgElement } from "@hugeicons/react";
-import { ArrowRightIcon, ChevronDown, GitBranchIcon, Moon } from "lucide-react";
+import { ArrowRightIcon, ChevronDown, Moon } from "lucide-react";
+import { ForkIcon } from "@/lib/fork-icon";
import {
Link,
type NavigateOptions,
@@ -4590,7 +4591,7 @@ export function AppSidebar() {
title="Copy this chat into a new one, from its last message"
onSelect={() => void forkChatFromRow(item)}
>
- <GitBranchIcon strokeWidth={1.75} className="size-icon" />
+ <HugeiconsIcon icon={ForkIcon} strokeWidth={1.75} className="size-icon" />
<span>Fork</span>
</P.Item>
{/* Projects and sections in one place: both are where the chat is kept. */}
diff --git a/studio/frontend/src/components/assistant-ui/thread.tsx b/studio/frontend/src/components/assistant-ui/thread.tsx
index e641469a637..ba87aee9550 100644
--- a/studio/frontend/src/components/assistant-ui/thread.tsx
+++ b/studio/frontend/src/components/assistant-ui/thread.tsx
@@ -320,6 +320,14 @@ import { MicIcon } from "@/lib/mic-icon";
import { downloadFile, isDownloadCancelled } from "@/lib/native-files";
import { toast } from "@/lib/toast";
import { Tick02Icon } from "@/lib/tick-icon";
+import {
+ BranchNextIcon,
+ BranchPrevIcon,
+ ContinueArrowIcon,
+ EditResponseIcon,
+ ReadAloudIcon,
+} from "@/lib/action-bar-icons";
+import { ForkIcon } from "@/lib/fork-icon";
import { cn } from "@/lib/utils";
import {
ActionBarMorePrimitive,
@@ -350,24 +358,20 @@ import {
Image03Icon,
McpServerIcon,
PencilRulerIcon,
- PlayIcon,
Scroll01Icon,
Telescope02Icon,
VolumeMute02Icon,
+ WorkflowCircle05Icon,
} from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/react";
-import { Volume02Icon } from "@/lib/volume-icons";
import { RefreshGlyph } from "@/lib/refresh-icon";
import { useNavigate } from "@tanstack/react-router";
import {
ArrowDownIcon,
ArrowUpIcon,
ChevronDownIcon,
- ChevronLeftIcon,
- ChevronRightIcon,
Columns2Icon,
SlidersHorizontalIcon,
- GitBranchIcon,
HeadphonesIcon,
Loader2Icon,
MoreHorizontalIcon,
@@ -1854,7 +1858,7 @@ const ForkContinuationRule: FC = () => {
if (anchor === undefined || anchor !== messageId) return null;
const label = (
<>
- <GitBranchIcon strokeWidth={1.75} className="size-3.5" />
+ <HugeiconsIcon icon={WorkflowCircle05Icon} strokeWidth={1.75} className="size-3.5" />
Continued from chat
</>
);
@@ -1896,7 +1900,8 @@ const ForkContinuationRule: FC = () => {
}}
className={cn(
labelClass,
- "cursor-pointer rounded-sm underline decoration-transparent underline-offset-2 transition-colors hover:text-foreground hover:decoration-current focus-visible:outline-2 focus-visible:outline-ring focus-visible:outline-offset-2",
+ // An answer link's colour, underlined on hover only.
+ "cursor-pointer rounded-sm text-primary underline decoration-transparent underline-offset-2 transition-colors hover:decoration-primary focus-visible:outline-2 focus-visible:outline-ring focus-visible:outline-offset-2",
)}
>
{label}
@@ -8130,7 +8135,7 @@ const ForkCountBadge: FC = () => {
className="mx-1 inline-flex items-center gap-1 rounded-sm bg-primary/10 px-1.5 py-0.5 text-ui-10 font-medium text-primary"
title={`${count} fork${count === 1 ? "" : "s"} from this message`}
>
- <GitBranchIcon strokeWidth={1.75} className="size-3" />
+ <HugeiconsIcon icon={ForkIcon} strokeWidth={1.75} className="size-3" />
{count}
</span>
);
@@ -8235,11 +8240,11 @@ const ForkMessageButton: FC = () => {
return (
<TooltipIconButton
- tooltip="Fork from here"
+ tooltip="Fork in new chat"
disabled={forkDisabled}
onClick={forkMessage}
>
- <GitBranchIcon strokeWidth={1.75} className="size-icon" />
+ <HugeiconsIcon icon={ForkIcon} strokeWidth={1.75} className="size-icon" />
</TooltipIconButton>
);
};
@@ -8304,7 +8309,8 @@ const useThreadResearchActive = (): boolean => {
});
};
-const DeleteMessageButton: FC = () => {
+/** Deletes this message (a prompt with its replies); `hidden` for research messages. */
+function useDeleteMessage() {
const aui = useAui();
const messageId = useAuiState(({ message }) => message.id);
const isRunning = useAuiState(({ thread }) => thread.isRunning);
@@ -8354,23 +8360,69 @@ const DeleteMessageButton: FC = () => {
}
};
- if (researchRunId || ownsResearchMessage) {
+ return { handleDelete, isRunning, hidden: Boolean(researchRunId || ownsResearchMessage) };
+}
+
+// The More menu's Delete, last and in red.
+const DeleteMessageMenuItem: FC = () => {
+ const { handleDelete, isRunning, hidden } = useDeleteMessage();
+ if (hidden) {
return null;
}
-
return (
- <TooltipIconButton
- tooltip="Delete message"
+ <ActionBarMorePrimitive.Item
disabled={isRunning}
- onClick={handleDelete}
- className="text-chat-icon-fg hover:text-destructive"
+ onSelect={() => void handleDelete()}
+ className="aui-action-bar-more-item flex cursor-pointer select-none items-center gap-2 rounded-[12px] px-3 py-2 text-sm text-destructive outline-none hover:bg-destructive/10 focus:bg-destructive/10 data-[disabled]:pointer-events-none data-[disabled]:opacity-50"
>
- <HugeiconsIcon
- icon={Delete02Icon}
- strokeWidth={1.75}
- className="size-icon"
- />
- </TooltipIconButton>
+ <HugeiconsIcon icon={Delete02Icon} strokeWidth={1.75} className="size-icon" />
+ Delete
+ </ActionBarMorePrimitive.Item>
+ );
+};
+
+const MORE_MENU_CONTENT_CLASS =
+ "aui-action-bar-more-content z-50 min-w-32 max-h-(--radix-dropdown-menu-content-available-height) flex flex-col overflow-hidden rounded-[21px] bg-popover px-[calc(9px*var(--ui-space-scale,1))] py-2 text-popover-foreground shadow-[0_2px_8px_-2px_rgba(0,0,0,0.16)] dark:shadow-[0_8px_28px_-6px_var(--background)]";
+
+const ForkMessageMenuItem: FC = () => {
+ const { forkMessage, forkDisabled } = useForkMessageAction();
+ return (
+ <ActionBarMorePrimitive.Item
+ disabled={forkDisabled}
+ onSelect={() => void forkMessage()}
+ className="aui-action-bar-more-item flex cursor-pointer select-none items-center gap-2 rounded-[12px] px-3 py-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50"
+ >
+ <HugeiconsIcon icon={ForkIcon} strokeWidth={1.75} className="size-icon" />
+ Fork in new chat
+ </ActionBarMorePrimitive.Item>
+ );
+};
+
+// A prompt's More menu: Fork, then Delete.
+const UserMoreMenu: FC = () => {
+ const triggerRef = useRef<HTMLButtonElement>(null);
+ const collisionPadding = useWindowChromeCollisionPadding(undefined);
+ return (
+ <ActionBarMorePrimitive.Root modal={false}>
+ <ActionBarMorePrimitive.Trigger asChild={true}>
+ <TooltipIconButton ref={triggerRef} tooltip="More" className="data-[state=open]:bg-accent">
+ <MoreHorizontalIcon strokeWidth={1.75} className="size-icon" />
+ </TooltipIconButton>
+ </ActionBarMorePrimitive.Trigger>
+ <ActionBarMorePrimitive.Content
+ side="bottom"
+ align="end"
+ collisionPadding={collisionPadding}
+ onCloseAutoFocus={(e) => e.preventDefault()}
+ className={MORE_MENU_CONTENT_CLASS}
+ >
+ <div className="min-h-0 flex-1 overflow-x-hidden overflow-y-auto">
+ <MenuDismissGuard triggerRef={triggerRef} />
+ <ForkMessageMenuItem />
+ <DeleteMessageMenuItem />
+ </div>
+ </ActionBarMorePrimitive.Content>
+ </ActionBarMorePrimitive.Root>
);
};
@@ -8426,7 +8478,7 @@ const EditAssistantMessageButton: FC = () => {
onClick={() => setEditingId(messageId)}
>
<HugeiconsIcon
- icon={Edit03Icon}
+ icon={EditResponseIcon}
strokeWidth={1.75}
className="size-icon"
/>
@@ -8434,16 +8486,17 @@ const EditAssistantMessageButton: FC = () => {
);
};
-/** Continue the newest finished reply; incomplete replies use the Resume bar. */
-const ContinueResponseButton: FC = () => {
+/** The More menu's Continue response, for the newest finished reply; incomplete replies use the
+ * Resume bar. */
+const ContinueResponseMenuItem: FC = () => {
const isLast = useAuiState(({ message }) => message.isLast);
if (!isLast) {
return null;
}
- return <ContinueResponseButtonForLastMessage />;
+ return <ContinueResponseMenuItemForLastMessage />;
};
-const ContinueResponseButtonForLastMessage: FC = () => {
+const ContinueResponseMenuItemForLastMessage: FC = () => {
const { messageId, reason, completed, canResume, startContinuation } =
useContinuation();
const editing = useChatRuntimeStore((s) => s.editingMessageId === messageId);
@@ -8455,14 +8508,15 @@ const ContinueResponseButtonForLastMessage: FC = () => {
return null;
}
return (
- <TooltipIconButton
- tooltip="Continue response"
- onClick={() => {
+ <ActionBarMorePrimitive.Item
+ onSelect={() => {
startContinuation();
}}
+ className="aui-action-bar-more-item flex cursor-pointer select-none items-center gap-2 rounded-[12px] px-3 py-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50"
>
- <HugeiconsIcon icon={PlayIcon} strokeWidth={1.75} className="size-icon" />
- </TooltipIconButton>
+ <HugeiconsIcon icon={ContinueArrowIcon} strokeWidth={1.75} className="size-icon" />
+ Continue response
+ </ActionBarMorePrimitive.Item>
);
};
@@ -8482,7 +8536,7 @@ const EditAssistantMessageMenuItem: FC = () => {
onSelect={() => setEditingId(messageId)}
className="aui-action-bar-more-item flex cursor-pointer select-none items-center gap-2 rounded-[12px] px-3 py-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50"
>
- <HugeiconsIcon icon={Edit03Icon} strokeWidth={1.75} className="size-icon" />
+ <HugeiconsIcon icon={EditResponseIcon} strokeWidth={1.75} className="size-icon" />
Edit response
</ActionBarMorePrimitive.Item>
);
@@ -8510,14 +8564,12 @@ const AssistantActionBar: FC = () => {
const moreMenuTriggerRef = useRef<HTMLButtonElement>(null);
// Not built on DropdownMenuContent, so clear the titlebar and cap the height here.
const moreMenuCollisionPadding = useWindowChromeCollisionPadding(undefined);
- const { forkMessage, forkDisabled } = useForkMessageAction();
const researchRunId = useResearchMessageRunId();
const researchActive = useThreadResearchActive();
const activeProjectId = useChatRuntimeStore((s) => s.activeProjectId);
const [detailsOpen, setDetailsOpen] = useState(false);
const ttsEnabled = useVoiceSettingsStore((s) => s.ttsEnabled);
- // Off by default: Read aloud and Edit response live in the More menu.
- const inlineReadAloud = useChatPreferencesStore((s) => s.showInlineReadAloud);
+ // Off by default: Edit response lives in the More menu.
const inlineEdit = useChatPreferencesStore((s) => s.showInlineEditResponse);
// hideWhenRunning is thread-level, so a new run would hide this bar and its
// only Stop reading control while read-aloud keeps playing; keep it shown.
@@ -8546,21 +8598,13 @@ const AssistantActionBar: FC = () => {
>
<CopyButton />
{inlineEdit && <EditAssistantMessageButton />}
- <ContinueResponseButton />
- {!researchRunId && !researchActive && (
- <ActionBarPrimitive.Reload asChild={true}>
- <TooltipIconButton tooltip="Refresh">
- <RefreshGlyph strokeWidth={1.75} className="size-icon" />
- </TooltipIconButton>
- </ActionBarPrimitive.Reload>
- )}
<ForkCountBadge />
- <DeleteMessageButton />
- {inlineReadAloud && ttsEnabled && (
+ <ForkMessageButton />
+ {ttsEnabled && (
<MessagePrimitive.If speaking={false}>
<ActionBarPrimitive.Speak asChild={true}>
<TooltipIconButton tooltip="Read aloud" aria-label="Read aloud">
- <HugeiconsIcon icon={Volume02Icon} strokeWidth={1.75} className="size-icon" />
+ <HugeiconsIcon icon={ReadAloudIcon} strokeWidth={1.75} className="size-icon" />
</TooltipIconButton>
</ActionBarPrimitive.Speak>
</MessagePrimitive.If>
@@ -8578,6 +8622,13 @@ const AssistantActionBar: FC = () => {
</TooltipIconButton>
</ActionBarPrimitive.StopSpeaking>
</MessagePrimitive.If>
+ {!researchRunId && !researchActive && (
+ <ActionBarPrimitive.Reload asChild={true}>
+ <TooltipIconButton tooltip="Refresh">
+ <RefreshGlyph strokeWidth={1.75} className="size-icon" />
+ </TooltipIconButton>
+ </ActionBarPrimitive.Reload>
+ )}
{/* Non-modal: a modal Radix menu writes `pointer-events: none` on <body>, and
that is an INHERITED property, so every open invalidates style for the whole
document. On a long thread that recalc is the bulk of the open+close cost. */}
@@ -8596,37 +8647,16 @@ const AssistantActionBar: FC = () => {
align="start"
collisionPadding={moreMenuCollisionPadding}
onCloseAutoFocus={(e) => e.preventDefault()}
- className="aui-action-bar-more-content z-50 min-w-32 max-h-(--radix-dropdown-menu-content-available-height) flex flex-col overflow-hidden rounded-[21px] bg-popover px-[calc(9px*var(--ui-space-scale,1))] py-2 text-popover-foreground shadow-[0_2px_8px_-2px_rgba(0,0,0,0.16)] dark:shadow-[0_8px_28px_-6px_var(--background)]"
+ className={MORE_MENU_CONTENT_CLASS}
>
{/* Scroll an inner viewport: a scrollbar on the rounded surface squares its corners.
The surface padding insets it clear of the curve. */}
<div className="min-h-0 flex-1 overflow-x-hidden overflow-y-auto">
- {/* Prevent an outside dismissal from triggering Delete. */}
+ {/* Keep the click that dismisses the menu off the bar's buttons. */}
<MenuDismissGuard triggerRef={moreMenuTriggerRef} />
<MessageMenuTime onShowDetails={() => setDetailsOpen(true)} />
- {!inlineReadAloud && ttsEnabled && (
- <MessagePrimitive.If speaking={false}>
- <ActionBarPrimitive.Speak asChild={true}>
- <ActionBarMorePrimitive.Item className="aui-action-bar-more-item flex cursor-pointer select-none items-center gap-2 rounded-[12px] px-3 py-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50">
- <HugeiconsIcon
- icon={Volume02Icon}
- strokeWidth={1.75}
- className="size-icon"
- />
- Read aloud
- </ActionBarMorePrimitive.Item>
- </ActionBarPrimitive.Speak>
- </MessagePrimitive.If>
- )}
+ <ContinueResponseMenuItem />
{!inlineEdit && <EditAssistantMessageMenuItem />}
- <ActionBarMorePrimitive.Item
- disabled={forkDisabled}
- onSelect={() => void forkMessage()}
- className="aui-action-bar-more-item flex cursor-pointer select-none items-center gap-2 rounded-[12px] px-3 py-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50"
- >
- <GitBranchIcon strokeWidth={1.75} className="size-icon" />
- Fork in new chat
- </ActionBarMorePrimitive.Item>
<ActionBarPrimitive.ExportMarkdown
asChild={true}
onExport={exportMessageMarkdown}
@@ -8693,6 +8723,7 @@ const AssistantActionBar: FC = () => {
Save to project sources
</ActionBarMorePrimitive.Item>
)}
+ <DeleteMessageMenuItem />
</div>
</ActionBarMorePrimitive.Content>
</ActionBarMorePrimitive.Root>
@@ -8741,7 +8772,7 @@ const UserMessage: FC = () => {
</div>
<UserMessageFooter>
<UserActionBar />
- <BranchPicker className="aui-user-branch-picker ml-0.5 shrink-0" />
+ <BranchPicker className="aui-user-branch-picker ml-[calc(6px*var(--ui-space-scale,1))] shrink-0" />
</UserMessageFooter>
</div>
{/* The other half of the pair: last is a user message while a reply is
@@ -8750,7 +8781,7 @@ const UserMessage: FC = () => {
<ForkChatShortcut />
</MessagePrimitive.If>
{/* Reverse traversal reaches a trailing stop before the root. Focusing it
- mounts the autohidden controls, so the next Shift+Tab enters Delete
+ mounts the autohidden controls, so the next Shift+Tab enters More
instead of skipping the action bar and leaving the message. */}
<span
className="aui-user-reveal-sentinel"
@@ -8779,8 +8810,7 @@ const UserActionBar: FC = () => {
</ActionBarPrimitive.Edit>
)}
<ForkCountBadge />
- <ForkMessageButton />
- <DeleteMessageButton />
+ <UserMoreMenu />
</UserMessageActionBar>
);
};
@@ -8873,10 +8903,10 @@ const BranchPicker: FC<BranchPickerPrimitive.Root.Props> = ({
aria-label="Previous"
className="aui-branch-chevron-btn"
>
- <ChevronLeftIcon strokeWidth={1.25} className="size-[calc(36px*var(--ui-space-scale,1))]" />
+ <HugeiconsIcon icon={BranchPrevIcon} strokeWidth={1.75} className="size-4" />
</button>
</BranchPickerPrimitive.Previous>
- <span className="aui-branch-picker-state font-mono text-ui-13 tabular-nums">
+ <span className="aui-branch-picker-state text-ui-13 leading-none tabular-nums">
<BranchPickerPrimitive.Number />/<BranchPickerPrimitive.Count />
</span>
<BranchPickerPrimitive.Next asChild={true}>
@@ -8885,7 +8915,7 @@ const BranchPicker: FC<BranchPickerPrimitive.Root.Props> = ({
aria-label="Next"
className="aui-branch-chevron-btn"
>
- <ChevronRightIcon strokeWidth={1.25} className="size-[calc(36px*var(--ui-space-scale,1))]" />
+ <HugeiconsIcon icon={BranchNextIcon} strokeWidth={1.75} className="size-4" />
</button>
</BranchPickerPrimitive.Next>
</BranchPickerPrimitive.Root>
diff --git a/studio/frontend/src/components/assistant-ui/user-message-actions.tsx b/studio/frontend/src/components/assistant-ui/user-message-actions.tsx
index e46ba8db2f4..0581270b68a 100644
--- a/studio/frontend/src/components/assistant-ui/user-message-actions.tsx
+++ b/studio/frontend/src/components/assistant-ui/user-message-actions.tsx
@@ -7,7 +7,7 @@ import { UserMessageTime } from "./user-message-time";
/** Use the message's full width, independently of the bubble's 80% limit. */
export const UserMessageFooter: FC<PropsWithChildren> = ({ children }) => (
- <div className="aui-user-message-footer mt-1 -mr-[var(--icon-btn-inset)] flex min-h-8 w-full min-w-0 flex-wrap items-center justify-end gap-y-1">
+ <div className="aui-user-message-footer mt-1 flex min-h-8 w-full min-w-0 flex-wrap items-center justify-end gap-y-1">
{children}
</div>
);
diff --git a/studio/frontend/src/components/assistant-ui/user-message-time.tsx b/studio/frontend/src/components/assistant-ui/user-message-time.tsx
index 259920a4c73..1a054b12e9e 100644
--- a/studio/frontend/src/components/assistant-ui/user-message-time.tsx
+++ b/studio/frontend/src/components/assistant-ui/user-message-time.tsx
@@ -33,7 +33,7 @@ export const UserMessageTime: FC = () => {
<button
type="button"
aria-label={fullDate}
- className="aui-user-message-time-trigger mr-2 h-8 min-w-8 flex-1 cursor-default! self-center rounded-sm text-right text-ui-13 text-muted-foreground tabular-nums"
+ className="aui-user-message-time-trigger mr-2 h-8 min-w-8 flex-1 cursor-default! self-center rounded-sm text-right text-ui-11p5 text-muted-foreground tabular-nums"
>
<time
dateTime={date.toISOString()}
diff --git a/studio/frontend/src/features/browser/tab-menu.tsx b/studio/frontend/src/features/browser/tab-menu.tsx
index fbbd811a0c8..83bc105d497 100644
--- a/studio/frontend/src/features/browser/tab-menu.tsx
+++ b/studio/frontend/src/features/browser/tab-menu.tsx
@@ -22,6 +22,7 @@ import { useChatRuntimeStore } from "@/features/chat";
import { resetToNewChat } from "@/features/library";
import { useT } from "@/i18n";
import { copyToClipboard } from "@/lib/copy-to-clipboard";
+import { ForkIcon } from "@/lib/fork-icon";
import { openExternalLink } from "@/lib/open-link";
import { toast } from "@/lib/toast";
import {
@@ -41,7 +42,6 @@ import {
} from "@hugeicons/core-free-icons";
import { HugeiconsIcon, type IconSvgElement } from "@hugeicons/react";
import { useNavigate } from "@tanstack/react-router";
-import { GitBranchIcon } from "lucide-react";
import { type ComponentType, Fragment, type ReactNode } from "react";
import { hostOf } from "./address";
import { callNative, useNativeBrowser } from "./native-support";
@@ -235,7 +235,7 @@ export function TabMenuItems({
url ? (
<P.Sub key="fork">
<P.SubTrigger>
- <GitBranchIcon strokeWidth={1.75} className={ICON} />
+ <HugeiconsIcon icon={ForkIcon} strokeWidth={1.75} className={ICON} />
<span>{t("browser.tabMenu.fork")}</span>
</P.SubTrigger>
<P.SubContent className="unsloth-plus-menu sidebar-row-menu w-48">
diff --git a/studio/frontend/src/features/chat/components/chat-header-menu.tsx b/studio/frontend/src/features/chat/components/chat-header-menu.tsx
index a75b24a21dd..71e4f7e783e 100644
--- a/studio/frontend/src/features/chat/components/chat-header-menu.tsx
+++ b/studio/frontend/src/features/chat/components/chat-header-menu.tsx
@@ -45,7 +45,7 @@ import {
ViewOffSlashIcon,
} from "@hugeicons/core-free-icons";
import { HugeiconsIcon, type IconSvgElement } from "@hugeicons/react";
-import { GitBranchIcon } from "lucide-react";
+import { ForkIcon } from "@/lib/fork-icon";
import type { ReactNode } from "react";
import {
type ActiveChatMenu,
@@ -211,7 +211,7 @@ function ChatMenuItems({ menu }: { menu: ActiveChatMenu }) {
</Item>
<DropdownMenuSeparator className="mx-3" />
<Item
- glyph={<GitBranchIcon strokeWidth={1.75} className={ICON} />}
+ glyph={<HugeiconsIcon icon={ForkIcon} strokeWidth={1.75} className={ICON} />}
onSelect={menu.fork}
disabled={!menu.canFork}
shortcut="forkChat"
diff --git a/studio/frontend/src/features/chat/stores/chat-preferences-store.ts b/studio/frontend/src/features/chat/stores/chat-preferences-store.ts
index c9fedef7d4d..0c642a9a8b2 100644
--- a/studio/frontend/src/features/chat/stores/chat-preferences-store.ts
+++ b/studio/frontend/src/features/chat/stores/chat-preferences-store.ts
@@ -26,8 +26,8 @@ import {
// expanded, see display-visibility.ts. foldToolActivityIntoThinking: on hides a round's tool calls
// until its thinking block is opened, and has no effect while toolVisibility is "expanded".
// pastedTextMinChars: paste length that becomes a .txt attachment; 0 is off.
-// showInlineReadAloud / showInlineEditResponse: on keeps that action in each response's action bar
-// instead of its More menu.
+// showInlineEditResponse: on keeps Edit response in each response's action bar instead of its
+// More menu.
export interface ChatPreferencesState {
plainTextComposer: boolean;
setPlainTextComposer: (value: boolean) => void;
@@ -45,8 +45,6 @@ export interface ChatPreferencesState {
setShowModelDisclaimer: (value: boolean) => void;
showResponseModel: boolean;
setShowResponseModel: (value: boolean) => void;
- showInlineReadAloud: boolean;
- setShowInlineReadAloud: (value: boolean) => void;
showInlineEditResponse: boolean;
setShowInlineEditResponse: (value: boolean) => void;
thinkingVisibility: DisplayVisibility;
@@ -93,9 +91,6 @@ export const useChatPreferencesStore = create<ChatPreferencesState>()(
set({ showModelDisclaimer }),
showResponseModel: false,
setShowResponseModel: (showResponseModel) => set({ showResponseModel }),
- showInlineReadAloud: false,
- setShowInlineReadAloud: (showInlineReadAloud) =>
- set({ showInlineReadAloud }),
showInlineEditResponse: false,
setShowInlineEditResponse: (showInlineEditResponse) =>
set({ showInlineEditResponse }),
@@ -136,7 +131,6 @@ export const useChatPreferencesStore = create<ChatPreferencesState>()(
alwaysDeleteChatFiles: saved?.alwaysDeleteChatFiles ?? false,
showModelDisclaimer: saved?.showModelDisclaimer ?? false,
showResponseModel: saved?.showResponseModel ?? false,
- showInlineReadAloud: saved?.showInlineReadAloud ?? false,
showInlineEditResponse: saved?.showInlineEditResponse ?? false,
thinkingVisibility: migrateVisibility(
saved?.thinkingVisibility,
diff --git a/studio/frontend/src/features/library/chats/chats-items.tsx b/studio/frontend/src/features/library/chats/chats-items.tsx
index f4526ab4fae..c20114ddad5 100644
--- a/studio/frontend/src/features/library/chats/chats-items.tsx
+++ b/studio/frontend/src/features/library/chats/chats-items.tsx
@@ -59,6 +59,7 @@ import {
ViewOffSlashIcon,
} from "@hugeicons/core-free-icons";
import { HugeiconsIcon, type IconSvgElement } from "@hugeicons/react";
+import { ForkIcon } from "@/lib/fork-icon";
import {
ArrowDownIcon,
ArrowUpIcon,
@@ -355,7 +356,7 @@ function ForkItem({ chat }: { chat: SidebarItem }) {
disabled={!canForkChatRow(chat) || generating || forking}
onSelect={() => actions.fork(chat)}
>
- <GitBranchIcon strokeWidth={1.75} className={ICON} />
+ <HugeiconsIcon icon={ForkIcon} strokeWidth={1.75} className={ICON} />
{t("library.chats.menu.fork")}
</DropdownMenuItem>
);
diff --git a/studio/frontend/src/features/settings/settings-search.ts b/studio/frontend/src/features/settings/settings-search.ts
index 02afdfc724c..c446d95cab0 100644
--- a/studio/frontend/src/features/settings/settings-search.ts
+++ b/studio/frontend/src/features/settings/settings-search.ts
@@ -135,7 +135,6 @@ export const SETTINGS_SEARCH_INDEX: Record<SettingsTab, TranslationKey[]> = {
"settings.chat.artifacts.allowNetworkAccess",
"settings.chat.webSearch.images",
"settings.chat.modelDisclaimer",
- "settings.chat.inlineReadAloud",
"settings.chat.inlineEditResponse",
"settings.chat.groups.menu.title",
],
diff --git a/studio/frontend/src/features/settings/tabs/chat-tab.tsx b/studio/frontend/src/features/settings/tabs/chat-tab.tsx
index 5df3acf66bf..1a03d4a9b5f 100644
--- a/studio/frontend/src/features/settings/tabs/chat-tab.tsx
+++ b/studio/frontend/src/features/settings/tabs/chat-tab.tsx
@@ -235,12 +235,6 @@ export function ChatTab() {
const showResponseModel = useChatPreferencesStore(
(state) => state.showResponseModel,
);
- const showInlineReadAloud = useChatPreferencesStore(
- (state) => state.showInlineReadAloud,
- );
- const setShowInlineReadAloud = useChatPreferencesStore(
- (state) => state.setShowInlineReadAloud,
- );
const showInlineEditResponse = useChatPreferencesStore(
(state) => state.showInlineEditResponse,
);
@@ -621,16 +615,6 @@ export function ChatTab() {
onCheckedChange={setShowResponseModel}
/>
</SettingsRow>
- <SettingsRow
- label={t("settings.chat.inlineReadAloud")}
- description={t("settings.chat.inlineReadAloudDescription")}
- >
- <Switch
- aria-label={t("settings.chat.inlineReadAloud")}
- checked={showInlineReadAloud}
- onCheckedChange={setShowInlineReadAloud}
- />
- </SettingsRow>
<SettingsRow
label={t("settings.chat.inlineEditResponse")}
description={t("settings.chat.inlineEditResponseDescription")}
diff --git a/studio/frontend/src/i18n/locales/ar.ts b/studio/frontend/src/i18n/locales/ar.ts
index 4e4943fd40f..117c038620a 100644
--- a/studio/frontend/src/i18n/locales/ar.ts
+++ b/studio/frontend/src/i18n/locales/ar.ts
@@ -2207,8 +2207,6 @@ export const ar = {
showResponseModel: "إظهار نموذج الاستجابة",
showResponseModelDescription:
"إظهار البيانات الوصفية للنموذج في ردود المساعد.",
- inlineReadAloud: "القراءة بصوت عالٍ في الردود",
- inlineReadAloudDescription: "إبقاء القراءة بصوت عالٍ على كل رد بدلًا من قائمة المزيد.",
inlineEditResponse: "تعديل الرد في الردود",
inlineEditResponseDescription: "إبقاء تعديل الرد على كل رد بدلًا من قائمة المزيد.",
modelDisclaimer: "إظهار إخلاء مسؤولية النموذج",
diff --git a/studio/frontend/src/i18n/locales/de.ts b/studio/frontend/src/i18n/locales/de.ts
index a58b87f0840..ca7b5b69548 100644
--- a/studio/frontend/src/i18n/locales/de.ts
+++ b/studio/frontend/src/i18n/locales/de.ts
@@ -2245,8 +2245,6 @@ export const de = {
showResponseModel: "Antwortmodell anzeigen",
showResponseModelDescription:
"Modellmetadaten in Antworten des Assistenten anzeigen.",
- inlineReadAloud: "Vorlesen bei Antworten",
- inlineReadAloudDescription: "Vorlesen bei jeder Antwort anzeigen statt im Menü „Mehr“.",
inlineEditResponse: "Antwort bearbeiten bei Antworten",
inlineEditResponseDescription: "Antwort bearbeiten bei jeder Antwort anzeigen statt im Menü „Mehr“.",
modelDisclaimer: "Modell-Hinweis anzeigen",
diff --git a/studio/frontend/src/i18n/locales/en.ts b/studio/frontend/src/i18n/locales/en.ts
index 8f07c26bae7..4adf2a007c3 100644
--- a/studio/frontend/src/i18n/locales/en.ts
+++ b/studio/frontend/src/i18n/locales/en.ts
@@ -2244,9 +2244,6 @@ export const en = {
showResponseModel: "Response model",
showResponseModelDescription:
"Show model details in assistant responses.",
- inlineReadAloud: "Read aloud on responses",
- inlineReadAloudDescription:
- "Keep Read aloud on every response, instead of in the More menu.",
inlineEditResponse: "Edit response on responses",
inlineEditResponseDescription:
"Keep Edit response on every response, instead of in the More menu.",
diff --git a/studio/frontend/src/i18n/locales/es.ts b/studio/frontend/src/i18n/locales/es.ts
index 6dd5e1c7042..68e2d1df349 100644
--- a/studio/frontend/src/i18n/locales/es.ts
+++ b/studio/frontend/src/i18n/locales/es.ts
@@ -2236,8 +2236,6 @@ export const es = {
showResponseModel: "Mostrar el modelo de respuesta",
showResponseModelDescription:
"Muestra los metadatos del modelo en las respuestas del asistente.",
- inlineReadAloud: "Lectura en voz alta en las respuestas",
- inlineReadAloudDescription: "Mostrar Lectura en voz alta en cada respuesta, en lugar de en el menú Más.",
inlineEditResponse: "Editar respuesta en las respuestas",
inlineEditResponseDescription: "Mostrar Editar respuesta en cada respuesta, en lugar de en el menú Más.",
modelDisclaimer: "Mostrar aviso del modelo",
diff --git a/studio/frontend/src/i18n/locales/fr.ts b/studio/frontend/src/i18n/locales/fr.ts
index bc257cc1695..0fda112f20d 100644
--- a/studio/frontend/src/i18n/locales/fr.ts
+++ b/studio/frontend/src/i18n/locales/fr.ts
@@ -2242,8 +2242,6 @@ export const fr = {
showResponseModel: "Afficher le modèle de réponse",
showResponseModelDescription:
"Afficher les métadonnées du modèle dans les réponses de l’assistant.",
- inlineReadAloud: "Lecture à voix haute sur les réponses",
- inlineReadAloudDescription: "Afficher Lecture à voix haute sur chaque réponse, plutôt que dans le menu Plus.",
inlineEditResponse: "Modifier la réponse sur les réponses",
inlineEditResponseDescription: "Afficher Modifier la réponse sur chaque réponse, plutôt que dans le menu Plus.",
modelDisclaimer: "Afficher l'avertissement du modèle",
diff --git a/studio/frontend/src/i18n/locales/hi.ts b/studio/frontend/src/i18n/locales/hi.ts
index 2266b4d8211..c181925a3ce 100644
--- a/studio/frontend/src/i18n/locales/hi.ts
+++ b/studio/frontend/src/i18n/locales/hi.ts
@@ -2213,8 +2213,6 @@ export const hi = {
showResponseModel: "जवाब देने वाला मॉडल दिखाएँ",
showResponseModelDescription:
"असिस्टेंट के जवाबों में मॉडल का मेटाडेटा दिखाएँ।",
- inlineReadAloud: "जवाबों पर ज़ोर से पढ़ें",
- inlineReadAloudDescription: "ज़ोर से पढ़ें को More मेन्यू के बजाय हर जवाब पर दिखाएँ।",
inlineEditResponse: "जवाबों पर जवाब संपादित करें",
inlineEditResponseDescription: "जवाब संपादित करें को More मेन्यू के बजाय हर जवाब पर दिखाएँ।",
modelDisclaimer: "मॉडल अस्वीकरण दिखाएं",
diff --git a/studio/frontend/src/i18n/locales/it.ts b/studio/frontend/src/i18n/locales/it.ts
index c20cc1c7c1b..d58ecb53988 100644
--- a/studio/frontend/src/i18n/locales/it.ts
+++ b/studio/frontend/src/i18n/locales/it.ts
@@ -2202,8 +2202,6 @@ export const it = {
showResponseModel: "Mostra il modello della risposta",
showResponseModelDescription:
"Mostra i metadati del modello nelle risposte dell'assistente.",
- inlineReadAloud: "Lettura ad alta voce nelle risposte",
- inlineReadAloudDescription: "Mostra Lettura ad alta voce su ogni risposta, invece che nel menu Altro.",
inlineEditResponse: "Modifica risposta nelle risposte",
inlineEditResponseDescription: "Mostra Modifica risposta su ogni risposta, invece che nel menu Altro.",
modelDisclaimer: "Mostra l'avviso sul modello",
diff --git a/studio/frontend/src/i18n/locales/ja.ts b/studio/frontend/src/i18n/locales/ja.ts
index 733faf1caf7..ffe2bb74665 100644
--- a/studio/frontend/src/i18n/locales/ja.ts
+++ b/studio/frontend/src/i18n/locales/ja.ts
@@ -2192,8 +2192,6 @@ export const ja = {
showResponseModel: "応答モデルを表示",
showResponseModelDescription:
"アシスタントの応答にモデルのメタデータを表示します。",
- inlineReadAloud: "応答に読み上げを表示",
- inlineReadAloudDescription: "読み上げを「その他」メニューではなく、各応答に表示します。",
inlineEditResponse: "応答に応答の編集を表示",
inlineEditResponseDescription: "応答の編集を「その他」メニューではなく、各応答に表示します。",
modelDisclaimer: "モデルの免責事項を表示",
diff --git a/studio/frontend/src/i18n/locales/ko.ts b/studio/frontend/src/i18n/locales/ko.ts
index d072920e960..78b0f8dc227 100644
--- a/studio/frontend/src/i18n/locales/ko.ts
+++ b/studio/frontend/src/i18n/locales/ko.ts
@@ -2202,8 +2202,6 @@ export const ko = {
showResponseModel: "응답 모델 표시",
showResponseModelDescription:
"어시스턴트 응답에 모델 메타데이터를 표시합니다.",
- inlineReadAloud: "응답에 소리 내어 읽기 표시",
- inlineReadAloudDescription: "소리 내어 읽기를 더보기 메뉴 대신 모든 응답에 표시합니다.",
inlineEditResponse: "응답에 응답 편집 표시",
inlineEditResponseDescription: "응답 편집을 더보기 메뉴 대신 모든 응답에 표시합니다.",
modelDisclaimer: "모델 고지 표시",
diff --git a/studio/frontend/src/i18n/locales/pt-br.ts b/studio/frontend/src/i18n/locales/pt-br.ts
index 2914fdb2fa3..070de84fc05 100644
--- a/studio/frontend/src/i18n/locales/pt-br.ts
+++ b/studio/frontend/src/i18n/locales/pt-br.ts
@@ -2223,8 +2223,6 @@ export const ptBR = {
showResponseModel: "Mostrar o modelo da resposta",
showResponseModelDescription:
"Mostra os metadados do modelo nas respostas do assistente.",
- inlineReadAloud: "Leitura em voz alta nas respostas",
- inlineReadAloudDescription: "Mostrar Leitura em voz alta em cada resposta, em vez de no menu Mais.",
inlineEditResponse: "Editar resposta nas respostas",
inlineEditResponseDescription: "Mostrar Editar resposta em cada resposta, em vez de no menu Mais.",
modelDisclaimer: "Mostrar aviso do modelo",
diff --git a/studio/frontend/src/i18n/locales/ru.ts b/studio/frontend/src/i18n/locales/ru.ts
index 13846054a40..74bfe3c7c05 100644
--- a/studio/frontend/src/i18n/locales/ru.ts
+++ b/studio/frontend/src/i18n/locales/ru.ts
@@ -2219,8 +2219,6 @@ export const ru = {
showResponseModel: "Показывать модель в ответах",
showResponseModelDescription:
"Показывать метаданные модели в ответах ассистента.",
- inlineReadAloud: "Чтение вслух в ответах",
- inlineReadAloudDescription: "Показывать «Чтение вслух» у каждого ответа, а не в меню «Ещё».",
inlineEditResponse: "Изменение ответа в ответах",
inlineEditResponseDescription: "Показывать «Изменить ответ» у каждого ответа, а не в меню «Ещё».",
modelDisclaimer: "Показывать предупреждение о модели",
diff --git a/studio/frontend/src/i18n/locales/zh-CN.ts b/studio/frontend/src/i18n/locales/zh-CN.ts
index 5b6b868eae6..f79672b2573 100644
--- a/studio/frontend/src/i18n/locales/zh-CN.ts
+++ b/studio/frontend/src/i18n/locales/zh-CN.ts
@@ -2167,8 +2167,6 @@ export const zhCN = {
"滚动 底部 跳转 最新 箭头 按钮 隐藏 scroll bottom button",
showResponseModel: "显示回复模型",
showResponseModelDescription: "在助手回复中显示模型元数据。",
- inlineReadAloud: "在回复上显示朗读",
- inlineReadAloudDescription: "在每条回复上显示朗读,而不是放在“更多”菜单中。",
inlineEditResponse: "在回复上显示编辑回复",
inlineEditResponseDescription: "在每条回复上显示编辑回复,而不是放在“更多”菜单中。",
modelDisclaimer: "显示模型免责声明",
diff --git a/studio/frontend/src/index.css b/studio/frontend/src/index.css
index 7c07c2942e3..68fe60954c1 100644
--- a/studio/frontend/src/index.css
+++ b/studio/frontend/src/index.css
@@ -2388,12 +2388,13 @@ html[data-chat-font] .aui-root {
padding-left: 0;
}
- /* Branch picker chevron buttons sit beside action bar icon buttons
- (size-8, rounded-full). Height + radius match for visual
- alignment, but width is tighter so the small chevron glyph reads
- as a compact control rather than a full-size icon button. */
+ /* Branch picker chevrons: small glyphs with no hover fill, so they read as part of the count. */
+ /* Lands the › tip where a last action icon's ink would end, inside the bubble's edge. */
+ .aui-user-branch-picker {
+ margin-right: calc(3.4px * var(--ui-space-scale, 1));
+ }
.aui-branch-chevron-btn {
- @apply inline-flex h-8 w-6 cursor-pointer items-center justify-center rounded-full p-0 text-chat-icon-fg transition-colors hover:bg-chat-icon-bg-hover hover:text-chat-icon-fg-hover focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-30 disabled:hover:bg-transparent;
+ @apply inline-flex size-[calc(20px*var(--ui-space-scale,1))] shrink-0 cursor-pointer items-center justify-center rounded-full p-0 text-chat-icon-fg transition-colors hover:text-black active:text-black dark:hover:text-white dark:active:text-white focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-30 disabled:hover:text-chat-icon-fg dark:disabled:hover:text-chat-icon-fg;
}
.sidebar-row-action:hover .sidebar-row-action-glyph,
.sidebar-row-action[data-state="open"] .sidebar-row-action-glyph {
diff --git a/studio/frontend/src/lib/action-bar-icons.ts b/studio/frontend/src/lib/action-bar-icons.ts
new file mode 100644
index 00000000000..9ddf33470e2
--- /dev/null
+++ b/studio/frontend/src/lib/action-bar-icons.ts
@@ -0,0 +1,46 @@
+// SPDX-License-Identifier: AGPL-3.0-only
+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
+
+import type { IconSvgElement } from "@hugeicons/react";
+
+// Message action bar glyphs, rescaled about the centre (stroke unchanged) so they match the stock
+// ones' optical size. Hugeicons (MIT).
+
+const path = (d: string, key: string) =>
+ ["path", { d, stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", key }] as const;
+
+// volume-02 at 1.1x: the stock one draws short beside Copy.
+export const ReadAloudIcon = [
+ path(
+ "M14.2 15.0948V8.9051C14.2 5.4454 14.2 3.7155 13.1822 3.285C12.1643 2.8545 10.9663 4.0777 8.5706 6.5241C7.3298 7.791 6.6219 8.0716 4.8566 8.0716C3.3128 8.0716 2.5409 8.0716 1.9864 8.4499C0.8354 9.2352 1.0094 10.7702 1.0094 12C1.0094 13.2298 0.8354 14.7647 1.9864 15.5501C2.5409 15.9284 3.3128 15.9284 4.8566 15.9284C6.6219 15.9284 7.3298 16.209 8.5706 17.4759C10.9663 19.9223 12.1643 21.1455 13.1822 20.715C14.2 20.2844 14.2 18.5546 14.2 15.0948Z",
+ "0",
+ ),
+ path(
+ "M17.5 8.7C18.1879 9.6016 18.6 10.7497 18.6 12C18.6 13.2503 18.1879 14.3983 17.5 15.3",
+ "1",
+ ),
+ path(
+ "M20.8 6.5C22.1759 8.0027 23 9.9163 23 12C23 14.0837 22.1759 15.9973 20.8 17.5",
+ "2",
+ ),
+] as unknown as IconSvgElement;
+
+// arrow-right-02 at 1.25x: the stock one draws small and thin beside the other icons.
+export const ContinueArrowIcon = [
+ path("M20.125 12L3.25 12", "0"),
+ path("M13.25 19.5C13.25 19.5 20.75 13.9764 20.75 12C20.75 10.0235 13.25 4.5 13.25 4.5", "1"),
+] as unknown as IconSvgElement;
+
+// edit-03 at 0.92x: its corner-to-corner diagonal reads larger than the other icons.
+export const EditResponseIcon = [
+ path(
+ "M4.4393 15.9645L3.72 20.28L8.0356 19.5607C8.785 19.4359 9.4767 19.08 10.0139 18.5427L19.7462 8.8102C20.4579 8.0985 20.4579 6.9445 19.7461 6.2328L17.7672 4.2538C17.0554 3.5421 15.9014 3.5421 15.1895 4.2538L5.4573 13.9863C4.9201 14.5235 4.5642 15.2151 4.4393 15.9645Z",
+ "0",
+ ),
+ path("M13.84 6.48L17.52 10.16", "1"),
+] as unknown as IconSvgElement;
+
+// Plain straight chevrons for the branch picker.
+export const BranchPrevIcon = [path("M15 6L9 12L15 18", "0")] as unknown as IconSvgElement;
+
+export const BranchNextIcon = [path("M9 6L15 12L9 18", "0")] as unknown as IconSvgElement;
diff --git a/studio/frontend/src/lib/fork-icon.ts b/studio/frontend/src/lib/fork-icon.ts
new file mode 100644
index 00000000000..1e0ef3b4721
--- /dev/null
+++ b/studio/frontend/src/lib/fork-icon.ts
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: AGPL-3.0-only
+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
+
+import type { IconSvgElement } from "@hugeicons/react";
+
+const path = (d: string, key: string) =>
+ ["path", { d, stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", key }] as const;
+
+// Fork actions' glyph: Hugeicons split (MIT), turned 90° clockwise so it branches to the right,
+// at 1.05x to match the other icons' weight and nudged left, as most of its ink is on the right.
+export const ForkIcon = [
+ path("M14.525 21.45H16.52C18.302 21.45 19.1929 21.45 19.7464 20.8964C20.3 20.3429 20.3 19.452 20.3 17.67V15.675M19.25 20.4L13.475 14.625", "0"),
+ path(
+ "M14.525 2.55H16.52C18.302 2.55 19.1929 2.55 19.7464 3.1036C20.3 3.6571 20.3 4.5481 20.3 6.33V8.325M19.25 3.6L13.3103 9.5397C12.0963 10.7537 11.4894 11.3605 10.7176 11.6803C9.9457 12 9.0874 12 7.3706 12H1.4",
+ "1",
+ ),
+] as unknown as IconSvgElement;
diff --git a/studio/frontend/tests/chat-thought-continuation.test.ts b/studio/frontend/tests/chat-thought-continuation.test.ts
index bc4e384bb89..60967205cac 100644
--- a/studio/frontend/tests/chat-thought-continuation.test.ts
+++ b/studio/frontend/tests/chat-thought-continuation.test.ts
@@ -191,12 +191,20 @@ test("a closed thought with no recorded time stays untimed", () => {
assert.deepEqual(tracker.metadata(), {});
});
-test("Continue response sits after Edit response and yields to the Resume bar", () => {
+test("Continue response leads the More menu and yields to the Resume bar", () => {
const thread = readSrc("components/assistant-ui/thread.tsx");
+ // Continue response is the More menu's first item, before Edit response.
assert.match(
thread,
- /\{inlineEdit && <EditAssistantMessageButton \/>\}\n\s*<ContinueResponseButton \/>\n\s*\{!researchRunId && !researchActive && \(\n\s*<ActionBarPrimitive\.Reload/,
+ /<ContinueResponseMenuItem \/>\n\s*\{!inlineEdit && <EditAssistantMessageMenuItem \/>\}/,
);
+ // Bar order: Edit, Fork, Read aloud (or Stop reading), Refresh.
+ assert.match(
+ thread,
+ /\{inlineEdit && <EditAssistantMessageButton \/>\}\n\s*<ForkCountBadge \/>\n\s*<ForkMessageButton \/>\n\s*\{ttsEnabled && \(\n\s*<MessagePrimitive\.If speaking=\{false\}>\n\s*<ActionBarPrimitive\.Speak[\s\S]*?<\/ActionBarPrimitive\.StopSpeaking>\n\s*<\/MessagePrimitive\.If>\n\s*\{!researchRunId && !researchActive && \(\n\s*<ActionBarPrimitive\.Reload/,
+ );
+ // Delete is the More menu's last item, not a bar button.
+ assert.match(thread, /<DeleteMessageMenuItem \/>\n\s*<\/div>\n\s*<\/ActionBarMorePrimitive\.Content>/);
// A stopped reply already offers Resume; a reply being edited continues from the saved text;
// a cited reply would lose its sources in the sibling.
assert.match(