Skip to content

fix(conductor): sync md_to_tg_html into embedded bridge template#360

Merged
asheshgoplani merged 1 commit intoasheshgoplani:mainfrom
BestSithInEU:fix/sync-bridge-template
Mar 18, 2026
Merged

fix(conductor): sync md_to_tg_html into embedded bridge template#360
asheshgoplani merged 1 commit intoasheshgoplani:mainfrom
BestSithInEU:fix/sync-bridge-template

Conversation

@BestSithInEU
Copy link
Copy Markdown
Contributor

Summary

  • PR fix: render markdown bold/italic/code in Telegram messages #338 (26d8399) added md_to_tg_html() and parse_mode="HTML" to conductor/bridge.py but forgot to update the embedded copy in internal/session/conductor_templates.go
  • Every conductor setup would overwrite bridge.py with the unfixed embedded version, losing bold/italic/code rendering in Telegram
  • Syncs the same fix into the embedded Go template:
    • Adds md_to_tg_html() function
    • Updates handle_message response path to use parse_mode="HTML"
    • Updates heartbeat Telegram notification path to use parse_mode="HTML" with chunked splitting

Test plan

  • conductor setup writes bridge.py containing md_to_tg_html
  • Telegram messages render bold, italic, and code correctly
  • go build passes
  • go test ./internal/session/ -run Conductor passes

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.
Copilot AI review requested due to automatic review settings March 18, 2026 02:10
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@asheshgoplani asheshgoplani merged commit c0578b6 into asheshgoplani:main Mar 18, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants