This commit is contained in:
あかり 2025-03-21 14:11:24 +08:00 committed by GitHub
commit a02ca3123f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 0 deletions

View File

@ -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(() => {

View File

@ -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,