fix: remove chat variable in workflow mode (#18696)

pull/18728/head
zxhlyh 10 months ago committed by GitHub
parent 7b00f35a0d
commit 13f647feaa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -3,9 +3,15 @@ import ChatVariableButton from '@/app/components/workflow/header/chat-variable-b
import {
useNodesReadOnly,
} from '@/app/components/workflow/hooks'
import { useIsChatMode } from '../../hooks'
const ChatVariableTrigger = () => {
const { nodesReadOnly } = useNodesReadOnly()
const isChatMode = useIsChatMode()
if (!isChatMode)
return null
return <ChatVariableButton disabled={nodesReadOnly} />
}
export default memo(ChatVariableTrigger)

@ -74,7 +74,7 @@ const WorkflowPanelOnRight = () => {
)
}
{
showChatVariablePanel && (
showChatVariablePanel && isChatMode && (
<ChatVariablePanel />
)
}

Loading…
Cancel
Save