diff --git a/web/app/components/rag-pipeline/components/panel/test-run/index.tsx b/web/app/components/rag-pipeline/components/panel/test-run/index.tsx index 078bce24d7..5c718bb3da 100644 --- a/web/app/components/rag-pipeline/components/panel/test-run/index.tsx +++ b/web/app/components/rag-pipeline/components/panel/test-run/index.tsx @@ -9,7 +9,7 @@ import VectorSpaceFull from '@/app/components/billing/vector-space-full' import WebsiteCrawl from './data-source/website-crawl' import Actions from './data-source/actions' import DocumentProcessing from './document-processing' -import { usePipelineRun } from '../../../hooks' +import { useWorkflowRun } from '@/app/components/workflow/hooks' import type { Datasource } from './types' import { DatasourceType } from '@/models/pipeline' import { TransferMethod } from '@/types/app' @@ -44,7 +44,7 @@ const TestRunPanel = () => { setWebsitePages, setWebsiteCrawlJobId, } = useWebsiteCrawl() - const { handleRun } = usePipelineRun() + const { handleRun } = useWorkflowRun() const isVectorSpaceFull = plan.usage.vectorSpace >= plan.total.vectorSpace const isShowVectorSpaceFull = allFileLoaded && isVectorSpaceFull && enableBilling diff --git a/web/app/components/rag-pipeline/components/rag-pipeline-header/index.tsx b/web/app/components/rag-pipeline/components/rag-pipeline-header/index.tsx index d614ac8173..177778fcdb 100644 --- a/web/app/components/rag-pipeline/components/rag-pipeline-header/index.tsx +++ b/web/app/components/rag-pipeline/components/rag-pipeline-header/index.tsx @@ -3,6 +3,7 @@ import { useCallback, useMemo, } from 'react' +import { useTranslation } from 'react-i18next' import type { HeaderProps } from '@/app/components/workflow/header' import Header from '@/app/components/workflow/header' import { fetchWorkflowRunHistory } from '@/service/workflow' @@ -14,6 +15,7 @@ import InputFieldButton from './input-field-button' import Publisher from './publisher' const RagPipelineHeader = () => { + const { t } = useTranslation() const workflowStore = useWorkflowStore() const pipelineId = useStore(s => s.pipelineId) const showDebugAndPreviewPanel = useStore(s => s.showDebugAndPreviewPanel) @@ -39,7 +41,7 @@ const RagPipelineHeader = () => { }, runAndHistoryProps: { showRunButton: true, - runButtonText: 'Test Run', + runButtonText: t('workflow.singleRun.testRun'), viewHistoryProps, isRunning: showDebugAndPreviewPanel, onStopRun: handleStopRun, @@ -49,7 +51,7 @@ const RagPipelineHeader = () => { viewHistoryProps, }, } - }, [viewHistoryProps, showDebugAndPreviewPanel, handleStopRun]) + }, [viewHistoryProps, showDebugAndPreviewPanel, handleStopRun, t]) return (