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.

523 B
Raw Blame
import { useCallback } from 'react'

export const useGetRunAndTraceUrl = (snippetId: string) => {
  const getWorkflowRunAndTraceUrl = useCallback(
    (runId?: string) => {
      if (!runId) {
        return {
          runUrl: '',
          traceUrl: '',
        }
      }

      return {
        runUrl: `/snippets/${snippetId}/workflow-runs/${runId}`,
        traceUrl: `/snippets/${snippetId}/workflow-runs/${runId}/node-executions`,
      }
    },
    [snippetId],
  )

  return {
    getWorkflowRunAndTraceUrl,
  }
}