Skip to content

feat(desktop,models): 更新弹窗 Markdown 日志渲染与自定义模型能力自动识别 - #818

Merged
yaojin3616 merged 2 commits into
v0.13.1from
feat/update-markdown-and-model-discovery
Oct 29, 2026
Merged

yaojin3616 merged 2 commits into
v0.13.1from
feat/update-markdown-and-model-discovery

Conversation

@yaojin3616

@yaojin3616 yaojin3616 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

变更背景

  1. 更新弹窗更新日志(Release Notes)展示优化:应用内更新弹窗此前将 releaseNotes 作为纯文本渲染,Markdown 标题、列表、加粗与行内代码符号直接裸露,长日志滚动体验也较受限。
  2. 自定义供应商模型列表能力自动识别:用户通过自定义供应商拉取 /v1/models 列表时,标准 OpenAI 兼容响应仅包含模型 ID,导致拉取到的模型默认不开启深度思考(Reasoning)与图片多模态输入,也缺少设置界面的思考开关。
  3. 带行号文件路径预览与行定位修复:对话中的行内代码路径或 Markdown 链接带有 :行号(:列号) 或 #L行号(C列号)(如 /path/to/harness.log:10092)时,此前要么未剥离 :行号 导致预览读取报 ENOENT,要么剥离了行号但未把 { line } 透传给右侧文档预览栏。

修改内容

  • 更新日志安全 Markdown 渲染:
    • 新增 src/preload/update-notes-view.ts,在不引入 innerHTML 风险的前提下将受限 Markdown(标题、有序/无序列表、**加粗**、`code`)构建为 DOM 节点,过滤任何内嵌 HTML/脚本;
    • 更新 src/preload/desktop-update-ui.ts 与 test/desktop-update-ui.test.ts,优化 .release-notes 滚动容器与无障碍键盘聚焦滚动。
  • 自定义模型能力自动识别与思考开关:
    • 更新 patches/@deepseek-ai+dsh-llm+0.2.2-alpha.2.patch、patches/@deepseek-ai+dsh-llm-pi-ai+0.2.2-alpha.2.patch、patches/@deepseek-ai+dsh-client-ui-settings-models+0.2.2-alpha.2.patch 及说明文档 docs/model-discovery-capabilities-patch.md;
    • 在 /v1/models 发现阶段根据接口扩展字段或目录元数据自动识别 reasoningEfforts、reasoningCompat 与 image 输入能力;
    • 新增 test/model-discovery-capabilities.test.mjs 回归测试。
  • 文件路径行号剥离与预览定位透传:
    • 更新 patches/@deepseek-ai+dsh-client-ui-deliverables+0.2.2-alpha.2.patch、patches/@deepseek-ai+dsh-client-ui-primitives+0.2.2-alpha.2.patch、patches/@deepseek-ai+dsh-client-ui-chat+0.2.2-alpha.2.patch 与 test/local-path-links.test.ts;
    • 在行内代码文件引用(producedFileMentions / localPathReference)、Markdown 文件链接(parseFileLink)及会话 openFile 入口统一剥离 :行号 / #L行号 后缀并透传 { line },使右侧预览栏既能正常打开文件又能自动滚动高亮目标行。

验证记录

  • npx vitest run test/desktop-update-ui.test.ts test/model-discovery-capabilities.test.mjs test/local-path-links.test.ts test/file-preview.test.ts test/patch-runtime-compatibility.test.mjs test/harness-dependency-baseline.test.mjs(6 个测试文件共 51 项测试全部通过)
  • npm run typecheck(通过)
  • git diff --check(通过)

@yaojin3616
yaojin3616 changed the base branch from main to v0.13.1 October 29, 2026 05:58
@yaojin3616
yaojin3616 force-pushed the feat/update-markdown-and-model-discovery branch from 35a69ca to f6e1f57 Compare October 29, 2026 06:11
@yaojin3616
yaojin3616 merged commit ebc452e into v0.13.1 Oct 29, 2026
@yaojin3616
yaojin3616 deleted the feat/update-markdown-and-model-discovery branch October 29, 2026 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant