Kaynağa Gözat

fix: 手机端chat对话区域高度问题(输入框撑下去了)、历史会话菜单无法自动关闭、开启新对话没有清理历史数据

zl 1 ay önce
ebeveyn
işleme
fb1929d208

+ 1 - 1
web/app/components/base/chat/chat-with-history/header-in-mobile.tsx

@@ -105,7 +105,7 @@ const HeaderInMobile = () => {
         <div className='fixed inset-0 z-50 flex p-1 bg-background-overlay'
           onClick={() => setShowSidebar(false)}
         >
-          <div className='flex h-full w-[calc(100vw_-_40px)] bg-components-panel-bg backdrop-blur-sm rounded-xl shadow-lg' onClick={e => e.stopPropagation()}>
+          <div className='flex h-full w-[calc(100vw_-_40px)] bg-components-panel-bg backdrop-blur-sm rounded-xl shadow-lg'>
             <Sidebar />
           </div>
         </div>

+ 1 - 0
web/app/components/base/chat/chat-with-history/hooks.tsx

@@ -319,6 +319,7 @@ export const useChatWithHistory = (installedAppInfo?: InstalledApp) => {
       handleChangeConversation('')
     }
     else if (currentConversationId) {
+      handleChangeConversation('')
       handleConversationIdInfoChange('')
       setShowNewConversationItemInList(true)
       handleNewConversationInputsChange({})

+ 1 - 1
web/app/components/base/chat/chat-with-history/index.tsx

@@ -82,7 +82,7 @@ const ChatWithHistory: FC<ChatWithHistoryProps> = ({
       {isMobile && (
         <HeaderInMobile />
       )}
-      <div className={cn('relative grow p-2')}>
+      <div className={cn('relative grow p-2')} style={{ maxHeight: 'calc(100% - 56px)' }}>
         {isSidebarCollapsed && (
           <div
             className={cn(