diff --git a/.vscode/i18n-ally-custom-framework.yml b/.vscode/i18n-ally-custom-framework.yml index 8ce267e6d..a2d4fe0cc 100644 --- a/.vscode/i18n-ally-custom-framework.yml +++ b/.vscode/i18n-ally-custom-framework.yml @@ -17,15 +17,8 @@ usageMatchRegex: # you can ignore it and use your own matching rules as well - "[^\\w\\d]t\\(['\"`]({key})['\"`]" - "[^\\w\\d]commonT\\(['\"`]({key})['\"`]" - # 支持 appT("your.i18n.keys") - - "[^\\w\\d]appT\\(['\"`]({key})['\"`]" - # 支持 datasetT("your.i18n.keys") - - "[^\\w\\d]datasetT\\(['\"`]({key})['\"`]" - "[^\\w\\d]fileT\\(['\"`]({key})['\"`]" - - "[^\\w\\d]publishT\\(['\"`]({key})['\"`]" - "[^\\w\\d]workflowT\\(['\"`]({key})['\"`]" - - "[^\\w\\d]userT\\(['\"`]({key})['\"`]" - - "[^\\w\\d]chatT\\(['\"`]({key})['\"`]" - "[^\\w\\d]i18nT\\(['\"`]({key})['\"`]" # A RegEx to set a custom scope range. This scope will be used as a prefix when detecting keys diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4cfc70e2a..9c42f553d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -462,9 +462,6 @@ importers: '@fortaine/fetch-event-source': specifier: ^3.0.6 version: 3.0.6 - '@node-rs/jieba': - specifier: 2.0.1 - version: 2.0.1 '@tanstack/react-query': specifier: ^4.24.10 version: 4.36.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) diff --git a/projects/app/next.config.js b/projects/app/next.config.js index 3af89a710..bc191f87e 100644 --- a/projects/app/next.config.js +++ b/projects/app/next.config.js @@ -39,9 +39,9 @@ const nextConfig = { if (!config.externals) { config.externals = []; } - config.externals.push('@node-rs/jieba'); if (isServer) { + config.externals.push('@node-rs/jieba'); if (nextRuntime === 'nodejs') { const oldEntry = config.entry; config = { @@ -85,7 +85,6 @@ const nextConfig = { 'pg', '@zilliz/milvus2-sdk-node', "tiktoken", - "@node-rs/jieba" ], outputFileTracingRoot: path.join(__dirname, '../../'), instrumentationHook: true diff --git a/projects/app/package.json b/projects/app/package.json index cb4d25ba0..f16d642fd 100644 --- a/projects/app/package.json +++ b/projects/app/package.json @@ -64,7 +64,6 @@ "request-ip": "^3.3.0", "sass": "^1.58.3", "use-context-selector": "^1.4.4", - "@node-rs/jieba": "2.0.1", "zustand": "^4.3.5" }, "devDependencies": { diff --git a/projects/app/src/components/core/app/InputGuideConfig.tsx b/projects/app/src/components/core/app/InputGuideConfig.tsx index 91a83d24a..b76455e51 100644 --- a/projects/app/src/components/core/app/InputGuideConfig.tsx +++ b/projects/app/src/components/core/app/InputGuideConfig.tsx @@ -54,7 +54,6 @@ const InputGuideConfig = ({ onChange: (e: ChatInputGuideConfigType) => void; }) => { const { t } = useTranslation(); - const { chatT } = useI18n(); const { isOpen, onOpen, onClose } = useDisclosure(); const { isOpen: isOpenLexiconConfig, @@ -87,11 +86,11 @@ const InputGuideConfig = ({ - {chatT('input_guide')} + {t('chat:input_guide')} - +