Skip to content

feat(settings): 自动追问数量开放为 agent 策略配置项#127

Merged
huhamhire merged 1 commit into
devfrom
feat/followup-asks-config
Jun 25, 2026
Merged

feat(settings): 自动追问数量开放为 agent 策略配置项#127
huhamhire merged 1 commit into
devfrom
feat/followup-asks-config

Conversation

@huhamhire

Copy link
Copy Markdown
Owner

概述

「自动追问数量」(max_followup_asks)此前已存在于配置,但错挂在 agent.autopilot 下、且设置 UI 未暴露——用户改不到。本 PR 把它归位到 agent.strategy(与 auto_followup 同组),并在设置页 agent 策略区开放为配置项。关联 milestone 配置面板优化

改动

  • schemamax_followup_asks(0–5,默认 2)从 autopilot 移到 strategy——它作用于自动评审微流程(手动「自动评审」与 AutoPilot 共用),非 AutoPilot 专属
  • 消费处 flows/review.ts 改读 agentCfg.strategy.max_followup_asks
  • UI:策略分区新增「追问数量」下拉,置于「自动追问」开关与「代码建议数量」之间
    • 档位 1–5,不提供 0(开关已独立控制启停,0 会与开关歧义)
    • 自动追问关闭时禁用该下拉
  • 草稿状态机 useSettingsDraft 接入 maxFollowupAsks,随 config:setAgent 一并保存
  • i18n 四语言 新增 maxFollowupAsksLabel / maxFollowupAsksHint
  • 文档:配置参考移字段 + 补全此前缺失的 agent.strategy 段;arch 06 修正引用路径

迁移提醒

旧 config 里 autopilot.max_followup_asks 会被 zod strip、strategy 取默认 2——自定义过的极少数用户会重置为 2(默认值不变,0.7.0-dev 阶段影响很小)。

验证

typecheck ✓ · lint ✓ · build ✓ · agent test 76 passed

🤖 Generated with Claude Code

max_followup_asks 原错挂在 autopilot 下且 UI 未暴露;移到 agent.strategy
(与 auto_followup 同组,作用于手动自动评审与 AutoPilot 共用的微流程),
并在策略分区新增「追问数量」下拉(1~5,自动追问关闭时禁用)。

- 消费处 flows/review.ts 改读 strategy.max_followup_asks
- useSettingsDraft 接入草稿状态机,随 config:setAgent 一并保存
- i18n 四语言 + 配置参考/arch 文档同步(补全此前缺失的 agent.strategy 段)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@huhamhire huhamhire added this to the 配置面板优化 milestone Jun 25, 2026
@huhamhire huhamhire added the enhancement New feature or request label Jun 25, 2026
@huhamhire huhamhire merged commit 578033b into dev Jun 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant