Skip to content

armgit / dify

Public Imported from GitHub
0

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.

refactor(web): remove dead dataset operator context state (#39800)

yyhe834fa212d94
diff --git a/web/__mocks__/provider-context.ts b/web/__mocks__/provider-context.ts
index 2c8e2e44989..a8847ecb8a1 100644
--- a/web/__mocks__/provider-context.ts
+++ b/web/__mocks__/provider-context.ts
@@ -18,7 +18,6 @@ export const baseProviderContextValue: ProviderContextState = {
onPlanInfoChanged: noop,
enableReplaceWebAppLogo: false,
modelLoadBalancingEnabled: false,
- datasetOperatorEnabled: false,
enableEducationPlan: false,
isEducationWorkspace: false,
isEducationAccount: false,
diff --git a/web/app/components/app/overview/apikey-info-panel/__tests__/test-utils.tsx b/web/app/components/app/overview/apikey-info-panel/__tests__/test-utils.tsx
index ebbedd319cf..2f2537bd06e 100644
--- a/web/app/components/app/overview/apikey-info-panel/__tests__/test-utils.tsx
+++ b/web/app/components/app/overview/apikey-info-panel/__tests__/test-utils.tsx
@@ -50,7 +50,6 @@ const defaultProviderContext = {
onPlanInfoChanged: noop,
enableReplaceWebAppLogo: false,
modelLoadBalancingEnabled: false,
- datasetOperatorEnabled: false,
enableEducationPlan: false,
isEducationWorkspace: false,
isEducationAccount: false,
diff --git a/web/context/provider-context-provider.tsx b/web/context/provider-context-provider.tsx
index b4e9ebf8e07..1ebfb7f3fb4 100644
--- a/web/context/provider-context-provider.tsx
+++ b/web/context/provider-context-provider.tsx
@@ -72,7 +72,6 @@ export const ProviderContextProvider = ({ children }: ProviderContextProviderPro
const [enableBilling, setEnableBilling] = useState(true)
const [enableReplaceWebAppLogo, setEnableReplaceWebAppLogo] = useState(false)
const [modelLoadBalancingEnabled, setModelLoadBalancingEnabled] = useState(false)
- const [datasetOperatorEnabled, setDatasetOperatorEnabled] = useState(false)
const [webappCopyrightEnabled, setWebappCopyrightEnabled] = useState(false)
const [licenseLimit, setLicenseLimit] = useState({
workspace_members: {
@@ -120,7 +119,6 @@ export const ProviderContextProvider = ({ children }: ProviderContextProviderPro
}
if (data.model_load_balancing_enabled) setModelLoadBalancingEnabled(true)
- if (data.dataset_operator_enabled) setDatasetOperatorEnabled(true)
if (data.webapp_copyright_enabled) setWebappCopyrightEnabled(true)
setLicenseLimit({ workspace_members: resolveMemberInviteLimit(data) })
if (data.is_allow_transfer_workspace)
@@ -207,7 +205,6 @@ export const ProviderContextProvider = ({ children }: ProviderContextProviderPro
onPlanInfoChanged: fetchPlan,
enableReplaceWebAppLogo,
modelLoadBalancingEnabled,
- datasetOperatorEnabled,
enableEducationPlan,
isEducationWorkspace,
isEducationAccount: isEducationDataFetchedAfterMount
diff --git a/web/context/provider-context.ts b/web/context/provider-context.ts
index 161a9bd5328..4c6d22ee147 100644
--- a/web/context/provider-context.ts
+++ b/web/context/provider-context.ts
@@ -27,7 +27,6 @@ export type ProviderContextState = {
onPlanInfoChanged: () => void
enableReplaceWebAppLogo: boolean
modelLoadBalancingEnabled: boolean
- datasetOperatorEnabled: boolean
enableEducationPlan: boolean
isEducationWorkspace: boolean
isEducationAccount: boolean
@@ -61,7 +60,6 @@ export const baseProviderContextValue: ProviderContextState = {
onPlanInfoChanged: noop,
enableReplaceWebAppLogo: false,
modelLoadBalancingEnabled: false,
- datasetOperatorEnabled: false,
enableEducationPlan: false,
isEducationWorkspace: false,
isEducationAccount: false,