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