mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-15 17:35:55 +08:00
fix: remove chat variable in workflow mode (#18696)
This commit is contained in:
parent
7b00f35a0d
commit
13f647feaa
@ -3,9 +3,15 @@ import ChatVariableButton from '@/app/components/workflow/header/chat-variable-b
|
|||||||
import {
|
import {
|
||||||
useNodesReadOnly,
|
useNodesReadOnly,
|
||||||
} from '@/app/components/workflow/hooks'
|
} from '@/app/components/workflow/hooks'
|
||||||
|
import { useIsChatMode } from '../../hooks'
|
||||||
|
|
||||||
const ChatVariableTrigger = () => {
|
const ChatVariableTrigger = () => {
|
||||||
const { nodesReadOnly } = useNodesReadOnly()
|
const { nodesReadOnly } = useNodesReadOnly()
|
||||||
|
const isChatMode = useIsChatMode()
|
||||||
|
|
||||||
|
if (!isChatMode)
|
||||||
|
return null
|
||||||
|
|
||||||
return <ChatVariableButton disabled={nodesReadOnly} />
|
return <ChatVariableButton disabled={nodesReadOnly} />
|
||||||
}
|
}
|
||||||
export default memo(ChatVariableTrigger)
|
export default memo(ChatVariableTrigger)
|
||||||
|
@ -74,7 +74,7 @@ const WorkflowPanelOnRight = () => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
showChatVariablePanel && (
|
showChatVariablePanel && isChatMode && (
|
||||||
<ChatVariablePanel />
|
<ChatVariablePanel />
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user