mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 01:18:05 +08:00
collaborate conversation vars
This commit is contained in:
@ -21,6 +21,7 @@ import type {
|
||||
import { findUsedVarNodes, updateNodeVars } from '@/app/components/workflow/nodes/_base/components/variable/utils'
|
||||
import { useNodesSyncDraft } from '@/app/components/workflow/hooks/use-nodes-sync-draft'
|
||||
import { BlockEnum } from '@/app/components/workflow/types'
|
||||
import { useWebSocketStore } from '@/app/components/workflow/store/websocket-store'
|
||||
import { useDocLink } from '@/context/i18n'
|
||||
import cn from '@/utils/classnames'
|
||||
import useInspectVarsCrud from '../../hooks/use-inspect-vars-crud'
|
||||
@ -36,10 +37,14 @@ const ChatVariablePanel = () => {
|
||||
const {
|
||||
invalidateConversationVarValues,
|
||||
} = useInspectVarsCrud()
|
||||
const { emit } = useWebSocketStore()
|
||||
const handleVarChanged = useCallback(() => {
|
||||
doSyncWorkflowDraft(false, {
|
||||
onSuccess() {
|
||||
invalidateConversationVarValues()
|
||||
emit('vars-features-update', {
|
||||
timestamp: Date.now(),
|
||||
})
|
||||
},
|
||||
})
|
||||
}, [doSyncWorkflowDraft, invalidateConversationVarValues])
|
||||
|
||||
Reference in New Issue
Block a user