From 77950e48c76f4a3b29d01831d43039caba29888a Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期二, 18 十一月 2025 14:12:42 +0800
Subject: [PATCH] 修改
---
app/components/base/chat/embedded-chatbot/context.tsx | 33 ++++++++++-----------------------
1 files changed, 10 insertions(+), 23 deletions(-)
diff --git a/app/components/base/chat/embedded-chatbot/context.tsx b/app/components/base/chat/embedded-chatbot/context.tsx
index fb00dbd..f48247a 100644
--- a/app/components/base/chat/embedded-chatbot/context.tsx
+++ b/app/components/base/chat/embedded-chatbot/context.tsx
@@ -14,7 +14,6 @@
AppMeta,
ConversationItem,
} from '@/models/share'
-import { noop } from 'lodash-es'
export type EmbeddedChatbotContextValue = {
appInfoError?: any
@@ -28,28 +27,22 @@
appPrevChatList: ChatItem[]
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
handleNewConversationCompleted: (newConversationId: string) => void
chatShouldReloadKey: string
isMobile: boolean
isInstalledApp: boolean
- allowResetChat: boolean
appId?: string
handleFeedback: (messageId: string, feedback: Feedback) => void
currentChatInstanceRef: RefObject<{ handleStop: () => void }>
themeBuilder?: ThemeBuilder
- 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 EmbeddedChatbotContext = createContext<EmbeddedChatbotContextValue>({
@@ -57,25 +50,19 @@
appPrevChatList: [],
pinnedConversationList: [],
conversationList: [],
+ showConfigPanelBeforeChat: false,
newConversationInputs: {},
newConversationInputsRef: { current: {} },
- handleNewConversationInputsChange: noop,
+ handleNewConversationInputsChange: () => {},
inputsForms: [],
- handleNewConversation: noop,
- handleStartChat: noop,
- handleChangeConversation: noop,
- handleNewConversationCompleted: noop,
+ handleNewConversation: () => {},
+ handleStartChat: () => {},
+ handleChangeConversation: () => {},
+ handleNewConversationCompleted: () => {},
chatShouldReloadKey: '',
isMobile: false,
isInstalledApp: false,
- allowResetChat: true,
- handleFeedback: noop,
- currentChatInstanceRef: { current: { handleStop: noop } },
- clearChatList: false,
- setClearChatList: noop,
- isResponding: false,
- setIsResponding: noop,
- currentConversationInputs: {},
- setCurrentConversationInputs: noop,
+ handleFeedback: () => {},
+ currentChatInstanceRef: { current: { handleStop: () => {} } },
})
export const useEmbeddedChatbotContext = () => useContext(EmbeddedChatbotContext)
--
Gitblit v1.8.0