From bd35650c4c7d7829e2c227cd3a4c920951be0611 Mon Sep 17 00:00:00 2001 From: Aleksander Grygier Date: Mon, 16 Nov 2026 10:37:11 +0100 Subject: [PATCH 1/3] ui: move the reasoning effort into the model picker The chat form's row no longer holds the reasoning button: the model picker ends with a Reasoning row, in place of Manage models, that shows the level in use and opens the levels under it. A phone's model drawer has the same row. A desktop server with a single model, whose selector opens the manager instead of a picker, keeps the button beside it. Assisted-by: Claude (Opus 5.5 Medium) --- .../ChatFormActions/ChatFormActions.svelte | 5 +- .../ModelsSelector/ModelsSelector.svelte | 17 ++++ .../ModelsSelectorDropdown.svelte | 29 ++++--- .../ModelsSelectorReasoning.svelte | 87 +++++++++++++++++++ 4 files changed, 125 insertions(+), 13 deletions(-) create mode 100644 ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorReasoning.svelte diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActions.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActions.svelte index 987c5a350cac..d71a8da5d891 100644 --- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActions.svelte +++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActions.svelte @@ -2,7 +2,6 @@ import { Button } from '@ggml-org/llama-ui/ui/button'; import { SkipForward, Square } from '@lucide/svelte'; import { - ChatFormActionReasoning, ChatFormActionRecord, ChatFormActionsAdd, ChatFormActionSubmit, @@ -149,12 +148,12 @@ {/if} {#if showModelSelector} - - + {/if} diff --git a/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelector.svelte b/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelector.svelte index 3b24b83a0472..c64bc49c21f1 100644 --- a/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelector.svelte +++ b/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelector.svelte @@ -1,8 +1,10 @@ + +{#snippet header()} + {#if reasoning.isOff} + + {:else} + + {/if} + + Reasoning + + {current} +{/snippet} + +{#snippet levelLabel(level: ReasoningEffortLevel)} + {@const tokenLabel = reasoning.tokenLabel(level)} + + {#if reasoning.isSelected(level)} + + {:else} +
+ {/if} + + {level.label} + + {#if tokenLabel} + {tokenLabel} + {/if} +{/snippet} + +{#if variant === 'menu'} + + + +
+ {#each reasoning.levels as level (level.value)} + reasoning.select(level)}> + {@render levelLabel(level)} + + {/each} +
+
+
+{:else} +
+ +
+ {#each reasoning.levels as level (level.value)} + + {/each} +
+
+
+{/if} From 18834b33f06213f1576724ddb1fb17d87102ff52 Mon Sep 17 00:00:00 2001 From: Aleksander Grygier Date: Mon, 16 Nov 2026 13:05:40 +0100 Subject: [PATCH 2/3] ui: show a reasoning effort that is not the default on the model selector Next to the model on the closed selector, a set level shows as its word, and reasoning that is off as a small crossed-out lightbulb. At the default, which leaves it to the model, nothing more shows. Assisted-by: Claude (Opus 5.5 Medium) --- .../ModelsSelector/ModelsSelector.svelte | 6 ++++ .../ModelsSelectorDropdown.svelte | 6 ++++ .../ModelsSelectorReasoningBadge.svelte | 34 +++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorReasoningBadge.svelte diff --git a/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelector.svelte b/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelector.svelte index c64bc49c21f1..7138a07f91cb 100644 --- a/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelector.svelte +++ b/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelector.svelte @@ -1,6 +1,7 @@ + +{#if reasoning.isOff} + + +{:else if reasoning.currentEffort !== ReasoningEffort.DEFAULT} + + + + Reasoning {REASONING_EFFORT_LABELS[reasoning.currentEffort]} + +{/if} From ecd578d3346e5d630353c33cbe74159208485441 Mon Sep 17 00:00:00 2001 From: Aleksander Grygier Date: Thu, 19 Nov 2026 11:12:01 +0100 Subject: [PATCH 3/3] ui: keep the model picker's footer in place while it opens in Safari WebKit pins a bottom-sticky element against the scaled box of a parent that zooms in, so the Reasoning row rode up over the model list until the opening animation ended. The desktop picker now scrolls its search and list in a box of their own, with the footer under it. Assisted-by: Claude (Opus 5.5 Medium) --- .../ModelsSelectorDropdown.svelte | 7 +- .../navigation/DropdownMenuSearchable.svelte | 65 ++++++++++++------- 2 files changed, 46 insertions(+), 26 deletions(-) diff --git a/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorDropdown.svelte b/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorDropdown.svelte index 979509c17a83..aef7b0883fc5 100644 --- a/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorDropdown.svelte +++ b/ui/apps/chat/src/lib/components/app/models/ModelsSelector/ModelsSelectorDropdown.svelte @@ -188,7 +188,7 @@ { // bits-ui re-mounts the focus scope when the drawer opens or closes, so this runs with the menu still open; trigger focus would show its tooltip @@ -209,11 +209,12 @@ onSearchChange={(v) => ms.setSearchTerm(v)} {onSearchKeyDown} placeholder="Search models..." + scrollport searchClass="bg-transparent" searchValue={ms.searchTerm} > - + {@render pickerContent('px-1.5')} diff --git a/ui/apps/chat/src/lib/components/app/navigation/DropdownMenuSearchable.svelte b/ui/apps/chat/src/lib/components/app/navigation/DropdownMenuSearchable.svelte index 4bfccbc91d7e..bc652d811dba 100644 --- a/ui/apps/chat/src/lib/components/app/navigation/DropdownMenuSearchable.svelte +++ b/ui/apps/chat/src/lib/components/app/navigation/DropdownMenuSearchable.svelte @@ -18,10 +18,18 @@ searchClass?: string; children: Snippet; /** - * Optional sticky footer: it sticks to the bottom of DropdownMenu.Content's own - * scrollport, which must stay the scroll container (overflow-y-auto + max-height). + * Optional footer. By default it sticks to the bottom of the parent's scrollport + * (overflow-y-auto + max-height), see `scrollport`. */ footer?: Snippet; + /** + * Scroll the header and the list in a box of their own, with the footer under it + * instead of sticking. For a parent that scales as it opens (a dropdown's zoom-in): + * WebKit pins a bottom-sticky element against the scaled box, so the footer would + * ride up the list until the animation ends. The parent is then a flex column that + * does not scroll itself (flex flex-col overflow-hidden + max-height). + */ + scrollport?: boolean; } let { @@ -34,6 +42,7 @@ onSearchChange, onSearchKeyDown, placeholder = 'Search...', + scrollport = false, searchClass = '', searchValue = $bindable('') }: Props = $props(); @@ -42,32 +51,42 @@ let stickyHeaderHeight = $state(0); -
- -
+{#snippet body()} +
+ +
+ +
+ +
+ {@render children()} -
- -
- {@render children()} + {#if isEmpty} +
{emptyMessage}
+ {/if} +
+
+{/snippet} - {#if isEmpty} -
{emptyMessage}
- {/if} +{#if scrollport} +
+ {@render body()}
-
+{:else} + {@render body()} +{/if} {#if footer} -
+