From 72db9044e29ed1d3597ba0cb4e86fd0761b42ac4 Mon Sep 17 00:00:00 2001 From: euvre <93761161+euvre@users.noreply.github.com> Date: Thu, 18 Jun 2026 01:24:35 -0700 Subject: [PATCH] fix: use RESTful pipeline detail API with knowledgeId and logId (#16182) The pipeline file log detail hook (`useFetchPipelineFileLogDetail`) was calling the legacy `kbService.getPipelineDetail({ log_id })` endpoint, which does not match the current RESTful API contract. The backend now expects both `datasetId` and `logId` to construct the correct URL (`GET /api/v1/datasets/{datasetId}/ingestions/{logId}`). --- web/src/pages/dataflow-result/hooks.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/web/src/pages/dataflow-result/hooks.ts b/web/src/pages/dataflow-result/hooks.ts index 87ede9ccb0..4cb1bc5868 100644 --- a/web/src/pages/dataflow-result/hooks.ts +++ b/web/src/pages/dataflow-result/hooks.ts @@ -4,7 +4,7 @@ import { useSetModalState, useShowDeleteConfirm } from '@/hooks/common-hooks'; import { useGetKnowledgeSearchParams } from '@/hooks/route-hook'; import { useFetchMessageTrace } from '@/hooks/use-agent-request'; import { useCreateChunk, useDeleteChunk } from '@/hooks/use-chunk-request'; -import kbService from '@/services/knowledge-service'; +import kbService, { getPipelineDetail } from '@/services/knowledge-service'; import { formatSecondsToHumanReadable } from '@/utils/date'; import { buildChunkHighlights } from '@/utils/document-util'; import { useMutation, useQuery } from '@tanstack/react-query'; @@ -33,6 +33,7 @@ export const useFetchPipelineFileLogDetail = ({ const { id } = useParams(); const [searchParams] = useSearchParams(); const logId = searchParams.get('id') || id; + const knowledgeId = searchParams.get('knowledgeId') || ''; let queryKey: (string | number)[] = []; if (typeof refreshCount === 'number') { @@ -45,10 +46,8 @@ export const useFetchPipelineFileLogDetail = ({ gcTime: 0, enabled: !isAgent, queryFn: async () => { - if (isEdit) { - const { data } = await kbService.getPipelineDetail({ - log_id: logId, - }); + if (isEdit && knowledgeId && logId) { + const { data } = await getPipelineDetail(knowledgeId, logId); return data?.data ?? {}; } else { return {};