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 <tukon479@gmail.com>
This commit is contained in:
Innei 2025-09-04 23:38:33 +08:00
parent 73a4e01e56
commit f012707ebf
No known key found for this signature in database
GPG Key ID: 0F62D33977F021F7
2 changed files with 4 additions and 2 deletions

View File

@ -74,7 +74,9 @@ export const AIModelIndicator = memo(({ className, onModelChange }: AIModelIndic
)}
>
<i className={cn("size-3", iconClass)} />
<span className="max-w-20 truncate">{AIModelNameMapping[modelName] || modelName}</span>
<span className="@sm:inline hidden max-w-20 truncate">
{AIModelNameMapping[modelName] || modelName}
</span>
{hasMultipleModels && <i className="i-mingcute-down-line size-3 opacity-60" />}
</div>
)

View File

@ -227,7 +227,7 @@ const ChatInterfaceContent = ({ centerInputOnEmpty }: ChatInterfaceProps) => {
return (
<GlobalFileDropZone className="flex size-full flex-col">
<div className="flex min-h-0 flex-1 flex-col" ref={scrollContainerParentRef}>
<div className="@container flex min-h-0 flex-1 flex-col" ref={scrollContainerParentRef}>
<AnimatePresence>
{!hasMessages && !isLoadingHistory ? (
<WelcomeScreen onSend={handleSendMessage} centerInputOnEmpty={centerInputOnEmpty} />