Skip to content

fix(tgapp): support /review command handling#478

Merged
lsdefine merged 11 commits into
lsdefine:mainfrom
YooooEX:telegram-polish
May 26, 2026
Merged

fix(tgapp): support /review command handling#478
lsdefine merged 11 commits into
lsdefine:mainfrom
YooooEX:telegram-polish

Conversation

@YooooEX
Copy link
Copy Markdown
Contributor

@YooooEX YooooEX commented May 25, 2026

Context

Telegram /help and the bot command menu already expose /review, but Telegram command messages are consumed by handle_command() before they can reach the shared slash-command hook. This PR wires /review into the Telegram command handler while keeping the change radius inside frontends/tgapp.py. No new dependencies are added.

Summary

Add Telegram /review slash-command handling by reusing the shared review_cmd prompt path and streaming generated review prompts through the existing Telegram response flow.

Changes

frontends/tgapp.py

  • Import the shared /review handler from review_cmd.
  • Add Telegram-local /review argument parsing so /review and /review <scope> map to the shared review command body.
  • Route /review help style responses through the existing MarkdownV2-safe command reply path.
  • For review prompts, cancel any active Telegram stream task before starting the review task through agent.put_task(..., source="telegram").
  • Reuse the existing _stream(...) lifecycle and ctx.user_data["stream_task"] tracking for review output.

Copy link
Copy Markdown
Owner

@lsdefine lsdefine left a comment

Choose a reason for hiding this comment

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

Approved: wires existing /review command support into Telegram frontend; implementation matches review_cmd.handle contract and compiles.

@lsdefine lsdefine merged commit e308f1d into lsdefine:main May 26, 2026
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.

2 participants