fix(conductor): sync md_to_tg_html into embedded bridge template#360
Merged
asheshgoplani merged 1 commit intoasheshgoplani:mainfrom Mar 18, 2026
Merged
Conversation
PR asheshgoplani#338 added markdown-to-HTML conversion for Telegram messages in conductor/bridge.py, but the embedded copy in conductor_templates.go was not updated. This meant `conductor setup` would overwrite bridge.py with the unfixed version, losing bold/italic/code rendering in Telegram. Adds md_to_tg_html() and parse_mode="HTML" to both the handle_message response path and the heartbeat Telegram notification path in the embedded template, matching the standalone bridge.py fix.
There was a problem hiding this comment.
Pull request overview
This PR synchronizes the Telegram markdown-rendering fix (introduced in conductor/bridge.py in #338) into the embedded Python bridge template stored in internal/session/conductor_templates.go, so conductor setup no longer overwrites bridge.py with a version that loses Telegram formatting.
Changes:
- Add
md_to_tg_html()to the embedded bridge template to convert**bold**,*italic*, and`code`to Telegram HTML while escaping unsafe characters. - Update interactive Telegram responses to send HTML (
parse_mode="HTML") and split after conversion. - Update heartbeat Telegram alert notifications to use HTML (
parse_mode="HTML") with chunked splitting.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
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
md_to_tg_html()andparse_mode="HTML"toconductor/bridge.pybut forgot to update the embedded copy ininternal/session/conductor_templates.goconductor setupwould overwritebridge.pywith the unfixed embedded version, losing bold/italic/code rendering in Telegrammd_to_tg_html()functionhandle_messageresponse path to useparse_mode="HTML"parse_mode="HTML"with chunked splittingTest plan
conductor setupwritesbridge.pycontainingmd_to_tg_htmlcodecorrectlygo buildpassesgo test ./internal/session/ -run Conductorpasses