feat: 群聊提醒 — 提醒关联平台/频道/适配器,到期发回原群聊

- reminder_create 新增 platform/channel_type/channel_id/adapter_name 参数
- Gateway Reminder 模型 + DB 迁移 + CRUD 全部支持新字段
- 提醒到期时:群聊提醒 → platform-bridge 发回原群聊
- 非群聊提醒 → 走 Web 端推送
- Thinker 新增 PushPlatformMessage 方法

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-06-23 20:57:58 +08:00
parent 680696e2c4
commit 27a497e397
6 changed files with 77 additions and 15 deletions
@@ -397,6 +397,17 @@ func (t *Thinker) TriggerReminderMessage(userID, sessionID, message string) {
}
}
// PushPlatformMessage pushes a message to a platform channel via the platform pusher.
func (t *Thinker) PushPlatformMessage(target ProactiveTarget, message string) {
t.mu.Lock()
pusher := t.platformMessagePusher
t.mu.Unlock()
if pusher != nil {
log.Printf("[平台推送] target=%s/%s group=%s msg=%s", target.Platform, target.ChatType, target.GroupID, message)
pusher(target, message)
}
}
// ThinkerConfig 后台思考配置
type ThinkerConfig struct {
Enabled bool