Repository navigation
fix: 插话按了就送达,修掉排到下下轮与快速连按丢字 - #6
Merged
Merged
Conversation
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.
问题
开着暂停时,插话会出两种岔子。
原因
paused上,而paused只在暂停点挂着时为真,放行后立刻变假。InputActions.submit()写死submit("queue"),不读busyEnter,重放一定进等待区。改动
直接解决问题的:
enabled,开关开启期间常驻,暂停点在与不在一律问主机,不再由客户端状态猜。放行之后的空档里按回车也走主机,不再被 dsh 排到后面。deferred,结束后用那时的草稿再走一遍;已交给在飞请求的附件记claimedRef,同一批图不会被带两次。release分四种去处:有暂停点就放行并并入该步;无暂停点但在跑就入队,等下一个暂停点直接带走;空闲且有 agent 活引用就followup成新 turn;空闲但没有引用则返回未送达,由客户端暂存重试。agent/status转 idle 时用agent.followup()补发,失败放回队列等下一次派发或暂停点再试。next()抛错时把消息放回。暂停点放行后该步 reject 也对称放回。顺带处理的:
unsentRef,下次按回车优先带出;附件序列化出错时文字仍可暂存,图片提示重新选择。enabled、busy、pausePoint、pendingMessages四个字段,isPaused由pausePoint推出。waiting、pending、ReleaseRequest分别改名为pausePoint、pendingMessages、PausePoint。conversation.releaseDraftAttachment释放底层对象与预览 URL,避免每次带图插话都留一份。adjudicating或submitting时拒绝本次放行并提示稍后再按,避免清掉文字却移不走附件导致重复发送。[data-composer-card]时在控制台告警一次,DSH 改了 composer 结构不会再静默失效。peerDependencies补齐实际用到的dsh-client-connection、dsh-client-ui-conversation、dsh-client-ui-renderer、dsh-client-ui-slots、dsh-llm。测试
pnpm typecheck、pnpm test53 项 4 个文件全过、pnpm build通过。兼容性
serializeDraftAttachments调用瞬间抓取附件、InputState的phase、data-composer-card、InputActions的草稿动作。升级 dsh 时要复查,composer 标记缺失会打告警。检查清单