feat(telegram): add inline keyboard buttons support#2515
Closed
mkeizer wants to merge 1 commit into
Closed
Conversation
Adds the ability for agents to send messages with inline buttons (Telegram InlineKeyboard). When a user clicks a button, the click is delivered as an inbound message with [button_click:<id>] format. Changes: - types.ts: Add InlineButton, SendMessageOptions interfaces - ipc.ts: Pass buttons through IPC message pipeline - index.ts: Route buttons from IPC to channel.sendMessage() - telegram.ts: Build InlineKeyboard from button data, handle callback_query events and deliver clicks as messages - ipc-mcp-stdio.ts: Add optional buttons parameter to send_message tool Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced May 17, 2026
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
InlineButtonandSendMessageOptionstypes for generic button supportsend_messageMCP tool with an optionalbuttonsparameter (array of rows)InlineKeyboardfrom the button data and attaches to outgoing messagescallback_query:dataevents — delivers button clicks as[button_click:<id>]messages to the agentHow it works
Agent sends a message with buttons:
{ "text": "Deploy to production?", "buttons": [[ {"text": "✅ Approve", "id": "approve_deploy"}, {"text": "❌ Reject", "id": "reject_deploy"} ]] }User sees an inline keyboard in Telegram. When they click a button, the agent receives:
Test plan
tsc --noEmit)🤖 Generated with Claude Code