fix(chat): move toolbar to Header and add New Session button
- Move ChatToolbar (session selector, refresh, thinking toggle) from the Chat page body into the Header component, so controls appear at the same level as the "Chat" title - Add New Session button (+) to create a fresh conversation - Add newSession action to chat store - Header conditionally renders ChatToolbar only on /chat route - Chat page fills full content area without duplicate toolbar
This commit is contained in:
@@ -10,7 +10,6 @@ import { Card, CardContent } from '@/components/ui/card';
|
||||
import { useChatStore } from '@/stores/chat';
|
||||
import { useGatewayStore } from '@/stores/gateway';
|
||||
import { LoadingSpinner } from '@/components/common/LoadingSpinner';
|
||||
import { ChatToolbar } from './ChatToolbar';
|
||||
import { ChatMessage } from './ChatMessage';
|
||||
import { ChatInput } from './ChatInput';
|
||||
import { extractText } from './message-utils';
|
||||
@@ -63,13 +62,7 @@ export function Chat() {
|
||||
const streamText = streamingMessage ? extractText(streamingMessage) : '';
|
||||
|
||||
return (
|
||||
<div className="flex h-[calc(100vh-4rem)] flex-col">
|
||||
{/* Toolbar: session selector, refresh, thinking toggle */}
|
||||
<div className="flex items-center justify-between px-4 py-2 border-b">
|
||||
<div /> {/* spacer */}
|
||||
<ChatToolbar />
|
||||
</div>
|
||||
|
||||
<div className="flex flex-col -m-6" style={{ height: 'calc(100vh - 3.5rem)' }}>
|
||||
{/* Messages Area */}
|
||||
<div className="flex-1 overflow-y-auto px-4 py-4">
|
||||
<div className="max-w-4xl mx-auto space-y-4">
|
||||
|
||||
Reference in New Issue
Block a user