From 7badaf02b9970ebddbb6c8487cd95549fbfd3d68 Mon Sep 17 00:00:00 2001 From: MyPrototypeWhat Date: Wed, 29 Oct 2025 20:37:54 +0800 Subject: [PATCH 1/6] fix(TodoWriteTool): remove output rendering from TodoWriteTool component (#11035) * fix: remove output rendering from TodoWriteTool component * refactor: remove output parameter from TodoWriteTool component --- .../Messages/Tools/MessageAgentTools/TodoWriteTool.tsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/renderer/src/pages/home/Messages/Tools/MessageAgentTools/TodoWriteTool.tsx b/src/renderer/src/pages/home/Messages/Tools/MessageAgentTools/TodoWriteTool.tsx index 257926cf9d..bdc024c73b 100644 --- a/src/renderer/src/pages/home/Messages/Tools/MessageAgentTools/TodoWriteTool.tsx +++ b/src/renderer/src/pages/home/Messages/Tools/MessageAgentTools/TodoWriteTool.tsx @@ -2,11 +2,7 @@ import { AccordionItem, Card, CardBody, Chip } from '@heroui/react' import { CheckCircle, Circle, Clock, ListTodo } from 'lucide-react' import { ToolTitle } from './GenericTools' -import type { - TodoItem, - TodoWriteToolInput as TodoWriteToolInputType, - TodoWriteToolOutput as TodoWriteToolOutputType -} from './types' +import type { TodoItem, TodoWriteToolInput as TodoWriteToolInputType } from './types' import { AgentToolsType } from './types' const getStatusConfig = (status: TodoItem['status']) => { @@ -34,7 +30,7 @@ const getStatusConfig = (status: TodoItem['status']) => { } } -export function TodoWriteTool({ input, output }: { input: TodoWriteToolInputType; output?: TodoWriteToolOutputType }) { +export function TodoWriteTool({ input }: { input: TodoWriteToolInputType }) { const doneCount = input.todos.filter((todo) => todo.status === 'completed').length return ( - {output} ) } From 72299f833a18e472a7b5bdef147c44eb16f05723 Mon Sep 17 00:00:00 2001 From: MyPrototypeWhat Date: Wed, 29 Oct 2025 22:24:44 +0800 Subject: [PATCH 2/6] feat(ReadTool): add function to remove tags (#11034) feat(ReadTool): add function to remove tags from output text - Introduced `removeSystemReminderTags` function to clean output by removing tags and their content. - Updated output processing logic to apply this function for both array and string output types, ensuring consistent formatting. --- .../Tools/MessageAgentTools/ReadTool.tsx | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/renderer/src/pages/home/Messages/Tools/MessageAgentTools/ReadTool.tsx b/src/renderer/src/pages/home/Messages/Tools/MessageAgentTools/ReadTool.tsx index 129072cda4..e8f973c822 100644 --- a/src/renderer/src/pages/home/Messages/Tools/MessageAgentTools/ReadTool.tsx +++ b/src/renderer/src/pages/home/Messages/Tools/MessageAgentTools/ReadTool.tsx @@ -8,20 +8,31 @@ import type { ReadToolInput as ReadToolInputType, ReadToolOutput as ReadToolOutp import { AgentToolsType } from './types' export function ReadTool({ input, output }: { input: ReadToolInputType; output?: ReadToolOutputType }) { + // 移除 system-reminder 标签及其内容的辅助函数 + const removeSystemReminderTags = (text: string): string => { + // 使用正则表达式匹配 标签及其内容,包括换行符 + return text.replace(/[\s\S]*?<\/system-reminder>/gi, '') + } + // 将 output 统一转换为字符串 const outputString = useMemo(() => { if (!output) return null + let processedOutput: string + // 如果是 TextOutput[] 类型,提取所有 text 内容 if (Array.isArray(output)) { - return output + processedOutput = output .filter((item): item is TextOutput => item.type === 'text') - .map((item) => item.text) + .map((item) => removeSystemReminderTags(item.text)) .join('') + } else { + // 如果是字符串,直接使用 + processedOutput = output } - // 如果是字符串,直接返回 - return output + // 移除 system-reminder 标签及其内容 + return removeSystemReminderTags(processedOutput) }, [output]) // 如果有输出,计算统计信息 From 0767952a6f827deb76176bc1f6c3e9e14e08f53d Mon Sep 17 00:00:00 2001 From: ABucket Date: Wed, 29 Oct 2025 22:28:38 +0800 Subject: [PATCH 3/6] docs: fix invalid link in the contributing guide (#11038) docs: fix invalid link --- CONTRIBUTING.md | 2 +- docs/CONTRIBUTING.zh.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 88f034976f..545c34dc12 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -77,7 +77,7 @@ Please review the following critical information before submitting your Pull Req Our core team is currently focused on significant architectural updates that involve these data structures. To ensure stability and focus during this period, contributions of this nature will be temporarily managed internally. * **PRs that require changes to Redux state shape or IndexedDB schemas will be closed.** -* **This restriction is temporary and will be lifted with the release of `v2.0.0`.** You can track the progress of `v2.0.0` and its related discussions on issue [#10162](https://github.com/YOUR_ORG/YOUR_REPO/issues/10162) (please replace with your actual repo link). +* **This restriction is temporary and will be lifted with the release of `v2.0.0`.** You can track the progress of `v2.0.0` and its related discussions on issue [#10162](https://github.com/CherryHQ/cherry-studio/pull/10162). We highly encourage contributions for: * Bug fixes 🐞 diff --git a/docs/CONTRIBUTING.zh.md b/docs/CONTRIBUTING.zh.md index 67193ed098..98efcc286e 100644 --- a/docs/CONTRIBUTING.zh.md +++ b/docs/CONTRIBUTING.zh.md @@ -81,7 +81,7 @@ git commit --signoff -m "Your commit message" 我们的核心团队目前正专注于涉及这些数据结构的关键架构更新和基础工作。为确保在此期间的稳定性与专注,此类贡献将暂时由内部进行管理。 * **需要更改 Redux 状态结构或 IndexedDB schema 的 PR 将会被关闭。** -* **此限制是临时性的,并将在 `v2.0.0` 版本发布后解除。** 您可以通过 Issue [#10162](https://github.com/YOUR_ORG/YOUR_REPO/issues/10162) (请替换为您的实际仓库链接) 跟踪 `v2.0.0` 的进展及相关讨论。 +* **此限制是临时性的,并将在 `v2.0.0` 版本发布后解除。** 您可以通过 Issue [#10162](https://github.com/CherryHQ/cherry-studio/pull/10162) 跟踪 `v2.0.0` 的进展及相关讨论。 我们非常鼓励以下类型的贡献: * 错误修复 🐞 From 09e6b9741eade167f89cb3bd55de6c68668eb57e Mon Sep 17 00:00:00 2001 From: MyPrototypeWhat Date: Thu, 30 Oct 2025 16:14:04 +0800 Subject: [PATCH 4/6] fix: update GlobTool to count lines instead of files in output (#11036) --- .../pages/home/Messages/Tools/MessageAgentTools/GlobTool.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/pages/home/Messages/Tools/MessageAgentTools/GlobTool.tsx b/src/renderer/src/pages/home/Messages/Tools/MessageAgentTools/GlobTool.tsx index c057b3f8d1..d9e151567e 100644 --- a/src/renderer/src/pages/home/Messages/Tools/MessageAgentTools/GlobTool.tsx +++ b/src/renderer/src/pages/home/Messages/Tools/MessageAgentTools/GlobTool.tsx @@ -6,7 +6,7 @@ import type { GlobToolInput as GlobToolInputType, GlobToolOutput as GlobToolOutp export function GlobTool({ input, output }: { input: GlobToolInputType; output?: GlobToolOutputType }) { // 如果有输出,计算文件数量 - const fileCount = output ? output.split('\n').filter((line) => line.trim()).length : 0 + const lineCount = output ? output.split('\n').filter((line) => line.trim()).length : 0 return ( } label="Glob" params={input.pattern} - stats={output ? `${fileCount} found` : undefined} + stats={output ? `${lineCount} of output` : undefined} /> }>
{output}
From dd8690b59281817071db9aab93350e9efb29528f Mon Sep 17 00:00:00 2001 From: SuYao Date: Thu, 30 Oct 2025 16:41:07 +0800 Subject: [PATCH 5/6] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E6=87=92=E5=8A=A0=E8=BD=BD=E7=BB=84=E4=BB=B6=E4=BB=A5?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=A1=B5=E9=9D=A2=E5=8A=A0=E8=BD=BD=E6=80=A7?= =?UTF-8?q?=E8=83=BD=20(#11042)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/Router.tsx | 64 +++++++++++++++++++++---------------- 1 file changed, 37 insertions(+), 27 deletions(-) diff --git a/src/renderer/src/Router.tsx b/src/renderer/src/Router.tsx index edaebfa144..61a376285f 100644 --- a/src/renderer/src/Router.tsx +++ b/src/renderer/src/Router.tsx @@ -1,6 +1,7 @@ import '@renderer/databases' -import { FC, useMemo } from 'react' +import { Spinner } from '@heroui/react' +import { FC, lazy, Suspense, useMemo } from 'react' import { HashRouter, Route, Routes } from 'react-router-dom' import Sidebar from './components/app/Sidebar' @@ -8,18 +9,25 @@ import { ErrorBoundary } from './components/ErrorBoundary' import TabsContainer from './components/Tab/TabContainer' import NavigationHandler from './handler/NavigationHandler' import { useNavbarPosition } from './hooks/useSettings' -import CodeToolsPage from './pages/code/CodeToolsPage' -import FilesPage from './pages/files/FilesPage' -import HomePage from './pages/home/HomePage' -import KnowledgePage from './pages/knowledge/KnowledgePage' -import LaunchpadPage from './pages/launchpad/LaunchpadPage' -import MinAppPage from './pages/minapps/MinAppPage' -import MinAppsPage from './pages/minapps/MinAppsPage' -import NotesPage from './pages/notes/NotesPage' -import PaintingsRoutePage from './pages/paintings/PaintingsRoutePage' -import SettingsPage from './pages/settings/SettingsPage' -import AssistantPresetsPage from './pages/store/assistants/presets/AssistantPresetsPage' -import TranslatePage from './pages/translate/TranslatePage' + +const HomePage = lazy(() => import('./pages/home/HomePage')) +const AssistantPresetsPage = lazy(() => import('./pages/store/assistants/presets/AssistantPresetsPage')) +const PaintingsRoutePage = lazy(() => import('./pages/paintings/PaintingsRoutePage')) +const TranslatePage = lazy(() => import('./pages/translate/TranslatePage')) +const FilesPage = lazy(() => import('./pages/files/FilesPage')) +const NotesPage = lazy(() => import('./pages/notes/NotesPage')) +const KnowledgePage = lazy(() => import('./pages/knowledge/KnowledgePage')) +const MinAppPage = lazy(() => import('./pages/minapps/MinAppPage')) +const MinAppsPage = lazy(() => import('./pages/minapps/MinAppsPage')) +const CodeToolsPage = lazy(() => import('./pages/code/CodeToolsPage')) +const SettingsPage = lazy(() => import('./pages/settings/SettingsPage')) +const LaunchpadPage = lazy(() => import('./pages/launchpad/LaunchpadPage')) + +const RouterFallback: FC = () => ( +
+ +
+) const Router: FC = () => { const { navbarPosition } = useNavbarPosition() @@ -27,20 +35,22 @@ const Router: FC = () => { const routes = useMemo(() => { return ( - - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - + }> + + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + + ) }, []) From fa2ec69fa9b60f4040158e9234539f939f946d68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?George=C2=B7Dong?= <98630204+GeorgeDong32@users.noreply.github.com> Date: Thu, 30 Oct 2025 20:15:35 +0800 Subject: [PATCH 6/6] fix(SettingsTab): Context slider inconsistent (#10943) * fix(i18n): standardize "max" translation to indicate unlimited * feat(SettingsTab): add current context * feat(settings): show proper "max" label for context count * fix(settings): simplify contextCount value expression * feat(settings): make context count editable with number input --- .../src/components/EditableNumber/index.tsx | 6 ++- src/renderer/src/i18n/locales/en-us.json | 3 +- src/renderer/src/i18n/locales/zh-cn.json | 1 + src/renderer/src/i18n/locales/zh-tw.json | 3 +- src/renderer/src/i18n/translate/de-de.json | 1 + src/renderer/src/i18n/translate/el-gr.json | 3 +- src/renderer/src/i18n/translate/es-es.json | 1 + src/renderer/src/i18n/translate/fr-fr.json | 1 + src/renderer/src/i18n/translate/ja-jp.json | 3 +- src/renderer/src/i18n/translate/pt-pt.json | 1 + src/renderer/src/i18n/translate/ru-ru.json | 3 +- .../src/pages/home/Tabs/SettingsTab.tsx | 41 +++++++++++++++---- .../AssistantModelSettings.tsx | 3 +- 13 files changed, 54 insertions(+), 16 deletions(-) diff --git a/src/renderer/src/components/EditableNumber/index.tsx b/src/renderer/src/components/EditableNumber/index.tsx index 220cf5fb57..a428dfc04c 100644 --- a/src/renderer/src/components/EditableNumber/index.tsx +++ b/src/renderer/src/components/EditableNumber/index.tsx @@ -19,6 +19,7 @@ export interface EditableNumberProps { suffix?: string prefix?: string align?: 'start' | 'center' | 'end' + formatter?: (value: number | null) => string | number } const EditableNumber: FC = ({ @@ -35,7 +36,8 @@ const EditableNumber: FC = ({ style, className, size = 'middle', - align = 'end' + align = 'end', + formatter }) => { const [isEditing, setIsEditing] = useState(false) const [inputValue, setInputValue] = useState(value) @@ -89,7 +91,7 @@ const EditableNumber: FC = ({ changeOnBlur={changeOnBlur} /> - {value ?? placeholder} + {formatter ? formatter(value ?? null) : (value ?? placeholder)} ) diff --git a/src/renderer/src/i18n/locales/en-us.json b/src/renderer/src/i18n/locales/en-us.json index 3a47ff3070..a416aeb005 100644 --- a/src/renderer/src/i18n/locales/en-us.json +++ b/src/renderer/src/i18n/locales/en-us.json @@ -838,7 +838,7 @@ "label": "Context", "tip": "The number of previous messages to keep in the context." }, - "max": "Max", + "max": "Unlimited", "max_tokens": { "confirm": "Set max tokens", "confirm_content": "Set the maximum number of tokens the model can generate. Need to consider the context limit of the model, otherwise an error will be reported", @@ -1051,6 +1051,7 @@ "copied": "Copied", "copy": "Copy", "copy_failed": "Copy failed", + "current": "Current", "cut": "Cut", "default": "Default", "delete": "Delete", diff --git a/src/renderer/src/i18n/locales/zh-cn.json b/src/renderer/src/i18n/locales/zh-cn.json index de528ee8ab..b45f4d772d 100644 --- a/src/renderer/src/i18n/locales/zh-cn.json +++ b/src/renderer/src/i18n/locales/zh-cn.json @@ -1051,6 +1051,7 @@ "copied": "已复制", "copy": "复制", "copy_failed": "复制失败", + "current": "当前", "cut": "剪切", "default": "默认", "delete": "删除", diff --git a/src/renderer/src/i18n/locales/zh-tw.json b/src/renderer/src/i18n/locales/zh-tw.json index 50293536e1..9179f18042 100644 --- a/src/renderer/src/i18n/locales/zh-tw.json +++ b/src/renderer/src/i18n/locales/zh-tw.json @@ -838,7 +838,7 @@ "label": "上下文", "tip": "在上下文中保留的前幾則訊息" }, - "max": "最大", + "max": "不限", "max_tokens": { "confirm": "設置最大 Token 數", "confirm_content": "設置單次交互所用的最大 Token 數,會影響返回結果的長度。要根據模型上下文限制來設定,否則會發生錯誤", @@ -1051,6 +1051,7 @@ "copied": "已複製", "copy": "複製", "copy_failed": "複製失敗", + "current": "当前", "cut": "剪下", "default": "預設", "delete": "刪除", diff --git a/src/renderer/src/i18n/translate/de-de.json b/src/renderer/src/i18n/translate/de-de.json index b2c0e21544..1691144860 100644 --- a/src/renderer/src/i18n/translate/de-de.json +++ b/src/renderer/src/i18n/translate/de-de.json @@ -1051,6 +1051,7 @@ "copied": "Kopiert", "copy": "Kopieren", "copy_failed": "Kopieren fehlgeschlagen", + "current": "Aktuell", "cut": "Ausschneiden", "default": "Standard", "delete": "Löschen", diff --git a/src/renderer/src/i18n/translate/el-gr.json b/src/renderer/src/i18n/translate/el-gr.json index 01773b480d..88fade4b2b 100644 --- a/src/renderer/src/i18n/translate/el-gr.json +++ b/src/renderer/src/i18n/translate/el-gr.json @@ -838,7 +838,7 @@ "label": "Πλήθος ενδιάμεσων", "tip": "Πλήθος των μηνυμάτων που θα παραμείνουν στα ενδιάμεσα, όσο μεγαλύτερο είναι το αριθμός, τόσο μεγαλύτερο είναι το μήκος του ενδιάμεσου και τόσο περισσότερα tokens χρησιμοποιούνται. Συνομιλία συνήθως συνιστάται μεταξύ 5-10" }, - "max": "Όχι ορισμένο", + "max": "άπειρος", "max_tokens": { "confirm": "Ενεργοποίηση περιορισμού μήκους μηνύματος", "confirm_content": "Μετά την ενεργοποίηση του περιορισμού μήκους μηνύματος, ο μέγιστος αριθμός των tokens που χρησιμοποιούνται κάθε φορά, θα επηρεάζει το μήκος της απάντησης. Πρέπει να το ρυθμίζετε βάσει των περιορισμών του πλαισίου του μοντέλου, διαφορετικά θα σφάλλεται.", @@ -1051,6 +1051,7 @@ "copied": "Αντιγράφηκε", "copy": "Αντιγραφή", "copy_failed": "Αποτυχία αντιγραφής", + "current": "Τρέχων", "cut": "Κοπή", "default": "Προεπιλογή", "delete": "Διαγραφή", diff --git a/src/renderer/src/i18n/translate/es-es.json b/src/renderer/src/i18n/translate/es-es.json index 4bf1daa0eb..9e5a5d75e3 100644 --- a/src/renderer/src/i18n/translate/es-es.json +++ b/src/renderer/src/i18n/translate/es-es.json @@ -1051,6 +1051,7 @@ "copied": "Copiado", "copy": "Copiar", "copy_failed": "Error al copiar", + "current": "Actual", "cut": "Cortar", "default": "Predeterminado", "delete": "Eliminar", diff --git a/src/renderer/src/i18n/translate/fr-fr.json b/src/renderer/src/i18n/translate/fr-fr.json index 0f2895581b..35f48bd35d 100644 --- a/src/renderer/src/i18n/translate/fr-fr.json +++ b/src/renderer/src/i18n/translate/fr-fr.json @@ -1051,6 +1051,7 @@ "copied": "Copié", "copy": "Copier", "copy_failed": "Échec de la copie", + "current": "Actuel", "cut": "Couper", "default": "Défaut", "delete": "Supprimer", diff --git a/src/renderer/src/i18n/translate/ja-jp.json b/src/renderer/src/i18n/translate/ja-jp.json index 8d5c342b2a..2196c03724 100644 --- a/src/renderer/src/i18n/translate/ja-jp.json +++ b/src/renderer/src/i18n/translate/ja-jp.json @@ -838,7 +838,7 @@ "label": "コンテキスト", "tip": "コンテキストに保持する以前のメッセージの数" }, - "max": "最大", + "max": "制限なし", "max_tokens": { "confirm": "最大トークン数", "confirm_content": "最大トークン数を設定すると、モデルが生成できる最大トークン数が制限されます。これにより、返される結果の長さに影響が出る可能性があります。モデルのコンテキスト制限に基づいて設定する必要があります。そうしないとエラーが発生します", @@ -1051,6 +1051,7 @@ "copied": "コピーされました", "copy": "コピー", "copy_failed": "コピーに失敗しました", + "current": "現在", "cut": "切り取り", "default": "デフォルト", "delete": "削除", diff --git a/src/renderer/src/i18n/translate/pt-pt.json b/src/renderer/src/i18n/translate/pt-pt.json index 7e1a85af73..aee876b559 100644 --- a/src/renderer/src/i18n/translate/pt-pt.json +++ b/src/renderer/src/i18n/translate/pt-pt.json @@ -1051,6 +1051,7 @@ "copied": "Copiado", "copy": "Copiar", "copy_failed": "Falha ao copiar", + "current": "Atual", "cut": "Cortar", "default": "Padrão", "delete": "Excluir", diff --git a/src/renderer/src/i18n/translate/ru-ru.json b/src/renderer/src/i18n/translate/ru-ru.json index 82ff1287e6..ea9b78b716 100644 --- a/src/renderer/src/i18n/translate/ru-ru.json +++ b/src/renderer/src/i18n/translate/ru-ru.json @@ -838,7 +838,7 @@ "label": "Контекст", "tip": "Количество предыдущих сообщений, которые нужно сохранить в контексте." }, - "max": "Максимум", + "max": "без ограничений", "max_tokens": { "confirm": "Максимальное количество токенов", "confirm_content": "Установить максимальное количество токенов, влияет на длину результата. Нужно учитывать контекст модели, иначе будет ошибка", @@ -1051,6 +1051,7 @@ "copied": "Скопировано", "copy": "Копировать", "copy_failed": "Не удалось скопировать", + "current": "Текущий", "cut": "Вырезать", "default": "По умолчанию", "delete": "Удалить", diff --git a/src/renderer/src/pages/home/Tabs/SettingsTab.tsx b/src/renderer/src/pages/home/Tabs/SettingsTab.tsx index f56357cc4e..9aca265c40 100644 --- a/src/renderer/src/pages/home/Tabs/SettingsTab.tsx +++ b/src/renderer/src/pages/home/Tabs/SettingsTab.tsx @@ -3,7 +3,12 @@ import { HStack } from '@renderer/components/Layout' import Scrollbar from '@renderer/components/Scrollbar' import Selector from '@renderer/components/Selector' import { HelpTooltip } from '@renderer/components/TooltipIcons' -import { DEFAULT_CONTEXTCOUNT, DEFAULT_MAX_TOKENS, DEFAULT_TEMPERATURE } from '@renderer/config/constant' +import { + DEFAULT_CONTEXTCOUNT, + DEFAULT_MAX_TOKENS, + DEFAULT_TEMPERATURE, + MAX_CONTEXT_COUNT +} from '@renderer/config/constant' import { isOpenAIModel } from '@renderer/config/models' import { UNKNOWN } from '@renderer/config/translate' import { useCodeStyle } from '@renderer/context/CodeStyleProvider' @@ -172,9 +177,6 @@ const SettingsTab: FC = (props) => { setStreamOutput(assistant?.settings?.streamOutput ?? true) }, [assistant]) - const assistantContextCount = assistant?.settings?.contextCount || 20 - const maxContextCount = assistantContextCount > 20 ? assistantContextCount : 20 - const model = assistant.model || getDefaultModel() const isOpenAI = isOpenAIModel(model) @@ -227,21 +229,44 @@ const SettingsTab: FC = (props) => { ) : ( )} - + {t('chat.settings.context_count.label')} + + { + if (value !== null && value >= 0 && value <= 20) { + setContextCount(value) + onContextCountChange(value) + } + }} + formatter={(value) => (value === MAX_CONTEXT_COUNT ? t('chat.settings.max') : (value ?? ''))} + style={{ width: '100%' }} + /> + - + diff --git a/src/renderer/src/pages/settings/AssistantSettings/AssistantModelSettings.tsx b/src/renderer/src/pages/settings/AssistantSettings/AssistantModelSettings.tsx index a2efdf387d..d340b6a673 100644 --- a/src/renderer/src/pages/settings/AssistantSettings/AssistantModelSettings.tsx +++ b/src/renderer/src/pages/settings/AssistantSettings/AssistantModelSettings.tsx @@ -359,6 +359,7 @@ const AssistantModelSettings: FC = ({ assistant, updateAssistant, updateA setTimeoutTimer('contextCount_onChange', () => updateAssistantSettings({ contextCount: value }), 500) } }} + formatter={(value) => (value === MAX_CONTEXT_COUNT ? t('chat.settings.max') : (value ?? ''))} style={{ width: '100%' }} /> @@ -373,7 +374,7 @@ const AssistantModelSettings: FC = ({ assistant, updateAssistant, updateA value={typeof contextCount === 'number' ? contextCount : 0} marks={{ 0: '0', 25: '25', 50: '50', 75: '75', 100: t('chat.settings.max') }} step={1} - tooltip={{ formatter: formatSliderTooltip }} + tooltip={{ formatter: formatSliderTooltip, open: false }} />