feat(chat): 用输入框上方的排队消息预览条替代占位消息#146
Open
SsparKluo wants to merge 1 commit into
Open
Conversation
SsparKluo
marked this pull request as ready for review
July 21, 2026 08:44
SsparKluo
marked this pull request as draft
July 21, 2026 10:15
SsparKluo
force-pushed
the
feat/queue-message-input-bar
branch
from
July 21, 2026 10:35
10c2e54 to
e7ba196
Compare
SsparKluo
force-pushed
the
feat/queue-message-input-bar
branch
from
July 21, 2026 10:35
e7ba196 to
bf61aef
Compare
SsparKluo
marked this pull request as ready for review
July 21, 2026 10:39
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 生成中发送消息时,队列会往
messageStore里插入一条UserMessageView占位消息——和真实已发送的消息外观完全一样。用户无法分辨"已发送等回复"还是"还在排队没发出去"。改动
将隐形的占位消息方案替换为输入框上方的排队消息预览条。排队消息留在队列中,只有在真正发送后才出现在聊天区。
新增文件:
src/features/chat/input/QueuedMessagesBar.tsx— 输入框上方的排队消息预览条glass),与项目其他悬浮层一致usePresence)src/hooks/useChatSession.ts:buildLocalQueuedMessage(~80 行占位消息构造逻辑)messageStore.upsertLocalMessage调用(不再往消息列表塞假消息)sendQueuedFollowup中的messageStore.removeMessage清理handleSendQueuedNow——立即从队列移除并直接走sendMessageNowhandleAbort中增加followupQueueStore.clearSession——中止生成同时清空队列src/features/chat/ChatPane.tsx— 将排队相关 props 传入InputBoxsrc/features/chat/InputBox.tsx— 在展开态渲染QueuedMessagesBar,折叠态隐藏src/features/chat/input/InputActions.tsx—CollapsedCapsule新增排队计数 badgesrc/locales/en|zh-CN/chat.json— 排队消息相关翻译效果
折叠状态:
展开状态: