From cfc69ebacbcea090a5c1b5d09e4eeba13955d10a Mon Sep 17 00:00:00 2001 From: Arjun <6592213+arkml@users.noreply.github.com> Date: Thu, 26 Mar 2026 22:51:48 +0530 Subject: [PATCH] preselect the first model as default in chat ui --- .../renderer/src/components/chat-input-with-mentions.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 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 0c041351..18010836 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 @@ -246,9 +246,8 @@ function ChatInputInner({ return 0 }) setConfiguredModels(models) - if (defaultKey) { - setActiveModelKey(defaultKey) - } + const activeKey = defaultKey || (models[0] ? `${models[0].flavor}/${models[0].model}` : '') + if (activeKey) setActiveModelKey(activeKey) } } catch { // No config yet