Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
fix: segement settings of documents raise error (#8971)
非法操作fd437ff4c59d
diff --git a/web/app/components/datasets/documents/detail/settings/index.tsx b/web/app/components/datasets/documents/detail/settings/index.tsxindex def00ad37b1..b2646654584 100644--- a/web/app/components/datasets/documents/detail/settings/index.tsx+++ b/web/app/components/datasets/documents/detail/settings/index.tsx@@ -5,7 +5,7 @@ import { useBoolean } from 'ahooks'import { useContext } from 'use-context-selector'import { useRouter } from 'next/navigation'import DatasetDetailContext from '@/context/dataset-detail'-import type { FullDocumentDetail } from '@/models/datasets'+import type { CrawlOptions, CustomFile, FullDocumentDetail } from '@/models/datasets'import type { MetadataType } from '@/service/datasets'import { fetchDocumentDetail } from '@/service/datasets'@@ -15,6 +15,7 @@ import AccountSetting from '@/app/components/header/account-setting'import AppUnavailable from '@/app/components/base/app-unavailable'import { useDefaultModel } from '@/app/components/header/account-setting/model-provider-page/hooks'import { ModelTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'+import type { NotionPage } from '@/models/common'type DocumentSettingsProps = {datasetId: string@@ -40,7 +41,7 @@ const DocumentSettings = ({ datasetId, documentId }: DocumentSettingsProps) => {page_id: documentDetail?.data_source_info.notion_page_id,page_name: documentDetail?.name,page_icon: documentDetail?.data_source_info.notion_page_icon,- type: documentDetail?.data_source_info.type,+ type: documentDetail?.data_source_type,}}, [documentDetail])useEffect(() => {@@ -72,7 +73,7 @@ const DocumentSettings = ({ datasetId, documentId }: DocumentSettingsProps) => {onSetting={showSetAPIKey}datasetId={datasetId}dataSourceType={documentDetail.data_source_type}- notionPages={[currentPage]}+ notionPages={[currentPage as unknown as NotionPage]}websitePages={[{title: documentDetail.name,@@ -81,12 +82,13 @@ const DocumentSettings = ({ datasetId, documentId }: DocumentSettingsProps) => {description: '',},]}- fireCrawlJobId={documentDetail.data_source_info?.job_id}- crawlOptions={documentDetail.data_source_info}+ websiteCrawlProvider={documentDetail.data_source_info?.provider}+ websiteCrawlJobId={documentDetail.data_source_info?.job_id}+ crawlOptions={documentDetail.data_source_info as unknown as CrawlOptions}indexingType={indexingTechnique || ''}isSettingdocumentDetail={documentDetail}- files={[documentDetail.data_source_info.upload_file]}+ files={[documentDetail.data_source_info.upload_file as CustomFile]}onSave={saveHandler}onCancel={cancelHandler}/>diff --git a/web/models/datasets.ts b/web/models/datasets.tsindex 1ecaa3e10be..95c7ce45de8 100644--- a/web/models/datasets.ts+++ b/web/models/datasets.ts@@ -1,4 +1,4 @@-import type { DataSourceNotionPage } from './common'+import type { DataSourceNotionPage, DataSourceProvider } from './common'import type { AppIconType, AppMode, RetrievalConfig } from '@/types/app'import type { Tag } from '@/app/components/base/tag-management/constant'@@ -230,6 +230,9 @@ export type DataSourceInfo = {extension: string}notion_page_icon?: string+ notion_workspace_id?: string+ notion_page_id?: string+ provider?: DataSourceProviderjob_id: stringurl: string}