feat(feishu): structured cards with identity header and streaming enhancements#25624
Closed
nszhsl wants to merge 2 commits intoopenclaw:mainfrom
Closed
feat(feishu): structured cards with identity header and streaming enhancements#25624nszhsl wants to merge 2 commits intoopenclaw:mainfrom
nszhsl wants to merge 2 commits intoopenclaw:mainfrom
Conversation
The Feishu reply dispatcher was missing the onReasoningStream callback, causing thinking/reasoning content from the AI model to be silently discarded. The streaming card only showed a static "⏳ Thinking..." label until the final reply text arrived. Add onReasoningStream and onReasoningEnd handlers that pipe reasoning deltas through the existing streaming card session, so users can see the model's thinking process in real time. Co-Authored-By: Claude Opus 4.6 <[email protected]>
…cements Add gateway-level structured card rendering so agents get properly formatted Feishu cards without manual intervention. - Export resolveAgentIdentity and IdentityConfig from plugin-sdk - Add buildStructuredCard / sendStructuredCardFeishu with optional header (title + color from identity config) and note footer - Streaming cards: accept header/note options in start(), update note at close() with final model/provider info via Card Kit element API - Add flush timer to streaming throttle so pending updates are not lost - Reply dispatcher reads agent identity and passes header/note to both streaming and non-streaming card paths - Outbound adapter respects renderMode and uses structured cards for direct-send messages (e.g. subagent results) Co-Authored-By: Claude Opus 4.6 <[email protected]>
Merged
6 tasks
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.
Summary
IdentityConfig. No hardcoded agent names or icons.FeishuStreamingSession.start()accepts header/note options; note is updated atclose()with final model/provider info via the Card Kit element update API. Added a flush timer so throttled partial updates are not silently dropped.💭 Thinking...instead of showing a static label.feishuOutbound.sendText()now respectsrenderModeand sends structured cards for direct-send messages (e.g. subagent completion results), using identity when available.resolveAgentIdentityandIdentityConfigare now exported fromopenclaw/plugin-sdkfor use by channel extensions.Changed files
src/plugin-sdk/index.tsresolveAgentIdentity+IdentityConfigextensions/feishu/src/send.tsCardHeaderConfig,buildStructuredCard(),sendStructuredCardFeishu()extensions/feishu/src/streaming-card.tsstart(),updateNoteContent(), note update inclose(), flush timerextensions/feishu/src/reply-dispatcher.tsextensions/feishu/src/outbound.tssendTextwhenrenderMode=cardTest plan
identityconfigured → card has colored header with emoji + nameAgent: name | Model: ... | Provider: ...after streaming closes💭 Thinking...in real-timeidentityconfig → fallback to agentId as title, no emoji, blue colorrenderMode: "auto"andrenderMode: "raw"modes unaffectedrenderMode: "card"reply-dispatcher.test.ts,send.test.ts🤖 Generated with Claude Code