DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.
fix(plugins): 高级区开关文案改为「图片输入」与「关闭 Developer 角色」
hairyf3f33ed4d3785
diff --git a/packages/dsh-tauri-model-config/README.md b/packages/dsh-tauri-model-config/README.mdindex b137647f..9537ebb7 100644--- a/packages/dsh-tauri-model-config/README.md+++ b/packages/dsh-tauri-model-config/README.md@@ -22,7 +22,7 @@| 面板标题右侧(`.zGbnIq_title`) | **打开配置文件**:用系统默认程序打开 `$DSH_HOME/settings.yaml`;文件尚未创建时改为打开它所在目录 || 单个模型行(`.zGbnIq_modelRow`) | **获取配置**:仅在该条目只有 `id`/`name`/`description` 时出现,按 `id` 从提供方端点读取该模型的上下文与输出上限 || 模型目录标题(`.zGbnIq_modelCatalogHeading`) | 追加 `flex: 1`(按钮集中到右侧),并在右侧加入 **自动配置所有模型**;pi-ai 提供方与官方 DeepSeek 模型目录都有这个入口 |-| 单个模型高级区(`.zGbnIq_modelAdvanced`) | **支持图片输入** 开关 → `input` 声明;**思考模式** 开关 → `reasoningEfforts` 声明,打开后可按档位勾选;**本地端点思考** 开关 → `compat` 声明(仅路由显式声明 `openai-completions` 时出现) |+| 单个模型高级区(`.zGbnIq_modelAdvanced`) | **图片输入** 开关 → `input` 声明;**思考模式** 开关 → `reasoningEfforts` 声明,打开后可按档位勾选;**关闭 Developer 角色** 开关 → `compat` 声明(仅路由显式声明 `openai-completions` 时出现) |高级区里的开关统一由 `.zGbnIq_modelSwitchRow` 包裹(`display: flex` + `height: 32px` + 垂直居中),与相邻的 32px 文本输入框对齐。@@ -87,13 +87,13 @@开关只表达两种**显式声明**:`false`(不支持)与档位对象(支持)。`reasoningEfforts` 缺席表示「继承默认」,此时开关读为关,与图片开关同一口径。-### 本地端点思考+### 关闭 Developer 角色声明了档位不等于档位能到端点。pi-ai 默认把档位放进顶层的 `reasoning_effort`,并在模型有思考能力时把系统提示的角色从 `system` 换成 `developer`;而 vLLM 这类 OpenAI 兼容端点从 `chat_template_kwargs`读思考参数、也不认 `developer`,于是出现「档位选了没反应」与「整轮 400 `Unexpected message role.`」。-**本地端点思考** 开关把这类端点需要的三项事实一次写进该模型的 `compat`:+**关闭 Developer 角色** 开关把这类端点需要的三项事实一次写进该模型的 `compat`:```yamlcompat:@@ -120,4 +120,4 @@ compat:- 图片能力既不在官方发现通道的返回里,也没有跨厂商的端点字段:它来自模型能力表,表里没有的靠家族规则。两者都是社区口径的近似值,用户随时可以在高级区改;单行「获取配置」也不会覆盖手写值。- 能力表需要一次网络请求(约 2.6 MB 的原始数据集,压成 72 KB 落盘,一天内不再请求)。离线且从未下载过时,只剩家族规则能补图片/思考,容量仍由端点清单提供。- 档位只提供官方词表内的勾选,线值固定等于档位名;端点要求特殊线值时改设置文档即可。-- 「本地端点思考」写的是一组固定的 `compat`:参数名 `reasoning_effort`、下发格式 `chat-template`。端点要求别的参数名(例如 `enable_thinking`)或别的下发格式时,改设置文档即可;开关只表达它写入的这一组。+- 「关闭 Developer 角色」写的是一组固定的 `compat`:参数名 `reasoning_effort`、下发格式 `chat-template`。端点要求别的参数名(例如 `enable_thinking`)或别的下发格式时,改设置文档即可;开关只表达它写入的这一组。diff --git a/packages/dsh-tauri-model-config/src/client/models/ModelListEditor.tsx b/packages/dsh-tauri-model-config/src/client/models/ModelListEditor.tsxindex a8f95d97..cd20904f 100644--- a/packages/dsh-tauri-model-config/src/client/models/ModelListEditor.tsx+++ b/packages/dsh-tauri-model-config/src/client/models/ModelListEditor.tsx@@ -474,15 +474,15 @@ export function ModelListEditor(props: ModelListEditorProps): ReactNode {{probe.api === TEMPLATE_COMPAT_PROTOCOL? (<div className={styles.modelField}>- <span className={styles.modelFieldLabel} title={t('templateThinkingHint')}>- {t('templateThinking')}+ <span className={styles.modelFieldLabel} title={t('developerRoleHint')}>+ {t('developerRole')}</span><div className={styles.modelSwitchRow}><Switchchecked={supportsTemplateThinking(model)}disabled={disabled}- label={`${t('templateThinking')} ${index + 1}`}- title={t('templateThinkingHint')}+ label={`${t('developerRole')} ${index + 1}`}+ title={t('developerRoleHint')}onChange={(next) => { patch(index, { compat: templateThinkingCompat(model, next) }) }}/></div>diff --git a/packages/dsh-tauri-model-config/src/client/models/locales.ts b/packages/dsh-tauri-model-config/src/client/models/locales.tsindex 45b75d51..25430a22 100644--- a/packages/dsh-tauri-model-config/src/client/models/locales.ts+++ b/packages/dsh-tauri-model-config/src/client/models/locales.ts@@ -109,8 +109,8 @@ export const en = {thinkingMode: 'Thinking mode',thinkingLevels: 'Thinking levels',thinkingModeHint: 'Declare whether this model thinks, then tick the levels it offers',- templateThinking: 'Local endpoint thinking',- templateThinkingHint: 'vLLM-style OpenAI-compatible servers read the effort from chat_template_kwargs and accept only the system role; writes compat thinkingFormat=chat-template, chatTemplateKwargs.reasoning_effort={$var: thinking.effort} and supportsDeveloperRole=false',+ developerRole: 'Disable developer role',+ developerRoleHint: 'Turn this on for an endpoint that rejects the developer role: system prompts stay system, and the effort travels through chat_template_kwargs; writes compat supportsDeveloperRole=false, thinkingFormat=chat-template and chatTemplateKwargs.reasoning_effort={$var: thinking.effort}',fetchModelConfig: 'Fetch config',fetchModelConfigHint: 'Fill in this model\'s limits from the endpoint and its image/thinking capabilities from the model capability table',autoConfigureModels: 'Configure all models',@@ -230,13 +230,13 @@ export const zh: { [Key in keyof typeof en]: string } = {openConfigFileLanded: '已打开 {path}',openConfigFileDirectory: '配置文件尚未创建,已改为打开 {path}',openConfigFileFailed: '无法打开配置文件:{detail}',- imageInput: '支持图片输入',+ imageInput: '图片输入',imageInputHint: '声明该模型是否接受图片内容',thinkingMode: '思考模式',thinkingLevels: '思考档位',thinkingModeHint: '声明该模型是否支持思考,并勾选它提供的档位',- templateThinking: '本地端点思考',- templateThinkingHint: 'vLLM 等 OpenAI 兼容端点从 chat_template_kwargs 读取思考档位,且只认 system 角色;开启后写入 compat:thinkingFormat=chat-template、chatTemplateKwargs.reasoning_effort={$var: thinking.effort}、supportsDeveloperRole=false',+ developerRole: '关闭 Developer 角色',+ developerRoleHint: '端点是本地部署这类不认 developer 角色时打开:系统提示保持 system,思考档位改从 chat_template_kwargs 下发;开启后写入 compat:supportsDeveloperRole=false、thinkingFormat=chat-template、chatTemplateKwargs.reasoning_effort={$var: thinking.effort}',fetchModelConfig: '获取配置',fetchModelConfigHint: '从提供方端点读取该模型的上下文与输出上限,并按模型能力表补齐图片与思考档位',autoConfigureModels: '自动配置所有模型',