Repository navigation
feat(groups): 支持按群自动关闭无交互会话 - #1742
Merged
deepcoldy merged 2 commits intoOct 12, 2026
Merged
Conversation
Vivapercuore
requested review from
47seek,
LucasIcarus,
deepcoldy,
xiaoxueSunn and
xiongz-c
as code owners
October 8, 2026 11:31
Owner
|
你好 @Vivapercuore,这个 PR 的自动评审群已经建好,首轮 review 正在进行。 你目前不在我们的自动拉群作者名单里,麻烦点击下面的链接自行加入评审群(一年有效): 也欢迎把 GitHub 账号和飞书信息补录到名单文档,后续你的 PR 会被自动拉进评审群: (本条为自动化流程发送,评审意见最终以维护者审阅为准。) |
GET /api/groups 随本特性对每个群返回 idleClose 默认值, 五处既有 toEqual 契约快照补齐该字段。 Co-Authored-By: Claude Code <noreply@anthropic.com>
7 tasks
Owner
|
已合入 master(510588de1),感谢贡献 🎉 合入前在最新主干上补了一个纯测试修正:本特性给 GET /api/groups 的每个群新增了 idleClose 默认字段,既有 非阻断的后续项(测试硬化、guard 结构、文档互指、真机验收)已集中记录在 #1838。 |
|
🚀 Released in v3.42.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
群组管理缺少按无交互时长关闭会话的设置。本次在「新话题默认模型」上方新增「无交互的会话自动关闭」卡片,按群内机器人分别配置,默认关闭,预填 1 天。时长支持正整数输入和原生数字步进,可切换天/小时。
配置保存到 bots.json,保存后用于本群已有和新建会话。后台根据最近一次消息时间检查空闲、休眠会话,并沿用现有关闭流程。执行中、等待确认、已锁定、接管、转移中以及持有待处理输入的会话会跳过;取得会话变更锁后再次检查配置和活动时间,避免检查期间的新消息被误关。前端和接口均校验正整数,保存失败会保留输入并显示错误。
影响范围:涉及 Dashboard、群级配置存储和 daemon 公共会话管理,不改动具体 CLI 适配器或平台进程实现。测试覆盖 pty、tmux、zmx、remote-runner 状态夹具,以及普通空闲会话、休眠会话和受保护会话。已在 macOS 验证;Linux、真实 CLI 进程和飞书环境尚未实测,也未部署或重启已有 daemon。
验证结果:
bun run build通过,包含 TypeScript 检查和 Dashboard 打包。node scripts/verify-group-idle-close.mjs通过。使用模拟数据验证实际页面组件的卡片顺序、默认关闭、整数与步进输入、单位切换、保存回显、失败提示、关闭开关和手机布局。git diff --check通过。bun run test \ test/group-idle-close.test.ts \ test/group-idle-close-sweeper.test.ts \ test/dashboard-group-idle-close.test.ts \ test/ipc-group-idle-close.test.ts \ test/group-serial-input-store.test.ts \ test/dashboard-group-serial-input.test.ts \ test/dashboard-group-default-models.test.ts \ test/group-default-models-store.test.ts \ test/groups-action-helpers.test.ts \ test/dashboard-i18n.test.ts \ test/session-cleanup.test.ts \ test/idle-worker-sweeper.test.ts \ test/bot-registry.test.ts \ test/config-store.test.ts \ test/dashboard-project-group-mode-ui.test.ts桌面截图(模拟数据):
手机截图(模拟数据):