fix(discord): mirror Components v2 outbound messages to session transcript#1323
Open
BingqingLyu wants to merge 3 commits into
Open
fix(discord): mirror Components v2 outbound messages to session transcript#1323BingqingLyu wants to merge 3 commits into
BingqingLyu wants to merge 3 commits into
Conversation
…cript Add buildComponentTranscriptText() to produce a plain-text summary of Discord component messages (buttons, selects, sections, modals) for the session transcript. The adapter attaches it as meta.transcriptText so the existing mirror infrastructure in deliver.ts writes a single enriched transcript entry instead of the plain fallback text. Key design decisions: - No parallel transcript write path: component text flows through meta.transcriptText on the adapter result, picked up by the existing deliverOutboundPayloadsCore mirror block. This avoids the duplicate transcript write that would occur if sendDiscordComponentMessage wrote independently of executeSendAction's onHandled callback. - appendAssistantMessageToSessionTranscript is not exported to the plugin SDK to keep the transcript API as an internal surface. - Mixed batch support: when some delivery results carry enriched adapter text and others do not, both the mirror text and adapter text are concatenated so neither portion is lost. Closes openclaw#21649
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.
sendDiscordComponentMessage sends components via Discord REST API and registers component entries but never appends the outbound message to the session transcript, so the agent loses context when a user clicks a button.
Closes openclaw#21649
Changes:
meta.transcriptTextto component delivery results so the core deliver pipeline mirrors richer component contextmeta.transcriptTextand prefers it over plain text for transcript mirroringTesting:
AI-assisted (Claude + Codex committee consensus, fully tested).
AI-Assisted PR Checklist