From 28296955f1a1cad9eef2b8b46bb2cbda8cbb571a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=9E=E6=B3=95=E6=93=8D=E4=BD=9C?= Date: Thu, 6 Mar 2025 11:03:49 +0800 Subject: [PATCH] Minor: improve tips display (#5631) ### What problem does this PR solve? 1. Add the missing translations. ![CleanShot 2025-03-05 at 10 29 32](https://github.com/user-attachments/assets/85e95372-07d9-47a1-82cf-6eb4d0e1c831) 2. Shorten overly long tips. ![CleanShot 2025-03-05 at 10 34 49](https://github.com/user-attachments/assets/fae8ce4c-6495-4abf-958d-2febeb38b893) ### Type of change - [ ] Bug Fix (non-breaking change which fixes an issue) - [ ] New Feature (non-breaking change which adds functionality) - [ ] Documentation Update - [ ] Refactoring - [ ] Performance Improvement - [x] Other (please describe): --- web/src/components/parse-configuration/graph-rag-items.tsx | 4 ++-- web/src/locales/en.ts | 1 + web/src/locales/zh-traditional.ts | 2 ++ web/src/locales/zh.ts | 2 ++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/web/src/components/parse-configuration/graph-rag-items.tsx b/web/src/components/parse-configuration/graph-rag-items.tsx index 2733b38eb..43b3e4ad8 100644 --- a/web/src/components/parse-configuration/graph-rag-items.tsx +++ b/web/src/components/parse-configuration/graph-rag-items.tsx @@ -54,7 +54,7 @@ const GraphRagItems = ({ marginBottom = false }: GraphRagItemsProps) => { (title: React.ReactNode | string) => { return { title: typeof title === 'string' ? t(title) : title, - overlayInnerStyle: { width: '50vw' }, + overlayInnerStyle: { width: '32vw' }, }; }, [t], @@ -67,7 +67,7 @@ const GraphRagItems = ({ marginBottom = false }: GraphRagItemsProps) => { label={t('useGraphRag')} initialValue={false} valuePropName="checked" - tooltip={renderWideTooltip('useGraphRagTip')} + tooltip={t('useGraphRagTip')} > diff --git a/web/src/locales/en.ts b/web/src/locales/en.ts index bb8298fe4..e82904517 100644 --- a/web/src/locales/en.ts +++ b/web/src/locales/en.ts @@ -520,6 +520,7 @@ This auto-tag feature enhances retrieval by adding another layer of domain-speci 'This optimizes user queries using context in a multi-round conversation. When enabled, it will consume additional LLM tokens.', howUseId: 'How to use chat ID?', description: 'Description of assistant', + descriptionPlaceholder: 'e.g. A chat assistant for resume.', useKnowledgeGraph: 'Use knowledge graph', useKnowledgeGraphTip: 'It will retrieve descriptions of relevant entities,relations and community reports, which will enhance inference of multi-hop and complex question.', diff --git a/web/src/locales/zh-traditional.ts b/web/src/locales/zh-traditional.ts index fea8e87cd..a9228a06d 100644 --- a/web/src/locales/zh-traditional.ts +++ b/web/src/locales/zh-traditional.ts @@ -504,6 +504,8 @@ export default { '在多輪對話的中,對去知識庫查詢的問題進行最佳化。會呼叫大模型額外消耗token。', howUseId: '如何使用聊天ID?', description: '助理描述', + descriptionPlaceholder: + '例如 你是一個專業的簡曆助手,隻能回答簡曆的問題。', useKnowledgeGraph: '使用知識圖譜', useKnowledgeGraph提示: '它將檢索相關實體、關係和社區報告的描述,這將增強多跳和複雜問題的推理。', diff --git a/web/src/locales/zh.ts b/web/src/locales/zh.ts index f1bb3bb83..47950074e 100644 --- a/web/src/locales/zh.ts +++ b/web/src/locales/zh.ts @@ -520,6 +520,8 @@ General:实体和关系提取提示来自 GitHub - microsoft/graphrag:基于 '在多轮对话的中,对去知识库查询的问题进行优化。会调用大模型额外消耗token。', howUseId: '如何使用聊天ID?', description: '助理描述', + descriptionPlaceholder: + '例如 你是一个专业的简历助手,只能回答简历的问题。', useKnowledgeGraph: '使用知识图谱', useKnowledgeGraphTip: '它将检索相关实体、关系和社区报告的描述,这将增强多跳和复杂问题的推理。',