feat(core): busy_ack_skip_prefixes to silence queued-acks for automated actions - #1835
Open
MingChaoSun wants to merge 1 commit into
Open
MingChaoSun wants to merge 1 commit into
MingChaoSun wants to merge 1 commit into
Conversation
…ed actions Messages arriving while the agent is busy normally get a "message queued" acknowledgment. For high-frequency automated card actions (e.g. instant- feedback survey buttons dispatched as cmd: commands) that ack is pure noise: each click already updates the card synchronously, and the extra chat message yanks the user's viewport to the latest entry. This adds an opt-in per-project busy_ack_skip_prefixes list: messages whose content starts with any listed prefix are still queued and drained as usual, only the acknowledgment is suppressed. Card buttons dispatch as "cmd:<text>", so deployments using both paths list both prefixes. - Default (empty/unset) acks every message — zero behavior change. - Config validation rejects empty entries; documented bilingually in config.example.toml. - Tests: prefix suppression, default behavior preserved, hasAnyPrefix edge cases.
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.
Motivation
Messages arriving while the agent is busy get a "message queued" acknowledgment so the user knows they were received. That's the right default for humans typing — but for high-frequency automated card actions the ack is pure noise.
Concrete case from my deployment: multi-question survey cards whose buttons dispatch commands (each click already updates the card synchronously via the card callback, similar to what #1828 generalizes). A user answering 8 questions in quick succession while a turn is running gets 8 queued-ack chat messages they don't care about, and each one yanks the chat viewport to the bottom — actively harmful UX.
What this adds
An opt-in per-project list:
cmd:<text>, so deployments using both paths list both prefixes (documented).Implementation
Engine.SetBusyAckSkipPrefixes+hasAnyPrefixhelper guarding the singleMsgMessageQueuedreply inqueueMessageForBusySession.cmd/cc-connect/main.go.config.example.tomlnext toagent_session_idle_timeout_mins.hasAnyPrefixedge cases.go test ./core/ ./config/green.中文说明
新增可选的项目级配置
busy_ack_skip_prefixes:agent 忙碌期间到达的消息若命中前缀(如高频问卷按钮派发的命令),照常入队和补发,只是不再回"已入队"回执——连点 8 题不再刷 8 条噪音回执、聊天窗口不再被拽底。默认不配置=每条都回执,零行为变化。