mirror of
https://github.com/langgenius/dify.git
synced 2026-08-02 18:56:34 +08:00
15 lines
511 B
TypeScript
15 lines
511 B
TypeScript
import { memo } from 'react'
|
|
import ChatVariableButton from '@/app/components/workflow/header/chat-variable-button'
|
|
import { useNodesReadOnly } from '@/app/components/workflow/hooks/use-workflow'
|
|
import { useIsChatMode } from '../../hooks/use-is-chat-mode'
|
|
|
|
const ChatVariableTrigger = () => {
|
|
const { nodesReadOnly } = useNodesReadOnly()
|
|
const isChatMode = useIsChatMode()
|
|
|
|
if (!isChatMode) return null
|
|
|
|
return <ChatVariableButton disabled={nodesReadOnly} />
|
|
}
|
|
export default memo(ChatVariableTrigger)
|