Преглед на файлове

fix(ui): 澄清 TOPN/TOPK 文案并修复数字输入框步进器

补充 Rerank TOPN 与检索 TOPK 的中英文说明,避免与最终注入 LLM 条数混淆;
为 number input 设置 color-scheme,使深浅色主题下原生步进器可读。

Co-authored-by: Cursor <cursoragent@cursor.com>
darknessomi преди 2 месеца
родител
ревизия
9eaebcbb74
променени са 3 файла, в които са добавени 15 реда и са изтрити 6 реда
  1. 3 3
      src/i18n/en.json
  2. 3 3
      src/i18n/zh.json
  3. 9 0
      src/index.css

+ 3 - 3
src/i18n/en.json

@@ -893,8 +893,8 @@
         "enableHint": "Used by search view, chat retrieval, novel plot search, and writing-context assembly.",
         "useMainLlm": "Reuse main LLM",
         "useMainLlmHint": "Use the active main model as the reranker. Turn this off to configure a dedicated rerank model.",
-        "maxCandidates": "Max rerank candidates",
-        "maxCandidatesHint": "How many top candidates enter rerank each time. Higher values improve recall but add latency and cost.",
+        "maxCandidates": "Rerank Candidate Count (TOPN)",
+        "maxCandidatesHint": "After initial retrieval, the top N candidates are sent to the reranker first. TOPN is not the number ultimately injected into the LLM; that is determined by retrieval TOPK and the specific workflow. If fewer than N candidates exist or the workflow needs more final results, the actual candidate count is adjusted accordingly. Higher values improve recall but add latency and cost.",
         "provider": "Provider",
         "apiMode": "API Mode",
         "wireOpenAi": "OpenAI Compatible",
@@ -1196,7 +1196,7 @@
       "title": "Novel Writing Settings",
       "recentSummaryWindow": "Recent Chapter Text Window",
       "recentSummaryWindowHint": "Controls how many recent chapters are included in the writing context. The system reads text excerpts from these chapters and combines them with chapter summaries to preserve continuity; higher values use more context.",
-      "searchTopK": "Search Result Count",
+      "searchTopK": "Search Result Count (Retrieval TOPK)",
       "searchTopKHint": "Controls how many relevant memory records are retrieved and injected into the writing context. Higher values add more references, but can add noise and consume context.",
       "contextTokenBudget": "Context Token Budget",
       "contextTokenBudgetHint": "0 means unlimited",

+ 3 - 3
src/i18n/zh.json

@@ -600,8 +600,8 @@
         "enableHint": "会用于搜索面板、聊天检索、剧情搜索和写作上下文组装。",
         "useMainLlm": "复用主模型",
         "useMainLlmHint": "直接用当前主模型做重排。关闭后可单独配置一套重排模型。",
-        "maxCandidates": "最大重排候选数",
-        "maxCandidatesHint": "每次进入重排的候选上限。越大召回越稳,但延迟和成本也更高。",
+        "maxCandidates": "重排候选数量(TOPN)",
+        "maxCandidatesHint": "初步检索后,优先将前 N 条候选交给 Reranker 排序。TOPN 不是最终注入 LLM 的条数;最终保留数量由检索 TOPK 和具体场景决定。若候选不足 N 或最终所需数更大,会按实际候选数处理。数值越大召回越稳,但延迟和成本也更高。",
         "provider": "提供方",
         "apiMode": "API 模式",
         "wireOpenAi": "OpenAI 兼容",
@@ -1065,7 +1065,7 @@
       "title": "小说写作设置",
       "recentSummaryWindow": "最近章节正文窗口",
       "recentSummaryWindowHint": "控制写作时纳入上下文的最近章节数量。系统会读取这些章节的正文片段,并结合章节摘要帮助模型承接近期剧情;数值越大越连贯,但会占用更多上下文。",
-      "searchTopK": "检索结果数量",
+      "searchTopK": "检索结果数量(检索 TOPK)",
       "searchTopKHint": "控制从小说记忆库中检索并注入上下文的相关资料条数。数值越大,参考资料越多,但噪音和上下文占用也会增加。",
       "contextTokenBudget": "上下文 Token 预算",
       "contextTokenBudgetHint": "0 表示无限制",

+ 9 - 0
src/index.css

@@ -83,6 +83,15 @@
     --sidebar-ring: oklch(0.708 0 0);
 }
 
+/* Keep native number steppers readable when the app switches color schemes. */
+input[type="number"] {
+    color-scheme: light;
+}
+
+.dark input[type="number"] {
+    color-scheme: dark;
+}
+
 :root.visual-cangzhu {
     --background: oklch(0.95 0.021 91);
     --foreground: oklch(0.25 0.035 160);