feat: Improve Model Selector responsiveness

This commit is contained in:
Aleksander Grygier 2025-11-23 22:23:50 +01:00
parent 1c214e9a49
commit ef5f9d07b0
2 changed files with 5 additions and 4 deletions

View File

@ -59,10 +59,10 @@
}); });
</script> </script>
<div class="flex w-full items-center gap-3 {className}"> <div class="flex w-full items-center gap-3 {className}" style="container-type: inline-size">
<ChatFormActionFileAttachments class="mr-auto" {disabled} {onFileUpload} /> <ChatFormActionFileAttachments class="mr-auto" {disabled} {onFileUpload} />
<SelectorModel class="max-w-80" forceForegroundText={true} /> <SelectorModel forceForegroundText={true} />
{#if isLoading} {#if isLoading}
<Button <Button

View File

@ -297,9 +297,10 @@
: isHighlightedCurrentModelActive : isHighlightedCurrentModelActive
? 'text-foreground' ? 'text-foreground'
: 'text-muted-foreground', : 'text-muted-foreground',
isOpen ? 'text-foreground' : '' isOpen ? 'text-foreground' : '',
className
)} )}
style="max-width: min(calc(100vw - 2rem), 32rem)" style="max-width: min(calc(100cqw - 6.5rem), 32rem)"
aria-haspopup={isRouter ? 'listbox' : undefined} aria-haspopup={isRouter ? 'listbox' : undefined}
aria-expanded={isRouter ? isOpen : undefined} aria-expanded={isRouter ? isOpen : undefined}
onclick={toggleOpen} onclick={toggleOpen}