From a430284aa21e3ae1f0d5654e55b2ad2852519cc2 Mon Sep 17 00:00:00 2001
From: wwf <yearningwang@iqtogether.com>
Date: 星期三, 04 六月 2025 15:17:49 +0800
Subject: [PATCH] 初始化

---
 app/components/base/chat/chat-with-history/context.tsx |   43 ++++++++++++++-----------------------------
 1 files changed, 14 insertions(+), 29 deletions(-)

diff --git a/app/components/base/chat/chat-with-history/context.tsx b/app/components/base/chat/chat-with-history/context.tsx
index 7dd7a78..4b5817c 100644
--- a/app/components/base/chat/chat-with-history/context.tsx
+++ b/app/components/base/chat/chat-with-history/context.tsx
@@ -15,7 +15,6 @@
   AppMeta,
   ConversationItem,
 } from '@/models/share'
-import { noop } from 'lodash-es'
 
 export type ChatWithHistoryContextValue = {
   appInfoError?: any
@@ -29,12 +28,13 @@
   appPrevChatTree: ChatItemInTree[]
   pinnedConversationList: AppConversationData['data']
   conversationList: AppConversationData['data']
+  showConfigPanelBeforeChat: boolean
   newConversationInputs: Record<string, any>
   newConversationInputsRef: RefObject<Record<string, any>>
   handleNewConversationInputsChange: (v: Record<string, any>) => void
   inputsForms: any[]
   handleNewConversation: () => void
-  handleStartChat: (callback?: any) => void
+  handleStartChat: () => void
   handleChangeConversation: (conversationId: string) => void
   handlePinConversation: (conversationId: string) => void
   handleUnpinConversation: (conversationId: string) => void
@@ -49,14 +49,6 @@
   handleFeedback: (messageId: string, feedback: Feedback) => void
   currentChatInstanceRef: RefObject<{ handleStop: () => void }>
   themeBuilder?: ThemeBuilder
-  sidebarCollapseState?: boolean
-  handleSidebarCollapse: (state: boolean) => void
-  clearChatList?: boolean
-  setClearChatList: (state: boolean) => void
-  isResponding?: boolean
-  setIsResponding: (state: boolean) => void,
-  currentConversationInputs: Record<string, any> | null,
-  setCurrentConversationInputs: (v: Record<string, any>) => void,
 }
 
 export const ChatWithHistoryContext = createContext<ChatWithHistoryContextValue>({
@@ -64,31 +56,24 @@
   appPrevChatTree: [],
   pinnedConversationList: [],
   conversationList: [],
+  showConfigPanelBeforeChat: false,
   newConversationInputs: {},
   newConversationInputsRef: { current: {} },
-  handleNewConversationInputsChange: noop,
+  handleNewConversationInputsChange: () => {},
   inputsForms: [],
-  handleNewConversation: noop,
-  handleStartChat: noop,
-  handleChangeConversation: noop,
-  handlePinConversation: noop,
-  handleUnpinConversation: noop,
-  handleDeleteConversation: noop,
+  handleNewConversation: () => {},
+  handleStartChat: () => {},
+  handleChangeConversation: () => {},
+  handlePinConversation: () => {},
+  handleUnpinConversation: () => {},
+  handleDeleteConversation: () => {},
   conversationRenaming: false,
-  handleRenameConversation: noop,
-  handleNewConversationCompleted: noop,
+  handleRenameConversation: () => {},
+  handleNewConversationCompleted: () => {},
   chatShouldReloadKey: '',
   isMobile: false,
   isInstalledApp: false,
-  handleFeedback: noop,
-  currentChatInstanceRef: { current: { handleStop: noop } },
-  sidebarCollapseState: false,
-  handleSidebarCollapse: noop,
-  clearChatList: false,
-  setClearChatList: noop,
-  isResponding: false,
-  setIsResponding: noop,
-  currentConversationInputs: {},
-  setCurrentConversationInputs: noop,
+  handleFeedback: () => {},
+  currentChatInstanceRef: { current: { handleStop: () => {} } },
 })
 export const useChatWithHistoryContext = () => useContext(ChatWithHistoryContext)

--
Gitblit v1.8.0