Skip to content

fix(adapters): promote QQ to config-driven startup and add hot-reload for all channels#380

Merged
Kaguya-19 merged 1 commit into
OpenBMB:mainfrom
Gucc111:fix/adapter-hotreload-and-qq-config
Jul 9, 2026
Merged

fix(adapters): promote QQ to config-driven startup and add hot-reload for all channels#380
Kaguya-19 merged 1 commit into
OpenBMB:mainfrom
Gucc111:fix/adapter-hotreload-and-qq-config

Conversation

@Gucc111

@Gucc111 Gucc111 commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Changes

File Change
src/pilot/config/types.ts Add qq field to PilotAdaptersConfig
src/pilot/config/parseGatewayConfig.ts Add parseQQ() parser for adapters.qq YAML section
src/adapters/channel/qq/QQChannel.ts Add onStateChange callback to QQChannelOptions for state persistence
src/cli/pilotdeck.ts Config-driven QQ startup + QQ hot-reload block + extra channels hot-reload via loadEnabledChannels

Test plan

  • TypeScript compiles with zero errors
  • Full test suite passes (75/75, 0 failures)
  • Manual: start without adapters.qq config — no QQ_BOT_APPID or QQ_BOT_SECRET not set log
  • Manual: add adapters.qq.enabled: true with credentials — QQ channel starts
  • Manual: modify adapters.telegram at runtime — hot-reload picks it up
  • Manual: existing Feishu/Weixin/WeCom behavior unchanged

Closes #241
Closes #242

Made with Cursor

… for all channels

- Add `adapters.qq` YAML config parsing (appId, clientSecret, allowGroups,
  triggerPrefixes, maxMessageLength) with dedicated parseQQ function
- Change QQ channel from unconditional startup to enabled-gate, eliminating
  the spurious "QQ_BOT_APPID not set" log when QQ is not configured
- Add onStateChange callback to QQChannel for session state persistence
- Add QQ hot-reload block in handleAdapterHotReload
- Add extra channels (Telegram, Slack, Discord, etc.) hot-reload via
  loadEnabledChannels, closing the gap where config watcher detected
  adapter changes but only reloaded Feishu/Weixin/WeCom

Closes OpenBMB#241, closes OpenBMB#242

Co-authored-by: Cursor <cursoragent@cursor.com>
@Kaguya-19 Kaguya-19 merged commit cd0c7db into OpenBMB:main Jul 9, 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

2 participants