Skip to content

新增消息撤回功能,新增消息跟随功能,改进桌面版对话体验、联网搜索能力,以及第三方模型兼容性。#344

Open
2503637088 wants to merge 8 commits intoNanmiCoder:mainfrom
2503637088:main
Open

新增消息撤回功能,新增消息跟随功能,改进桌面版对话体验、联网搜索能力,以及第三方模型兼容性。#344
2503637088 wants to merge 8 commits intoNanmiCoder:mainfrom
2503637088:main

Conversation

@2503637088
Copy link
Copy Markdown

@2503637088 2503637088 commented May 10, 2026

概要

本 PR 改进桌面版对话体验、联网搜索能力,以及第三方模型兼容性。

桌面版对话

  • 增加对话消息撤回功能,可将当前轮次用户输入撤回到编辑框。
  • 撤回当前轮次时,同步回滚该轮对话状态和该轮修改过的文件。
  • 增加对话跟随功能:
    • 如果当前消息列表已经处于底部,新消息输出时自动跟随到底部。
    • 如果用户已向上滚动离开底部,则保持当前停留位置,不强制滚动。

联网搜索

  • 保留原有原生 WebSearch 行为。
  • 增加类似 OpenClaw 的无 Key DuckDuckGo 联网搜索后端。
  • 设置页增加 WebSearch 模式配置。
  • 改进自动模式兜底顺序:
    • Claude 模型优先使用原生 WebSearch。
    • 其次使用 Tavily Key。
    • 再其次使用 Brave Key。
    • 最后使用 DuckDuckGo 作为无 Key 兜底。

第三方模型兼容性

  • 修复 DeepSeek V4 联网搜索 / WebFetch 工具续轮时 reasoning_content 丢失导致的 400 错误。
  • OpenAI Chat 兼容代理现在会将 assistant thinking 正确回传为 reasoning_content
  • 修复 WebFetch 在模型先输出 reasoning/thinking、后输出正文时误判为 No response from model 的问题。
  • 修复从 DeepSeek V4 切换到 Claude / Claude 兼容模型后出现 400 Improperly formed request
    • DeepSeek 的 reasoning 仍保留为 UI 可展示的 thinking block。
    • 当后续请求目标为 Claude-family 模型时,发送前会剥离无 Anthropic signature 的 thinking block,避免污染 Claude 请求体。
    • DeepSeek 自身续轮仍保留 reasoning history,不影响工具调用续轮。

验证

已通过定向测试:

bun test src\utils\__tests__\messages.test.ts
bun test src\server\__tests__\proxy-transform.test.ts src\tools\WebFetchTool\utils.test.ts

@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label May 10, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 10, 2026

PR quality triage

Changed areas: area:cli-core, area:desktop, area:docs, area:server

CLI core policy: Blocked by policy until a maintainer applies allow-cli-core-change and approves the PR.

Missing-test policy: No missing-test policy block detected.

Coverage baseline policy: No coverage-baseline policy block detected.

CLI core files:

  • src/tools/GoalTool/GoalTools.test.ts
  • src/tools/GoalTool/GoalTools.ts
  • src/tools/GoalTool/constants.ts
  • src/tools/GoalTool/prompt.ts
  • src/tools/WebFetchTool/WebFetchTool.ts
  • src/tools/WebFetchTool/utils.test.ts
  • src/tools/WebFetchTool/utils.ts
  • src/tools/WebSearchTool/WebSearchTool.ts
  • src/tools/WebSearchTool/backend.test.ts
  • src/tools/WebSearchTool/backend.ts
  • src/utils/__tests__/messages.test.ts
  • src/utils/messages.ts
  • src/utils/model/model.ts
  • src/utils/settings/types.ts

Coverage policy files:

  • none

Expected checks:

  • change-policy
  • desktop-checks
  • server-checks
  • desktop-native-checks
  • docs-checks
  • coverage-checks

Test coverage signals:

  • Agent/model runtime path changed: use mock/request-shape tests in PR and maintainer live-model smoke before release.

Risk notes:

  • Desktop state/API layer changed: verify store persistence, WebSocket behavior, and startup errors.
  • Session runtime changed: review reconnect, startup diagnostics, provider selection, and thinking settings.
  • Provider/search behavior changed: PR gate uses mock tests; live-provider tests stay maintainer-only.

Hard merge gates still come from GitHub Actions, not AI review.

Dosu handoff: Dosu can be used as the AI reviewer for risk explanation, missing-test prompts, and maintainer Q&A. If it does not comment automatically from the PR template, ask:

@dosubot review this PR for changed-area risk, missing tests, docs impact, desktop startup risk, and CLI core impact.

@dosubot dosubot Bot added the enhancement New feature or request label May 10, 2026
@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels May 10, 2026
@2503637088 2503637088 changed the title 新增消息撤回功能,新增消息跟随功能 新增消息撤回功能,新增消息跟随功能,改进桌面版对话体验、联网搜索能力,以及第三方模型兼容性。 May 10, 2026
Removed sponsorship and donation sections from README.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:cli-core area:desktop area:docs area:server enhancement New feature or request needs-maintainer-approval size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant