fix(ui): panel toggle in header bar + message spacing
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
- Move side panel toggle from floating button to chat header right side (Trae Solo style) via new PanelToggleButton component - Add px-6 py-4 padding to message list container - Add mb-5 gap between messages for readable vertical spacing
This commit is contained in:
@@ -12,7 +12,7 @@ import { type UnlistenFn } from '@tauri-apps/api/event';
|
||||
import { safeListenEvent } from '../lib/safe-tauri';
|
||||
import { Paperclip, ArrowUp, MessageSquare, Download, X, FileText, Image as ImageIcon, Search, ClipboardList, Square } from 'lucide-react';
|
||||
import { Button, EmptyState, MessageListSkeleton, LoadingDots } from './ui';
|
||||
import { ResizableChatLayout } from './ai/ResizableChatLayout';
|
||||
import { ResizableChatLayout, PanelToggleButton } from './ai/ResizableChatLayout';
|
||||
import { ArtifactPanel } from './ai/ArtifactPanel';
|
||||
import { ToolCallChain, type ToolCallStep } from './ai/ToolCallChain';
|
||||
import { TaskProgress, type Subtask } from './ai/TaskProgress';
|
||||
@@ -361,6 +361,13 @@ export function ChatArea({ compact, onOpenDetail }: { compact?: boolean; onOpenD
|
||||
<Search className="w-3.5 h-3.5" />
|
||||
</Button>
|
||||
)}
|
||||
{/* Side panel toggle — Trae Solo style, in header */}
|
||||
{!compact && (
|
||||
<PanelToggleButton
|
||||
panelOpen={artifactPanelOpen}
|
||||
onToggle={() => setArtifactPanelOpen(!artifactPanelOpen)}
|
||||
/>
|
||||
)}
|
||||
{/* 详情按钮 (简洁模式) */}
|
||||
{compact && onOpenDetail && (
|
||||
<Button
|
||||
@@ -398,7 +405,7 @@ export function ChatArea({ compact, onOpenDetail }: { compact?: boolean; onOpenD
|
||||
</AnimatePresence>
|
||||
|
||||
{/* Messages */}
|
||||
<Conversation className="flex-1 bg-white dark:bg-gray-900">
|
||||
<Conversation className="flex-1 bg-white dark:bg-gray-900 px-6 py-4">
|
||||
<AnimatePresence mode="popLayout">
|
||||
{/* Loading skeleton */}
|
||||
{isLoading && messages.length === 0 && (
|
||||
@@ -467,6 +474,7 @@ export function ChatArea({ compact, onOpenDetail }: { compact?: boolean; onOpenD
|
||||
animate="visible"
|
||||
layout
|
||||
transition={defaultTransition}
|
||||
className="mb-5"
|
||||
>
|
||||
<MessageBubble message={message} onRetry={createRetryHandler(message.id)} />
|
||||
</motion.div>
|
||||
|
||||
Reference in New Issue
Block a user