From eae41c635d14c8c7d25615c3be8b8431063b332c Mon Sep 17 00:00:00 2001 From: josh <144584931+dancer@users.noreply.github.com> Date: Tue, 9 Sep 2025 22:19:34 +0100 Subject: [PATCH] fix: small ui nits (#1178) --- app/(chat)/chat/[id]/page.tsx | 1 - components/chat-header.tsx | 4 +-- components/elements/context.tsx | 3 +- components/elements/prompt-input.tsx | 1 + components/icons.tsx | 15 ++++++---- components/message.tsx | 6 ++-- components/messages.tsx | 4 +-- components/model-selector.tsx | 10 +++---- components/multimodal-input.tsx | 43 +++++++++++++--------------- components/preview-attachment.tsx | 6 ++-- components/sidebar-toggle.tsx | 2 +- components/visibility-selector.tsx | 2 +- lib/db/queries.ts | 2 +- 13 files changed, 50 insertions(+), 49 deletions(-) diff --git a/app/(chat)/chat/[id]/page.tsx b/app/(chat)/chat/[id]/page.tsx index b4eaaac..cf3b71e 100644 --- a/app/(chat)/chat/[id]/page.tsx +++ b/app/(chat)/chat/[id]/page.tsx @@ -7,7 +7,6 @@ import { getChatById, getMessagesByChatId } from '@/lib/db/queries'; import { DataStreamHandler } from '@/components/data-stream-handler'; import { DEFAULT_CHAT_MODEL } from '@/lib/ai/models'; import { convertToUIMessages } from '@/lib/utils'; -import { LanguageModelV2Usage } from '@ai-sdk/provider'; export default async function Page(props: { params: Promise<{ id: string }> }) { const params = await props.params; diff --git a/components/chat-header.tsx b/components/chat-header.tsx index 5ecae19..e6986f4 100644 --- a/components/chat-header.tsx +++ b/components/chat-header.tsx @@ -35,7 +35,7 @@ function PureChatHeader({ {(!open || windowWidth < 768) && ( - + {availableChatModels.map((chatModel) => { const { id } = chatModel; @@ -83,16 +83,16 @@ export function ModelSelector({ > diff --git a/components/multimodal-input.tsx b/components/multimodal-input.tsx index 46148a2..18b7ef1 100644 --- a/components/multimodal-input.tsx +++ b/components/multimodal-input.tsx @@ -253,7 +253,7 @@ function PureMultimodalInput({ }, [status, scrollToBottom]); return ( -
+
{!isAtBottom && ( ); } @@ -455,16 +454,16 @@ function PureModelSelectorCompact({ > {selectedModel?.name || 'Select model'} - + {chatModels.map((model) => ( -
-
{model.name}
-
+
+
{model.name}
+
{model.description}
@@ -487,16 +486,14 @@ function PureStopButton({ return ( ); } diff --git a/components/preview-attachment.tsx b/components/preview-attachment.tsx index ce75aad..3df229c 100644 --- a/components/preview-attachment.tsx +++ b/components/preview-attachment.tsx @@ -18,7 +18,7 @@ export const PreviewAttachment = ({ const { name, url, contentType } = attachment; return ( -
+
{contentType?.startsWith('image') ? ( ) : ( -
+
File
)} @@ -50,7 +50,7 @@ export const PreviewAttachment = ({ )} -
+
{name}
diff --git a/components/sidebar-toggle.tsx b/components/sidebar-toggle.tsx index 7036f03..fc1d959 100644 --- a/components/sidebar-toggle.tsx +++ b/components/sidebar-toggle.tsx @@ -22,7 +22,7 @@ export function SidebarToggle({ data-testid="sidebar-toggle-button" onClick={toggleSidebar} variant="outline" - className="h-8 px-1 md:h-fit md:px-2" + className="h-8 px-2 md:h-fit md:px-2" > diff --git a/components/visibility-selector.tsx b/components/visibility-selector.tsx index 3b75b11..df30bd5 100644 --- a/components/visibility-selector.tsx +++ b/components/visibility-selector.tsx @@ -71,7 +71,7 @@ export function VisibilitySelector({