fix(ton-bridge): send button directly via sdk.telegram.sendMessage, remove buttonEmoji#24
Merged
xlabtg merged 3 commits intoxlabtg:mainfrom Mar 19, 2026
Merged
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: xlabtg#23
…emove buttonEmoji Previously the plugin returned reply_markup in tool data and relied on the runtime/agent to render the button, which did not work correctly in DMs, groups, or channels. Changes: - All three tools now call sdk.telegram.sendMessage() with an inlineKeyboard URL button, sending the message directly to the chat - Add optional buttonText parameter to each tool so the LLM can control the button label (including omitting emoji) per call - Remove buttonEmoji from defaultConfig and inline manifest — emoji should be opt-in via the buttonText parameter, not hardcoded - Use PluginSDKError-aware error handling as per patterns.md - Update README to document new behavior and buttonText parameter Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This reverts commit 58989b1.
Author
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
🤖 Models used:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
Author
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
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
Fixes #23 — the ton-bridge plugin was not correctly sending inline buttons in DMs, groups, and channels, and the emoji on the button could not be removed by the agent.
Root causes found
Plugin returned
reply_markupin tool data instead of sending directly — The three tools returned{ content, reply_markup }as data for the agent/runtime to interpret. The runtime does not automatically convert this into an actual Telegram message with buttons, so buttons were never sent correctly (especially in groups and channels).No way for the agent to remove emoji from the button — The button label was built from
buttonEmoji + buttonTextin config. There was no tool parameter to control the label, so the LLM had no way to honor a user request like "open TON Bridge, no emoji on the button".Hardcoded
buttonEmojiin defaultConfig — Emoji was opt-out rather than opt-in, causing the agent to always include it unless the config was manually changed.Changes
sdk.telegram.sendMessage()with aninlineKeyboardURL button, sending the message directly to the current chat — works in DMs, groups, and channelsbuttonTextparameter to each tool so the LLM can control the button label (including omitting emoji) per callbuttonEmojifromdefaultConfigand inline manifest — emoji is now opt-in via thebuttonTextparameterPluginSDKError-aware error handling as perpatterns.mdbuttonTextparameterTest plan
npm run validatepasses — ton-bridge: 3 tool(s) validatednpm run lintpasses — 0 errors🤖 Generated with Claude Code