mirror of
https://github.com/langgenius/dify.git
synced 2026-07-26 22:28:32 +08:00
24 lines
714 B
TypeScript
24 lines
714 B
TypeScript
'use client'
|
|
import * as React from 'react'
|
|
import { useDatasetDetailContextWithSelector } from '@/context/dataset-detail'
|
|
import DocumentSettings from './document-settings'
|
|
import PipelineSettings from './pipeline-settings'
|
|
|
|
type SettingsProps = {
|
|
datasetId: string
|
|
documentId: string
|
|
}
|
|
|
|
const Settings = ({ datasetId, documentId }: SettingsProps) => {
|
|
const runtimeMode = useDatasetDetailContextWithSelector((s) => s.dataset?.runtime_mode)
|
|
const isGeneralDataset = runtimeMode === 'general'
|
|
|
|
if (isGeneralDataset) {
|
|
return <DocumentSettings datasetId={datasetId} documentId={documentId} />
|
|
}
|
|
|
|
return <PipelineSettings datasetId={datasetId} documentId={documentId} />
|
|
}
|
|
|
|
export default Settings
|