feat(session): 弃用 .ai steer,统一会话忙时消息挂起队列 - #128
Merged
Merged
Conversation
- 删除 .ai steer 命令与 steerQueue/方向提示注入机制(.ai live/.ai status 保持原有展示,live 新增挂起状态) - 新增 Session.starting/pendingQueue/deferReceipt/flushPending:会话运行或启动期间收到的新消息一律挂起,由 run/runStream 每轮模型请求前统一入库,修复工具链中插入 user 导致 tool 失配 - Agent.run/runStream 增加同会话闸门(running/starting):同一会话不再并发或排队,始终只有一个会话;acquire 未获许可时不再误释放并发槽 - 触发类挂起消息在链结束后由 resumePending 串行再起一轮;记录类只入库不续跑;.ai stop 清空挂起队列并自增 stopVersion,停止后不复活 - .ai live 展示「启动中」「挂起消息: N」「挂起N」状态 - 新增单元测试:忙时挂起、flush 入库/合并/触发标记/空队列/触发原因提示、stop 清理、同会话闸门防并发
- 普通 .ai live 只展示本会话活跃/排队/挂起,全局活跃与全局队列上限仅保留在 .ai live all
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.
概述
弃用
.ai steer命令,统一会话忙时消息挂起队列:新收到的非触发消息不再并发/排队触发新会话,而是像 steer 一样在上一轮工具调用后插入上下文。改动内容
.ai steer:与挂起行为重复,删除该命令.ai live单会话视图:只展示本会话活跃/排队/挂起,全局并发总览仅保留在.ai live all验证
npm run test:unit:46/46 通过npm run lint、npx tsc --noEmit通过npm run build && npm run smoke通过