feat: 优化聊天 UI

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
feie9456 2026-04-26 22:15:02 +08:00
parent 47e6da63e9
commit 1e3e04f7d8
2 changed files with 58 additions and 58 deletions

View File

@ -464,7 +464,7 @@ function AppContent() {
return undefined
}
const timeoutId = window.setTimeout(() => setNotice(null), 2600)
const timeoutId = window.setTimeout(() => setNotice(null), 600)
return () => window.clearTimeout(timeoutId)
}, [notice])
@ -1677,7 +1677,7 @@ function AppContent() {
onDeleteSession={deleteSession}
/>
<main className="main-panel min-w-0">
<main className="main-panel relative min-w-0">
<header className="topbar border-b bg-background/95 px-3 py-2 backdrop-blur">
<div className="topbar-left">
<Button
@ -1721,10 +1721,10 @@ function AppContent() {
</header>
{notice ? (
<div className="notice-wrap px-4 pt-3">
<div className="notice-wrap pointer-events-none absolute left-0 right-0 top-14 z-20 px-4 bg-background">
<div
className={cn(
"rounded-lg border px-3 py-2 text-sm",
"rounded-lg border px-3 py-2 text-sm shadow-sm",
notice.tone === "success" &&
"border-emerald-500/20 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300",
notice.tone === "warning" &&

View File

@ -452,9 +452,9 @@ function MessageItem({
return (
<article
className={cn(
"message-row flex",
"message-row flex flex-col",
message.role === "tool" && "gap-3",
isUserMessage ? "justify-end" : "justify-start"
isUserMessage ? "items-end" : "items-start"
)}
>
{message.role === "tool" ? (
@ -572,6 +572,7 @@ function MessageItem({
{usage ? <span>Token {usage}</span> : null}
</div>
) : null}
</div>
{!editing ? (
<div
className={cn(
@ -619,7 +620,6 @@ function MessageItem({
</Button>
</div>
) : null}
</div>
</article>
)
}