Browse Source

去除掉用应用列表

李富豪 6 months ago
parent
commit
81ffd96a39
1 changed files with 13 additions and 3 deletions
  1. 13 3
      app/components/chat.tsx

+ 13 - 3
app/components/chat.tsx

@@ -1077,7 +1077,19 @@ function _Chat() {
   }
 
   useEffect(() => {
-    init();
+    if (!location.search.includes('showMenu=false')) {
+      init();
+    }
+    const search = location.search;
+    const params = new URLSearchParams(search);
+    const appId = params.get('appId');
+    if (appId) {
+      setAppValue(appId);
+      globalStore.setSelectedAppId(appId);
+      chatStore.updateCurrentSession((session) => {
+        session.appId = appId;
+      });
+    }
   }, [])
 
   useEffect(() => {
@@ -1626,7 +1638,6 @@ function _Chat() {
               }
             </div>
             <div>
-
               <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
                 <Select
                   style={{ width: '100%', height: 38, marginRight: 5 }}
@@ -1676,7 +1687,6 @@ function _Chat() {
               </div>
             </div>
           </div>
-
           <div className="window-actions">
             <div className="window-action-button">
               <Popover