From fa237a8c1350bfbbe6c9d4a54061405390b07680 Mon Sep 17 00:00:00 2001 From: wizardchen Date: Sat, 15 Nov 2025 03:29:40 +0800 Subject: [PATCH] feat: Enhance document and FAQ management UI with localization updates - Added a new document management section with titles and subtitles in English, Russian, and Chinese. - Updated the FAQ management interface to include subtitles for better user guidance. - Improved layout and styling for document and FAQ sections to enhance user experience. - Ensured localization support for new UI elements across multiple languages. --- frontend/src/components/FAQTagTooltip.vue | 402 ++++ frontend/src/i18n/locales/en-US.ts | 5 + frontend/src/i18n/locales/ru-RU.ts | 1 + frontend/src/i18n/locales/zh-CN.ts | 5 + .../src/views/knowledge/KnowledgeBase.vue | 46 +- .../knowledge/components/FAQEntryManager.vue | 1787 ++++++++++------- 6 files changed, 1551 insertions(+), 695 deletions(-) create mode 100644 frontend/src/components/FAQTagTooltip.vue diff --git a/frontend/src/components/FAQTagTooltip.vue b/frontend/src/components/FAQTagTooltip.vue new file mode 100644 index 00000000..72b0e013 --- /dev/null +++ b/frontend/src/components/FAQTagTooltip.vue @@ -0,0 +1,402 @@ + + + + + + diff --git a/frontend/src/i18n/locales/en-US.ts b/frontend/src/i18n/locales/en-US.ts index fb33a254..332c79b2 100644 --- a/frontend/src/i18n/locales/en-US.ts +++ b/frontend/src/i18n/locales/en-US.ts @@ -716,8 +716,13 @@ export default { updateSuccess: 'Configuration saved successfully', indexModeRequired: 'Please select an indexing mode for FAQ knowledge bases' }, + document: { + title: 'Document Management', + subtitle: 'Upload and manage documents, supporting parsing and chunking of multiple file formats', + }, faq: { title: 'FAQ Configuration', + subtitle: 'Manage FAQ entries with batch import, edit, and search testing', description: 'Configure indexing strategy and guidance for FAQ-style knowledge bases', indexModeLabel: 'Indexing Mode', indexModeDescription: 'Question-only indexing improves precision, question+answer improves recall.', diff --git a/frontend/src/i18n/locales/ru-RU.ts b/frontend/src/i18n/locales/ru-RU.ts index 40f2e4b5..87b62465 100644 --- a/frontend/src/i18n/locales/ru-RU.ts +++ b/frontend/src/i18n/locales/ru-RU.ts @@ -807,6 +807,7 @@ export default { }, faq: { title: 'Настройки FAQ', + subtitle: 'Управление записями FAQ с пакетным импортом, редактированием и тестированием поиска', description: 'Определите стратегию индексации и общие правила для FAQ-базы знаний', indexModeLabel: 'Режим индексации', indexModeDescription: 'Только вопросы дают более высокую точность, вопросы+ответы повышают полноту выдачи.', diff --git a/frontend/src/i18n/locales/zh-CN.ts b/frontend/src/i18n/locales/zh-CN.ts index debad4af..69e566c6 100644 --- a/frontend/src/i18n/locales/zh-CN.ts +++ b/frontend/src/i18n/locales/zh-CN.ts @@ -1029,8 +1029,13 @@ export default { updateSuccess: "配置保存成功", indexModeRequired: "请选择 FAQ 的索引方式", }, + document: { + title: "文档管理", + subtitle: "上传和管理文档,支持多种文件格式的解析与分块", + }, faq: { title: "FAQ 配置", + subtitle: "管理 FAQ 条目,支持批量导入、编辑和检索测试", description: "设置 FAQ 知识库的索引策略和问答组织方式", indexModeLabel: "索引方式", indexModeDescription: "仅索引问题可提升精度,索引问答可提高召回率", diff --git a/frontend/src/views/knowledge/KnowledgeBase.vue b/frontend/src/views/knowledge/KnowledgeBase.vue index 9e7d5f85..a60cff02 100644 --- a/frontend/src/views/knowledge/KnowledgeBase.vue +++ b/frontend/src/views/knowledge/KnowledgeBase.vue @@ -290,6 +290,13 @@ async function createNewSession(value: string): Promise {