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.

478 B
Raw Blame
import type { ResearchTaskProgressEvent } from './services/research-task-events'

export function timeValue(value: number) {
  return value < 10_000_000_000 ? value * 1000 : value
}

export function mergeResearchProgressEvent(
  events: ResearchTaskProgressEvent[],
  event: ResearchTaskProgressEvent,
) {
  const next = events.filter((candidate) => candidate.sequence !== event.sequence)
  next.push(event)
  return next.sort((left, right) => left.sequence - right.sequence)
}