feat(tutorbot): Channels tab, Telegram UI, API channel reload, token …#338
feat(tutorbot): Channels tab, Telegram UI, API channel reload, token …#338
Conversation
…reveal
- Return full channels on GET /tutorbot/{id}; keep list view as channel names only
- PATCH bot when stopped (disk config); PATCH running applies channels + hot-reload listeners
- Add Channels tab: delivery toggles, Telegram fields, merge-safe save, show/hide token
- Extend tutorbot router tests (GET stopped, PATCH stopped/running + reload)
ddf6e05 to
1604efa
Compare
|
@pancacake this change allows users to configure telegram channels in the tutorbot. This PR will only handle telegram for now. I plan to extend this and generalize so any messaging platform supported by the API should be configurable. In order to keep the PR light sending this as the first change. Happy to discuss. |
|
This is soooo important for us. Thanks for your contribution! |
Hey! I've merged and slightly expnaded your pr in this release: https://github.com/HKUDS/DeepTutor/releases/tag/v1.1.2. But it's not well-tested. You could further test and expand this function, base on the newest release (if available!) Thanks !!! |
|
Will do thank you for the quick turn around! |
Description
Adds a Channels tab on the Agents page to configure Telegram and global channel delivery options (
send_progress,send_tool_hints) without editing YAML by hand.Scope note: This PR focuses on Telegram plus global channel flags. Other messaging channels (e.g. Discord, Slack, Feishu, WeCom, DingTalk, Email, and any schema-driven or shared UI) are intentionally out of scope here and will land in follow-up commits/PRs so this change stays small and reviewable.
API / backend
/api/v1/tutorbot/{bot_id}returns the fullchannelsobject when the bot is stopped (same as runningto_dict()), so the UI can load tokens and nested config./api/v1/tutorbot(list) still returns channel name keys only forchannels, to avoid exposing secrets in the list payload./api/v1/tutorbot/{bot_id}works when the bot is stopped (load/saveconfig.yamlon disk).channelsis PATCHed, config is saved andreload_channelsrestarts channel listener tasks (sameMessageBus) so users do not need Stop/Start for Telegram changes.channelsdict preserves non-Telegram keys). Bot token field supports show/hide (reveal) withEye/EyeOff.Tests
tests/api/test_tutorbot_router.py: stopped GET returns nested channels; PATCH when stopped persists; PATCH when running invokesreload_channelswhenchannelsis sent.Related Issues
Module(s) Affected
agentsapiconfigcoreknowledgeloggingservicestoolsutilsweb(Frontend)docs(Documentation)scriptstests...Checklist
pre-commit run --all-filesand fixed any issues.Additional Notes
channels(including tokens) on single-bot GET matches the sensitivity of readingdata/tutorbot/<id>/config.yaml; list endpoint remains key-only.Screenshots
New Tab for channels
Channel Configuration