mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-11 13:58:58 +00:00
feat: The dialog list shows logical changes
This commit is contained in:
@@ -155,7 +155,7 @@ const ChatSider: React.FC<{
|
||||
}> = ({ dialogueList = [], refresh, historyLoading, listLoading, order }) => {
|
||||
const { t } = useTranslation();
|
||||
const { mode } = useContext(ChatContext);
|
||||
const [collapsed, setCollapsed] = useState<boolean>(false);
|
||||
const [collapsed, setCollapsed] = useState<boolean>(true);
|
||||
|
||||
// 展开或收起列表按钮样式
|
||||
const triggerStyle: React.CSSProperties = useMemo(() => {
|
||||
@@ -194,6 +194,7 @@ const ChatSider: React.FC<{
|
||||
theme={mode}
|
||||
width={280}
|
||||
collapsible={true}
|
||||
collapsed={collapsed}
|
||||
collapsedWidth={0}
|
||||
trigger={collapsed ? <CaretRightOutlined className="text-base" /> : <CaretLeftOutlined className="text-base" />}
|
||||
zeroWidthTriggerStyle={triggerStyle}
|
||||
|
@@ -251,9 +251,20 @@ const Chat: React.FC = () => {
|
||||
}
|
||||
}, [isChatDefault]);
|
||||
|
||||
if (scene === 'chat_dashboard') {
|
||||
return <>{isContract ? <DbEditor /> : <ChatContainer />}</>;
|
||||
}
|
||||
// if (scene === 'chat_dashboard') {
|
||||
// return (
|
||||
// <div>
|
||||
// <ChatSider
|
||||
// refresh={refreshDialogList}
|
||||
// dialogueList={dialogueList}
|
||||
// listLoading={listLoading}
|
||||
// historyLoading={historyLoading}
|
||||
// order={order}
|
||||
// />
|
||||
// {isContract ? <DbEditor /> : <ChatContainer />}
|
||||
// </div>
|
||||
// );
|
||||
// }
|
||||
|
||||
return (
|
||||
<ChatContentContext.Provider
|
||||
@@ -293,7 +304,8 @@ const Chat: React.FC = () => {
|
||||
order={order}
|
||||
/>
|
||||
<Layout className="bg-transparent">
|
||||
{isChatDefault ? (
|
||||
{scene === 'chat_dashboard' ? (isContract ? <DbEditor /> : <ChatContainer />) : null}
|
||||
{scene !== 'chat_dashboard' ? (isChatDefault ? (
|
||||
<Content>
|
||||
<ChatDefault />
|
||||
</Content>
|
||||
@@ -304,7 +316,7 @@ const Chat: React.FC = () => {
|
||||
<ChatInputPanel ctrl={ctrl} />
|
||||
</Content>
|
||||
</Spin>
|
||||
)}
|
||||
)) : null}
|
||||
</Layout>
|
||||
</Layout>
|
||||
</Flex>
|
||||
|
Reference in New Issue
Block a user