feat(monitoring): decouple AI platforms from media_platforms and expand catalog to 6
Add ai_platforms table + shared catalog (yuanbao/kimi/wenxin/deepseek/doubao/qwen), drop FKs from platform_accounts and desktop_tasks to media_platforms, and wire target_account_id + platform into DesktopTaskEvent so the desktop runtime no longer has to infer them from local state. Desktop client gains generic AI page detection for binding, drops stale-business-date monitor tasks at the edge, and refactors AccountsView/AiPlatformsView around the shared catalog. Admin tracking view surfaces per-platform sampling status cards. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -242,17 +242,21 @@ type monitoringConfiguredQuestion struct {
|
||||
}
|
||||
|
||||
var defaultMonitoringPlatforms = []monitoringPlatformMetadata{
|
||||
{ID: "yuanbao", Name: "混元 / 元宝"},
|
||||
{ID: "kimi", Name: "Kimi"},
|
||||
{ID: "wenxin", Name: "文心一言"},
|
||||
{ID: "deepseek", Name: "DeepSeek"},
|
||||
{ID: "qwen", Name: "通义千问"},
|
||||
{ID: "doubao", Name: "豆包"},
|
||||
{ID: "qwen", Name: "通义千问"},
|
||||
}
|
||||
|
||||
var monitoringPlatformNames = map[string]string{
|
||||
"deepseek": "DeepSeek",
|
||||
"qwen": "通义千问",
|
||||
"doubao": "豆包",
|
||||
"kimi": "Kimi",
|
||||
"yuanbao": "腾讯元宝",
|
||||
"qwen": "通义千问",
|
||||
"wenxin": "文心一言",
|
||||
"yuanbao": "混元 / 元宝",
|
||||
}
|
||||
|
||||
func (s *MonitoringService) DashboardComposite(
|
||||
@@ -891,7 +895,7 @@ func (s *MonitoringService) ensureCollectNowTasks(
|
||||
func (s *MonitoringService) loadQuota(ctx context.Context, tenantID int64) (monitoringQuotaConfig, error) {
|
||||
cfg := monitoringQuotaConfig{
|
||||
CollectionMode: monitoringCollectorType,
|
||||
EnabledPlatforms: []string{"deepseek", "qwen", "doubao"},
|
||||
EnabledPlatforms: []string{"yuanbao", "kimi", "wenxin", "deepseek", "doubao", "qwen"},
|
||||
}
|
||||
|
||||
var enabledJSON []byte
|
||||
|
||||
Reference in New Issue
Block a user