mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-01 09:06:55 +00:00
feat: UI component rendering in agent dialog mode (#1083)
Co-authored-by: csunny <cfqsunny@163.com>
This commit is contained in:
@@ -15,7 +15,7 @@ import { getInitMessage } from '@/utils';
|
||||
|
||||
const ChatContainer = () => {
|
||||
const searchParams = useSearchParams();
|
||||
const { scene, chatId, model, setModel, history, setHistory } = useContext(ChatContext);
|
||||
const { scene, chatId, model, agent, setModel, history, setHistory } = useContext(ChatContext);
|
||||
const chat = useChat({});
|
||||
const initMessage = (searchParams && searchParams.get('initMessage')) ?? '';
|
||||
|
||||
@@ -95,7 +95,7 @@ const ChatContainer = () => {
|
||||
});
|
||||
});
|
||||
},
|
||||
[history, chat, model],
|
||||
[history, chat, chatId, model, agent, scene],
|
||||
);
|
||||
|
||||
return (
|
||||
@@ -122,7 +122,7 @@ const ChatContainer = () => {
|
||||
)}
|
||||
{/** chat panel */}
|
||||
<div
|
||||
className={classNames('flex flex-1 flex-col', {
|
||||
className={classNames('flex flex-1 flex-col overflow-hidden', {
|
||||
'px-0 xl:pl-4 h-2/5 w-full xl:w-auto xl:h-full border-t xl:border-t-0 xl:border-l dark:border-gray-800': scene === 'chat_dashboard',
|
||||
'h-full lg:px-8': scene !== 'chat_dashboard',
|
||||
})}
|
||||
|
Reference in New Issue
Block a user