mirror of
https://github.com/langgenius/dify.git
synced 2025-07-18 06:41:29 +00:00
37 lines
774 B
TypeScript
37 lines
774 B
TypeScript
'use client'
|
|
import 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
|