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.

fix(web): add dayjs relativeTime plugin (#22761)

quicksand90c4df7919b8
diff --git a/web/app/components/tools/mcp/hooks.ts b/web/app/components/tools/mcp/hooks.ts
index b2b521557f9..562be6f0791 100644
--- a/web/app/components/tools/mcp/hooks.ts
+++ b/web/app/components/tools/mcp/hooks.ts
@@ -1,7 +1,10 @@
import dayjs from 'dayjs'
+import relativeTime from 'dayjs/plugin/relativeTime'
import { useCallback } from 'react'
import { useI18N } from '@/context/i18n'
+dayjs.extend(relativeTime)
+
export const useFormatTimeFromNow = () => {
const { locale } = useI18N()
const formatTimeFromNow = useCallback((time: number) => {