mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-25 00:16:29 +02:00
assistant chat ui shows the model name properly
This commit is contained in:
parent
f4dbb58a77
commit
75842fa06b
1 changed files with 6 additions and 2 deletions
|
|
@ -81,6 +81,10 @@ export interface SelectedModel {
|
||||||
model: string
|
model: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getSelectedModelDisplayName(model: string) {
|
||||||
|
return model.split('/').pop() || model
|
||||||
|
}
|
||||||
|
|
||||||
function getAttachmentIcon(kind: AttachmentIconKind) {
|
function getAttachmentIcon(kind: AttachmentIconKind) {
|
||||||
switch (kind) {
|
switch (kind) {
|
||||||
case 'audio':
|
case 'audio':
|
||||||
|
|
@ -516,7 +520,7 @@ function ChatInputInner({
|
||||||
className="flex h-7 shrink-0 items-center gap-1 rounded-full px-2 text-xs text-muted-foreground"
|
className="flex h-7 shrink-0 items-center gap-1 rounded-full px-2 text-xs text-muted-foreground"
|
||||||
title={`${providerDisplayNames[lockedModel.provider] || lockedModel.provider} — fixed for this chat`}
|
title={`${providerDisplayNames[lockedModel.provider] || lockedModel.provider} — fixed for this chat`}
|
||||||
>
|
>
|
||||||
<span className="max-w-[150px] truncate">{lockedModel.model}</span>
|
<span className="max-w-[150px] truncate">{getSelectedModelDisplayName(lockedModel.model)}</span>
|
||||||
</span>
|
</span>
|
||||||
) : configuredModels.length > 0 ? (
|
) : configuredModels.length > 0 ? (
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
|
|
@ -526,7 +530,7 @@ function ChatInputInner({
|
||||||
className="flex h-7 shrink-0 items-center gap-1 rounded-full px-2 text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"
|
className="flex h-7 shrink-0 items-center gap-1 rounded-full px-2 text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"
|
||||||
>
|
>
|
||||||
<span className="max-w-[150px] truncate">
|
<span className="max-w-[150px] truncate">
|
||||||
{configuredModels.find((m) => `${m.provider}/${m.model}` === activeModelKey)?.model || configuredModels[0]?.model || 'Model'}
|
{getSelectedModelDisplayName(configuredModels.find((m) => `${m.provider}/${m.model}` === activeModelKey)?.model || configuredModels[0]?.model || 'Model')}
|
||||||
</span>
|
</span>
|
||||||
<ChevronDown className="h-3 w-3" />
|
<ChevronDown className="h-3 w-3" />
|
||||||
</button>
|
</button>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue