From f012707ebfb2b3374c196768283ea8b598562837 Mon Sep 17 00:00:00 2001 From: Innei Date: Thu, 4 Sep 2025 23:38:33 +0800 Subject: [PATCH] fix(ai-chat): improve layout responsiveness in AIModelIndicator and ChatInterface components - Updated the AIModelIndicator to conditionally display the model name based on screen size, enhancing visibility on smaller devices. - Modified the ChatInterface to utilize a container class for better layout management, ensuring consistent styling across different screen sizes. These changes enhance the user experience by improving the adaptability of the UI components. Signed-off-by: Innei --- .../modules/ai-chat/components/layouts/AIModelIndicator.tsx | 4 +++- .../src/modules/ai-chat/components/layouts/ChatInterface.tsx | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/desktop/layer/renderer/src/modules/ai-chat/components/layouts/AIModelIndicator.tsx b/apps/desktop/layer/renderer/src/modules/ai-chat/components/layouts/AIModelIndicator.tsx index 7ea68ec42..7d7670171 100644 --- a/apps/desktop/layer/renderer/src/modules/ai-chat/components/layouts/AIModelIndicator.tsx +++ b/apps/desktop/layer/renderer/src/modules/ai-chat/components/layouts/AIModelIndicator.tsx @@ -74,7 +74,9 @@ export const AIModelIndicator = memo(({ className, onModelChange }: AIModelIndic )} > - {AIModelNameMapping[modelName] || modelName} + + {AIModelNameMapping[modelName] || modelName} + {hasMultipleModels && } ) diff --git a/apps/desktop/layer/renderer/src/modules/ai-chat/components/layouts/ChatInterface.tsx b/apps/desktop/layer/renderer/src/modules/ai-chat/components/layouts/ChatInterface.tsx index ec3814a35..843902575 100644 --- a/apps/desktop/layer/renderer/src/modules/ai-chat/components/layouts/ChatInterface.tsx +++ b/apps/desktop/layer/renderer/src/modules/ai-chat/components/layouts/ChatInterface.tsx @@ -227,7 +227,7 @@ const ChatInterfaceContent = ({ centerInputOnEmpty }: ChatInterfaceProps) => { return ( -
+
{!hasMessages && !isLoadingHistory ? (