Kamil Furtak
commited on
Commit
·
a3a06d0
1
Parent(s):
95de84c
fix truncation
Browse files
app/components/chat/ModelSelector.tsx
CHANGED
|
@@ -3,6 +3,7 @@ import { useEffect, useState, useRef } from 'react';
|
|
| 3 |
import type { KeyboardEvent } from 'react';
|
| 4 |
import type { ModelInfo } from '~/lib/modules/llm/types';
|
| 5 |
import { classNames } from '~/utils/classNames';
|
|
|
|
| 6 |
|
| 7 |
interface ModelSelectorProps {
|
| 8 |
model?: string;
|
|
@@ -190,11 +191,11 @@ export const ModelSelector = ({
|
|
| 190 |
aria-controls="model-listbox"
|
| 191 |
aria-haspopup="listbox"
|
| 192 |
>
|
| 193 |
-
<div className="flex items-center justify-between
|
| 194 |
-
<
|
| 195 |
-
<
|
| 196 |
className={classNames(
|
| 197 |
-
'i-ph:caret-down
|
| 198 |
isModelDropdownOpen ? 'rotate-180' : undefined,
|
| 199 |
)}
|
| 200 |
/>
|
|
|
|
| 3 |
import type { KeyboardEvent } from 'react';
|
| 4 |
import type { ModelInfo } from '~/lib/modules/llm/types';
|
| 5 |
import { classNames } from '~/utils/classNames';
|
| 6 |
+
import * as React from 'react';
|
| 7 |
|
| 8 |
interface ModelSelectorProps {
|
| 9 |
model?: string;
|
|
|
|
| 191 |
aria-controls="model-listbox"
|
| 192 |
aria-haspopup="listbox"
|
| 193 |
>
|
| 194 |
+
<div className="flex items-center justify-between">
|
| 195 |
+
<div className="truncate">{modelList.find((m) => m.name === model)?.label || 'Select model'}</div>
|
| 196 |
+
<div
|
| 197 |
className={classNames(
|
| 198 |
+
'i-ph:caret-down w-4 h-4 text-bolt-elements-textSecondary opacity-75',
|
| 199 |
isModelDropdownOpen ? 'rotate-180' : undefined,
|
| 200 |
)}
|
| 201 |
/>
|