diff --git a/src/app/(main)/chat/(workspace)/@conversation/default.tsx b/src/app/(main)/chat/(workspace)/@conversation/default.tsx index 734bd06e2c796..9acfb8ee32062 100644 --- a/src/app/(main)/chat/(workspace)/@conversation/default.tsx +++ b/src/app/(main)/chat/(workspace)/@conversation/default.tsx @@ -1,9 +1,9 @@ -import Conversation from '@/features/Conversation'; import { isMobileDevice } from '@/utils/server/responsive'; import ChatHydration from './features/ChatHydration'; import DesktopChatInput from './features/ChatInput/Desktop'; import MobileChatInput from './features/ChatInput/Mobile'; +import ChatList from './features/ChatList'; import ZenModeToast from './features/ZenModeToast'; const ChatConversation = () => { @@ -13,7 +13,7 @@ const ChatConversation = () => { return ( <> - + diff --git a/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/Header/index.tsx b/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/Header/index.tsx index c5d68d61887cc..562b66ca88456 100644 --- a/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/Header/index.tsx +++ b/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/Header/index.tsx @@ -3,14 +3,19 @@ import { Maximize2, Minimize2 } from 'lucide-react'; import { memo } from 'react'; import ActionBar from '@/features/ChatInput/ActionBar'; +import { ActionKeys } from '@/features/ChatInput/types'; interface HeaderProps { expand: boolean; + leftActions: ActionKeys[]; + rightActions: ActionKeys[]; setExpand: (expand: boolean) => void; } -const Header = memo(({ expand, setExpand }) => ( +const Header = memo(({ expand, setExpand, leftActions, rightActions }) => ( { - const [expand, setExpand] = useState(false); +const defaultLeftActions = [ + 'model', + 'fileUpload', + 'knowledgeBase', + 'temperature', + 'history', + 'stt', + 'tools', + 'token', +] as ActionKeys[]; - const [inputHeight, updatePreference] = useGlobalStore((s) => [ - systemStatusSelectors.inputHeight(s), - s.updateSystemStatus, - ]); +const defaultRightActions = ['clear'] as ActionKeys[]; - return ( - <> - {!expand && } - { - if (!size) return; +interface DesktopChatInputProps { + leftActions?: ActionKeys[]; + rightActions?: ActionKeys[]; +} +const DesktopChatInput = memo( + ({ leftActions = defaultLeftActions, rightActions = defaultRightActions }) => { + const [expand, setExpand] = useState(false); - updatePreference({ - inputHeight: - typeof size.height === 'string' ? Number.parseInt(size.height) : size.height, - }); - }} - placement="bottom" - size={{ height: inputHeight, width: '100%' }} - style={{ zIndex: 10 }} - > - [ + systemStatusSelectors.inputHeight(s), + s.updateSystemStatus, + ]); + + return ( + <> + {!expand && } + { + if (!size) return; + + updatePreference({ + inputHeight: + typeof size.height === 'string' ? Number.parseInt(size.height) : size.height, + }); + }} + placement="bottom" + size={{ height: inputHeight, width: '100%' }} + style={{ zIndex: 10 }} > - -