From 64ed0806ff31cabda8f0ef846bb4c03651eb2d84 Mon Sep 17 00:00:00 2001 From: Naiyuan Qing <145280634+NevilleQingNY@users.noreply.github.com> Date: Mon, 13 Apr 2026 16:57:48 +0800 Subject: [PATCH] refactor(chat): polish chat UI with design system tokens and components - Replace raw + + Chat History @@ -151,7 +154,7 @@ function SessionItem({ > {agent?.avatar_url && } - + @@ -174,13 +177,15 @@ function SessionItem({ {onArchive && ( - + + )} ); diff --git a/packages/views/chat/components/chat-window.tsx b/packages/views/chat/components/chat-window.tsx index 609baf627..50572f920 100644 --- a/packages/views/chat/components/chat-window.tsx +++ b/packages/views/chat/components/chat-window.tsx @@ -4,6 +4,7 @@ import { useCallback, useEffect, useRef } from "react"; import { useQuery, useQueryClient } from "@tanstack/react-query"; import { Minus, Maximize2, Minimize2, Send, ChevronDown, Bot, Plus, History } from "lucide-react"; import { Avatar, AvatarFallback, AvatarImage } from "@multica/ui/components/ui/avatar"; +import { Button } from "@multica/ui/components/ui/button"; import { DropdownMenu, DropdownMenuContent, @@ -226,8 +227,8 @@ export function ChatWindow() { const hasMessages = messages.length > 0 || timelineItems.length > 0; const containerClass = isFullscreen - ? "fixed inset-y-0 right-0 z-50 flex flex-col w-[50%] border-l bg-background shadow-2xl" - : "fixed bottom-4 right-4 z-50 flex flex-col w-[420px] h-[600px] rounded-xl border bg-background shadow-2xl overflow-hidden"; + ? "fixed top-4 right-4 bottom-4 z-50 flex flex-col w-[50%] rounded-xl ring-1 ring-foreground/10 bg-sidebar shadow-2xl overflow-hidden" + : "fixed bottom-4 right-4 z-50 flex flex-col w-[420px] h-[600px] rounded-xl ring-1 ring-foreground/10 bg-sidebar shadow-2xl overflow-hidden"; return (
@@ -240,38 +241,46 @@ export function ChatWindow() { onSelect={handleSelectAgent} />
- - + - + - + + +
)} @@ -329,20 +338,20 @@ function AgentSelector({ return ( - + {activeAgent.name} - + {agents.map((agent) => ( onSelect(agent)} - className="flex items-center gap-2" + className="flex min-w-0 items-center gap-2" > - {agent.name} + {agent.name} ))} @@ -354,7 +363,7 @@ function AgentAvatarSmall({ agent }: { agent: Agent }) { return ( {agent.avatar_url && } - +