Merge 5afdb462bd
into a30945312a
This commit is contained in:
commit
a02ca3123f
@ -221,6 +221,12 @@ export const useChatWithHistory = (installedAppInfo?: InstalledApp) => {
|
||||
handleNewConversationInputsChange(conversationInputs)
|
||||
}, [handleNewConversationInputsChange, inputsForms])
|
||||
|
||||
// when inputForms is empty, ConfigPanel set hide
|
||||
useEffect(() => {
|
||||
if (!inputsForms || inputsForms.length === 0)
|
||||
setShowConfigPanelBeforeChat(false)
|
||||
}, [inputsForms, setShowConfigPanelBeforeChat])
|
||||
|
||||
const { data: newConversation } = useSWR(newConversationId ? [isInstalledApp, appId, newConversationId] : null, () => generationConversationName(isInstalledApp, appId, newConversationId), { revalidateOnFocus: false })
|
||||
const [originConversationList, setOriginConversationList] = useState<ConversationItem[]>([])
|
||||
useEffect(() => {
|
||||
|
@ -311,6 +311,12 @@ export const useEmbeddedChatbot = () => {
|
||||
notify({ type: 'success', message: t('common.api.success') })
|
||||
}, [isInstalledApp, appId, t, notify])
|
||||
|
||||
// when inputForms is empty, ConfigPanel set hide
|
||||
useEffect(() => {
|
||||
if (!inputsForms || inputsForms.length === 0)
|
||||
setShowConfigPanelBeforeChat(false)
|
||||
}, [inputsForms, setShowConfigPanelBeforeChat])
|
||||
|
||||
return {
|
||||
appInfoError,
|
||||
appInfoLoading,
|
||||
|
Loading…
Reference in New Issue
Block a user