intake(lote-A): import upstream AionUi PR #881#3
Open
nsalvacao wants to merge 8 commits intobaseline/main-sync-2026-02-17from
Open
intake(lote-A): import upstream AionUi PR #881#3nsalvacao wants to merge 8 commits intobaseline/main-sync-2026-02-17from
nsalvacao wants to merge 8 commits intobaseline/main-sync-2026-02-17from
Conversation
…in AionUI When an active OpenClaw session exists, route channel (Feishu/Telegram/DingTalk) messages to it using a separate gateway session key, avoiding rs_ 404 errors. Gateway broadcasts responses to all WebSocket clients so the main AionUI conversation receives and renders replies automatically. - Add sendChannelMessage() to OpenClawAgent with pre-initialized streaming state to prevent duplicate responses from chat and agent event handlers - Add sendChannelMessage() wrapper to OpenClawAgentManager with cronBusyGuard - Detect OpenClaw tasks in ChannelMessageService and route via sendChannelMessage instead of regular sendMessage; persist user messages and emit IPC events - Detect active OpenClaw tasks in ActionExecutor before session creation to ensure channel messages always land in the original OpenClaw conversation
…w agents Non-OpenClaw agents (Gemini/ACP/Codex) already handle user message display through their own sendMessage flow. The extra IPC user_content emission was causing user messages to be concatenated with AI responses in AionUI.
Add channelTurnActive flag to skip ALL chat.event processing during channel turns. Previously, handleEndTurn (from agent lifecycle end) reset the currentStreamMsgId, allowing late-arriving chat.event deltas to be processed as new content, causing duplicate AI responses in AionUI.
…hannel turns Instead of blocking all chat events during channel turns (which prevented chat.event.final from emitting the finish signal when no agent lifecycle event arrives), keep currentStreamMsgId set during channel turns so the existing delta-skip logic continues to block late chat.event deltas. This ensures: - chat.event.final always calls handleEndTurn → finish signal emitted - Late chat.event deltas still blocked (currentStreamMsgId remains set) - Works regardless of whether gateway sends agent or chat events
…UI rendering Move user message persistence and IPC emission from ChannelMessageService into OpenClawAgentManager.sendChannelMessage. Emit user_content to both openclawConversation and conversation response streams, matching the pattern used by handleStreamEvent for AI responses. Pass msg_id from ChannelMessageService to sendChannelMessage for proper message tracking.
Instead of separate ipcBridge.emit calls for user_content, route the channel user message through handleStreamEvent — the same proven code path used by AI responses. This ensures DB persistence and IPC emission use the identical execution context that works for AI content streaming. Skip channelEventBus for user_content to avoid echoing the user's own message back to the channel platform.
Previously channelTurnActive prevented handleEndTurn from resetting currentStreamMsgId, causing the second channel message's AI response to reuse the first message's msg_id. This led to content concatenation and reversed message order in AionUI. Now handleEndTurn always resets currentStreamMsgId to null so each turn gets a fresh msg_id. Late chat.event deltas during channel turns are blocked by the channelTurnActive flag directly in handleChatEvent.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
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.
Intake PR
This PR was created to follow the mandatory intake workflow in
AGENTS.md.