diff --git a/web/src/components/assistants/WorkflowChat.tsx b/web/src/components/assistants/WorkflowChat.tsx index c3767f05..dcf444bf 100644 --- a/web/src/components/assistants/WorkflowChat.tsx +++ b/web/src/components/assistants/WorkflowChat.tsx @@ -1,14 +1,11 @@ -import React, { useCallback, useEffect } from "react"; +import React, { useCallback, useEffect, useState } from "react"; import useWorkflowChatStore from "../../stores/WorkflowChatStore"; -import { - Message, - MessageImageContent, - MessageTextContent -} from "../../stores/ApiTypes"; +import { Message } from "../../stores/ApiTypes"; import ChatView from "./ChatView"; import { useNodeStore } from "../../stores/NodeStore"; import { Alert, Box, Fade } from "@mui/material"; import { ChatHeader } from "./chat/ChatHeader"; +import ChatBubbleOutlineIcon from "@mui/icons-material/ChatBubbleOutline"; interface WorkflowChatProps { workflow_id: string; @@ -72,42 +69,36 @@ const WorkflowChat: React.FC = ({ return ( = ({ onMinimize={handleMinimize} onReset={handleReset} messagesCount={messages.length} - title="Workflow Chat" + title="Chat" + icon={} description="Chat with your workflow" /> @@ -125,8 +117,9 @@ const WorkflowChat: React.FC = ({ flex: 1, display: "flex", flexDirection: "column", - height: "calc(100% - 64px)", - overflow: "hidden" + // height: "calc(100% - 20px)", + overflow: "hidden", + pb: 5 }} > {error && {error}} diff --git a/web/src/components/assistants/chat/ChatHeader.tsx b/web/src/components/assistants/chat/ChatHeader.tsx index a9d34941..75c802d4 100644 --- a/web/src/components/assistants/chat/ChatHeader.tsx +++ b/web/src/components/assistants/chat/ChatHeader.tsx @@ -9,6 +9,7 @@ interface ChatHeaderProps { onReset?: () => void; messagesCount: number; title?: string; + icon?: React.ReactNode; description?: string; } @@ -18,19 +19,25 @@ export const ChatHeader: React.FC = ({ onReset, messagesCount, title, + icon, description }) => ( {!isMinimized && onReset && ( @@ -45,6 +52,9 @@ export const ChatHeader: React.FC = ({ padding: "0.5em 1em 0 1em", textAlign: "center", width: "100%", + display: "flex", + alignItems: "center", + gap: 3, cursor: "pointer", userSelect: "none", "&:hover": { @@ -52,6 +62,7 @@ export const ChatHeader: React.FC = ({ } }} > + {icon} {title} )}