|
|
@@ -1009,15 +1009,11 @@ function _Chat() {
|
|
|
|
|
|
const [selectedFruit, setSelectedFruit] = React.useState(chatStore.chatMode);
|
|
|
|
|
|
- // useEffect(() => {
|
|
|
- // }, []);
|
|
|
-
|
|
|
// 获取应用列表
|
|
|
const fetchApplicationList = async () => {
|
|
|
setLoading(true);
|
|
|
try {
|
|
|
let url = null;
|
|
|
- console.log('selectedFruit', selectedFruit);
|
|
|
if (selectedFruit === 'LOCAL') {
|
|
|
url = '/deepseek/api/application/list';
|
|
|
} else {
|
|
|
@@ -1687,7 +1683,7 @@ function _Chat() {
|
|
|
trigger="click"
|
|
|
title="分享该应用"
|
|
|
content={() => {
|
|
|
- const url = `${window.location.origin}/#/knowledgeChat?showMenu=false&appId=${appValue}`
|
|
|
+ const url = `${window.location.origin}/#/knowledgeChat?showMenu=false&chatMode=${selectedFruit}&appId=${appValue}`
|
|
|
return <div>
|
|
|
<div style={{ marginBottom: 10 }}>
|
|
|
{url}
|
|
|
@@ -2076,10 +2072,18 @@ function _Chat() {
|
|
|
|
|
|
export function Chat() {
|
|
|
const chatStore = useChatStore();
|
|
|
+ const location = useLocation();
|
|
|
const sessionIndex = chatStore.currentSessionIndex;
|
|
|
|
|
|
useEffect(() => {
|
|
|
chatStore.setModel('BigModel');
|
|
|
+ const search = location.search;
|
|
|
+ const params = new URLSearchParams(search);
|
|
|
+ const chatMode = params.get('chatMode');
|
|
|
+
|
|
|
+ if (chatMode) {
|
|
|
+ chatStore.setChatMode(chatMode as "ONLINE" | "LOCAL");
|
|
|
+ }
|
|
|
}, []);
|
|
|
|
|
|
return <_Chat key={sessionIndex}></_Chat>;
|