Skip to content

armgit / dify

Public Imported from GitHub
0

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.

618 B
Raw Blame
import { useAtomValue } from 'jotai'
import { useCallback } from 'react'
import { knowledgePipelineIdentityAtom } from '@/app/components/workflow/editor-resource/state'

export const useGetRunAndTraceUrl = () => {
  const { pipelineId } = useAtomValue(knowledgePipelineIdentityAtom)
  const getWorkflowRunAndTraceUrl = useCallback(
    (runId: string) => {
      return {
        runUrl: `/rag/pipelines/${pipelineId}/workflow-runs/${runId}`,
        traceUrl: `/rag/pipelines/${pipelineId}/workflow-runs/${runId}/node-executions`,
      }
    },
    [pipelineId],
  )

  return {
    getWorkflowRunAndTraceUrl,
  }
}