fix truncation

This commit is contained in:
Kamil Furtak 2025-02-15 16:42:40 +01:00
parent 95de84c41a
commit a3a06d03ba

View File

@ -3,6 +3,7 @@ import { useEffect, useState, useRef } from 'react';
import type { KeyboardEvent } from 'react'; import type { KeyboardEvent } from 'react';
import type { ModelInfo } from '~/lib/modules/llm/types'; import type { ModelInfo } from '~/lib/modules/llm/types';
import { classNames } from '~/utils/classNames'; import { classNames } from '~/utils/classNames';
import * as React from 'react';
interface ModelSelectorProps { interface ModelSelectorProps {
model?: string; model?: string;
@ -190,11 +191,11 @@ export const ModelSelector = ({
aria-controls="model-listbox" aria-controls="model-listbox"
aria-haspopup="listbox" aria-haspopup="listbox"
> >
<div className="flex items-center justify-between whitespace-nowrap"> <div className="flex items-center justify-between">
<span>{modelList.find((m) => m.name === model)?.label || 'Select model'}</span> <div className="truncate">{modelList.find((m) => m.name === model)?.label || 'Select model'}</div>
<span <div
className={classNames( className={classNames(
'i-ph:caret-down transition-transform', 'i-ph:caret-down w-4 h-4 text-bolt-elements-textSecondary opacity-75',
isModelDropdownOpen ? 'rotate-180' : undefined, isModelDropdownOpen ? 'rotate-180' : undefined,
)} )}
/> />