mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 17:38:04 +08:00
refactor: update dataset handling to use runtime_mode instead of pipeline_id
This commit is contained in:
@ -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}
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user