refactor: remove ChatHeader from Thread component and update related logic, improving code clarity and maintaining consistent header display in chat interface

This commit is contained in:
Anish Sarkar 2026-03-06 22:38:49 +05:30
parent 662f4db13d
commit 8d5d8e490c
4 changed files with 19 additions and 25 deletions

View file

@ -13,9 +13,10 @@ import { ModelSelector } from "./model-selector";
interface ChatHeaderProps {
searchSpaceId: number;
className?: string;
}
export function ChatHeader({ searchSpaceId }: ChatHeaderProps) {
export function ChatHeader({ searchSpaceId, className }: ChatHeaderProps) {
// LLM config sidebar state
const [sidebarOpen, setSidebarOpen] = useState(false);
const [selectedConfig, setSelectedConfig] = useState<
@ -85,6 +86,7 @@ export function ChatHeader({ searchSpaceId }: ChatHeaderProps) {
onAddNewLLM={handleAddNewLLM}
onEditImage={handleEditImageConfig}
onAddNewImage={handleAddImageModel}
className={className}
/>
<ModelConfigSidebar
open={sidebarOpen}