|
|
@@ -395,7 +395,6 @@ export const SideBar = (props: { className?: string }) => {
|
|
|
const appId = '1881269958412521255';
|
|
|
url = `/bigmodel/api/dialog/list/${appId}`;
|
|
|
}
|
|
|
-
|
|
|
const res = await api.get(url);
|
|
|
const list = res.data.map((item: any) => {
|
|
|
return {
|
|
|
@@ -542,15 +541,17 @@ export const SideBar = (props: { className?: string }) => {
|
|
|
<SideBarHeader
|
|
|
title={getType() === 'bigModel' ?
|
|
|
<div style={{ display: 'flex', alignItems: 'center' }}>
|
|
|
- {isMobileScreen && <div>
|
|
|
- <Button
|
|
|
- type='text'
|
|
|
- icon={<MenuOutlined />}
|
|
|
- onClick={() => {
|
|
|
- globalStore.setShowMenu(!globalStore.showMenu);
|
|
|
- }}
|
|
|
- />
|
|
|
- </div>}
|
|
|
+ {
|
|
|
+ isMobileScreen && <div>
|
|
|
+ <Button
|
|
|
+ type='text'
|
|
|
+ icon={<MenuOutlined />}
|
|
|
+ onClick={() => {
|
|
|
+ globalStore.setShowMenu(!globalStore.showMenu);
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ }
|
|
|
问答历史
|
|
|
</div>
|
|
|
:
|
|
|
@@ -574,6 +575,7 @@ export const SideBar = (props: { className?: string }) => {
|
|
|
chatStore.updateCurrentSession((value) => {
|
|
|
value.appId = globalStore.selectedAppId;
|
|
|
});
|
|
|
+ globalStore.setShowMenu(false);
|
|
|
if (getType() === 'bigModel') {
|
|
|
navigate({ pathname: '/newChat' });
|
|
|
} else {
|
|
|
@@ -618,7 +620,12 @@ export const SideBar = (props: { className?: string }) => {
|
|
|
</SideBarHeader>
|
|
|
<Menu
|
|
|
style={{ border: 'none' }}
|
|
|
- onClick={async ({ key }) => {
|
|
|
+ onClick={async (info) => {
|
|
|
+ const key = info.key;
|
|
|
+ // @ts-ignore
|
|
|
+ const props = info.item.props;
|
|
|
+ const { showMenu, chatMode, appId } = props;
|
|
|
+ globalStore.setShowMenu(false);
|
|
|
let url = ``;
|
|
|
if (getType() === 'bigModel') {
|
|
|
if (chatStore.chatMode === 'LOCAL') {
|
|
|
@@ -656,7 +663,13 @@ export const SideBar = (props: { className?: string }) => {
|
|
|
value.messages = list;
|
|
|
});
|
|
|
if (getType() === 'bigModel') {
|
|
|
- navigate({ pathname: '/newChat' });
|
|
|
+ const search = `?showMenu=${showMenu}&chatMode=${chatMode}&appId=${appId}`;
|
|
|
+ if (appId) {
|
|
|
+ navigate({
|
|
|
+ pathname: '/knowledgeChat',
|
|
|
+ search: search,
|
|
|
+ })
|
|
|
+ }
|
|
|
} else {
|
|
|
navigate({ pathname: '/newDeepseekChat' });
|
|
|
}
|