Commit 4ff829ec2 for llama.cpp
commit 4ff829ec2e2f526aa6afba529eebbfb3ef1f95ec
Author: Benjamin Babik <ben@curlyben.com>
Date: Thu Sep 17 10:18:13 2026 +0100
ui: fix removed reasoning menu in single model mode on desktop (#27985)
* ui: fix accidentally removed reasoning menu in single model mode on desktop
* ui: formatting task run to fix storybook test
* ui: mount the add menu reasoning submenu outside router mode only
The models selector already owns the reasoning submenu in router mode,
so the add menu only mounts it in single model mode. The first enabled
item of the add menu is now the reasoning submenu, the accessibility
story expects it.
---------
Co-authored-by: Ben Babik <work@benjaminbabik.com>
Co-authored-by: Pascal <admin@serveurperso.com>
diff --git a/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddDropdown.svelte b/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddDropdown.svelte
index 9c3a9e891..1ce731845 100644
--- a/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddDropdown.svelte
+++ b/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddDropdown.svelte
@@ -1,6 +1,10 @@
<script lang="ts">
import { File, Image, MessageSquare, Mic, Plus, Video } from '@lucide/svelte';
- import { ChatFormActionAddToolsSubmenu, McpLogo } from '$lib/components/app';
+ import {
+ ChatFormActionAddReasoningSubmenu,
+ ChatFormActionAddToolsSubmenu,
+ McpLogo
+ } from '$lib/components/app';
import { buttonVariants } from '$lib/components/ui/button';
import * as DropdownMenu from '$lib/components/ui/dropdown-menu';
import * as Tooltip from '$lib/components/ui/tooltip';
@@ -13,6 +17,7 @@
import { getChatFormActionsContext } from '$lib/contexts';
import { AttachmentAction, AttachmentItemEnabledWhen } from '$lib/enums';
import { useAttachmentMenu } from '$lib/hooks/use-attachment-menu.svelte';
+ import { serverStore } from '$lib/stores';
interface Props {
class?: string;
@@ -92,6 +97,13 @@
}
}}
>
+ <!-- in router mode the models selector owns the reasoning submenu -->
+ {#if !serverStore.isRouterMode}
+ <ChatFormActionAddReasoningSubmenu />
+
+ <DropdownMenu.Separator />
+ {/if}
+
<DropdownMenu.Item
class="flex cursor-pointer items-center gap-2"
onclick={() => attachmentMenu.callbacks[AttachmentAction.FILE_UPLOAD]()}
diff --git a/tools/ui/tests/stories/a11y/ChatScreenForm.a11y.stories.svelte b/tools/ui/tests/stories/a11y/ChatScreenForm.a11y.stories.svelte
index c56bfd767..6fa5924e0 100644
--- a/tools/ui/tests/stories/a11y/ChatScreenForm.a11y.stories.svelte
+++ b/tools/ui/tests/stories/a11y/ChatScreenForm.a11y.stories.svelte
@@ -45,7 +45,7 @@
await screen.findByRole('menu');
await waitFor(() => {
- expect(document.activeElement).toHaveTextContent('Add files');
+ expect(document.activeElement).toHaveTextContent('Reasoning');
});
}}
/>