Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
import type { TextReplaceResponse } from '@/types/workflow'
import { produce } from 'immer'
import { useCallback } from 'react'
import { useWorkflowStore } from '@/app/components/workflow/store'
export const useWorkflowTextReplace = () => {
const workflowStore = useWorkflowStore()
const handleWorkflowTextReplace = useCallback(
(params: TextReplaceResponse) => {
const {
data: { text },
} = params
const { workflowRunningData, setWorkflowRunningData } = workflowStore.getState()
setWorkflowRunningData(
produce(workflowRunningData!, (draft) => {
draft.resultText = text
draft.resultTextSelectorKey = undefined
}),
)
},
[workflowStore],
)
return {
handleWorkflowTextReplace,
}
}