refactor: update dataset handling to use runtime_mode instead of pipeline_id

This commit is contained in:
twwu
2025-06-12 15:57:07 +08:00
parent b1f250862f
commit 6f17200dec
7 changed files with 12 additions and 10 deletions

View File

@ -13,9 +13,10 @@ const Settings = ({
datasetId,
documentId,
}: SettingsProps) => {
const pipelineId = useDatasetDetailContextWithSelector(s => s.dataset?.pipeline_id)
const runtimeMode = useDatasetDetailContextWithSelector(s => s.dataset?.runtime_mode)
const isGeneralDataset = runtimeMode === 'general'
if (!pipelineId) {
if (isGeneralDataset) {
return (
<DocumentSettings
datasetId={datasetId}

View File

@ -173,7 +173,7 @@ const Documents: FC<IDocumentsProps> = ({ datasetId }) => {
const routeToDocCreate = () => {
// if dataset is create from pipeline, redirect to create from pipeline page
if (dataset?.pipeline_id) {
if (dataset?.runtime_mode === 'rag_pipeline') {
router.push(`/datasets/${datasetId}/documents/create-from-pipeline`)
return
}