From 75842fa06b1aa936eff45c03e07369fee92f8c86 Mon Sep 17 00:00:00 2001
From: Arjun <6592213+arkml@users.noreply.github.com>
Date: Thu, 23 Apr 2026 00:49:06 +0530
Subject: [PATCH] assistant chat ui shows the model name properly
---
.../renderer/src/components/chat-input-with-mentions.tsx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/apps/x/apps/renderer/src/components/chat-input-with-mentions.tsx b/apps/x/apps/renderer/src/components/chat-input-with-mentions.tsx
index 0d2eb13d..e1fb950f 100644
--- a/apps/x/apps/renderer/src/components/chat-input-with-mentions.tsx
+++ b/apps/x/apps/renderer/src/components/chat-input-with-mentions.tsx
@@ -81,6 +81,10 @@ export interface SelectedModel {
model: string
}
+function getSelectedModelDisplayName(model: string) {
+ return model.split('/').pop() || model
+}
+
function getAttachmentIcon(kind: AttachmentIconKind) {
switch (kind) {
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"
title={`${providerDisplayNames[lockedModel.provider] || lockedModel.provider} — fixed for this chat`}
>
- {lockedModel.model}
+ {getSelectedModelDisplayName(lockedModel.model)}
) : configuredModels.length > 0 ? (
@@ -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"
>
- {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')}