Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
a79618ee
"vscode:/vscode.git/clone" did not exist on "abd510a69615c6faf95f9269129341e3a6877353"
Commit
a79618ee
authored
May 02, 2024
by
Timothy J. Baek
Browse files
fix: selector input issue
parent
2789102d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
src/lib/components/chat/ModelSelector/Selector.svelte
src/lib/components/chat/ModelSelector/Selector.svelte
+9
-3
No files found.
src/lib/components/chat/ModelSelector/Selector.svelte
View file @
a79618ee
...
...
@@ -27,6 +27,8 @@
export let className = 'max-w-lg';
let show = false;
let selectedModel = '';
$: selectedModel = items.find((item) => item.value === value) ?? '';
...
...
@@ -181,6 +183,7 @@
</script>
<DropdownMenu.Root
bind:open={show}
onOpenChange={async () => {
searchValue = '';
window.setTimeout(() => document.getElementById('model-search-input')?.focus(), 0);
...
...
@@ -214,6 +217,7 @@
bind:value={searchValue}
class="w-full text-sm bg-transparent outline-none"
placeholder={searchPlaceholder}
autocomplete="off"
/>
</div>
...
...
@@ -222,10 +226,12 @@
<div class="px-3 my-2 max-h-72 overflow-y-auto scrollbar-none">
{#each filteredItems as item}
<
DropdownMenu.Item
<
button
class="flex w-full font-medium line-clamp-1 select-none items-center rounded-button py-2 pl-3 pr-1.5 text-sm text-gray-700 dark:text-gray-100 outline-none transition-all duration-75 hover:bg-gray-100 dark:hover:bg-gray-850 rounded-lg cursor-pointer data-[highlighted]:bg-muted"
on:click={() => {
value = item.value;
show = false;
}}
>
<div class="flex items-center gap-2">
...
...
@@ -294,7 +300,7 @@
<Check />
</div>
{/if}
</
DropdownMenu.Item
>
</
button
>
{:else}
<div>
<div class="block px-3 py-2 text-sm text-gray-700 dark:text-gray-100">
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment