RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
feat(web): ship empty enterprise overlays under web/src/ee (#21667)
chanx78796af7735a
diff --git a/web/src/ee/locales/en-private.ts b/web/src/ee/locales/en-private.tsnew file mode 100644index 0000000000..bc0ccc20c8--- /dev/null+++ b/web/src/ee/locales/en-private.ts@@ -0,0 +1,11 @@+/**+ * Enterprise customization overlay for `en.ts`.+ *+ * Upstream ships this file as an empty object; the enterprise repository+ * fills the same-path file with real translations, so the shared locale+ * files stay merge conflict-free.+ *+ * Values here are deep-merged over `en.ts` (lodash/merge): a key present+ * here overrides the same key in `en.ts`.+ */+export default {};diff --git a/web/src/ee/locales/zh-private.ts b/web/src/ee/locales/zh-private.tsnew file mode 100644index 0000000000..7a12a21c5c--- /dev/null+++ b/web/src/ee/locales/zh-private.ts@@ -0,0 +1,11 @@+/**+ * Enterprise customization overlay for `zh.ts`.+ *+ * Upstream ships this file as an empty object; the enterprise repository+ * fills the same-path file with real translations, so the shared locale+ * files stay merge conflict-free.+ *+ * Values here are deep-merged over `zh.ts` (lodash/merge): a key present+ * here overrides the same key in `zh.ts`.+ */+export default {};diff --git a/web/src/ee/locales/zh-traditional-private.ts b/web/src/ee/locales/zh-traditional-private.tsnew file mode 100644index 0000000000..188bcfe1ef--- /dev/null+++ b/web/src/ee/locales/zh-traditional-private.ts@@ -0,0 +1,11 @@+/**+ * Enterprise customization overlay for `zh-traditional.ts`.+ *+ * Upstream ships this file as an empty object; the enterprise repository+ * fills the same-path file with real translations, so the shared locale+ * files stay merge conflict-free.+ *+ * Values here are deep-merged over `zh-traditional.ts` (lodash/merge): a key present+ * here overrides the same key in `zh-traditional.ts`.+ */+export default {};diff --git a/web/src/ee/utils/api-private.ts b/web/src/ee/utils/api-private.tsnew file mode 100644index 0000000000..e4138f00a6--- /dev/null+++ b/web/src/ee/utils/api-private.ts@@ -0,0 +1,11 @@+/**+ * Enterprise customization overlay for `api.ts`.+ *+ * Upstream ships this file as an empty object; the enterprise repository+ * fills the same-path file with real endpoints, so the shared endpoint+ * table stays merge conflict-free.+ *+ * Values here are deep-merged over the endpoint table in `api.ts`+ * (lodash/merge): a key present here overrides the same key there.+ */+export default {};diff --git a/web/src/locales/config.ts b/web/src/locales/config.tsindex 1786268997..f92cb9a12b 100644--- a/web/src/locales/config.ts+++ b/web/src/locales/config.ts@@ -6,6 +6,8 @@ import LanguageDetector from 'i18next-browser-languagedetector';import { upperFirst } from 'lodash';import { initReactI18next } from 'react-i18next';import translation_en from './en';+import translation_zh from './zh';+import translation_zh_traditional from './zh-traditional';//The language is based on the .ng file stored in the client's local storage.// The language stored in the database is for agent template resources, as these resources reside on the server.@@ -50,8 +52,22 @@ export const supportedLanguages = supportedLanguageCodes.map((code) => {export const DEFAULT_LANGUAGE_CODE =import.meta.env.VITE_DEFAULT_LANGUAGE_CODE || LanguageAbbreviation.En;+// Enterprise customization overlays: the enterprise repository carries real+// implementations of these same-path files (`web/src/ee/locales/*-private.ts`);+// upstream ships them as empty objects so shared imports resolve in both+// trees. Enterprise content must live only in the ee/ files, never here.+import merge from 'lodash/merge';+import translation_en_private from '@/ee/locales/en-private';+import translation_zh_private from '@/ee/locales/zh-private';+import translation_zh_traditional_private from '@/ee/locales/zh-traditional-private';+const resources = {- [LanguageAbbreviation.En]: translation_en,+ [LanguageAbbreviation.En]: merge(translation_en, translation_en_private),+ [LanguageAbbreviation.Zh]: merge(translation_zh, translation_zh_private),+ [LanguageAbbreviation.ZhTraditional]: merge(+ translation_zh_traditional,+ translation_zh_traditional_private,+ ),};const updateDocumentLocale = (lng: string) => {diff --git a/web/src/utils/api.ts b/web/src/utils/api.tsindex 9ae6aecc6b..ab2a4d6700 100644--- a/web/src/utils/api.ts+++ b/web/src/utils/api.ts@@ -19,7 +19,10 @@ const restAPIv1 = `/api/v1`;export { restAPIv1, webAPI };-export default {+import merge from 'lodash/merge';+import apiPrivate from '@/ee/utils/api-private';++const apiEndpoints = {// userlogin: `${restAPIv1}/auth/login`,logout: `${restAPIv1}/auth/logout`,@@ -541,3 +544,10 @@ export default {skillIndex: `${restAPIv1}/skills/index`,skillReindex: `${restAPIv1}/skills/reindex`,};++// Enterprise customization overlays: the enterprise repository carries a real+// implementation of the same-path file `web/src/ee/utils/api-private.ts`;+// upstream ships it as an empty object so this import resolves in both trees.+// Enterprise endpoints must live only in the ee/ file, never here. Keys in+// the overlay override or extend `apiEndpoints`.+export default merge(apiEndpoints, apiPrivate);