18c9354095
- 注入数据库、运行时配置、统一响应、文件存储和平台 AI 能力,补充业务读写工具与客户快捷操作契约。 - 移除模块内重复的组织、客户、工单、标签、技能、旧工作流、MCP 和迁移实现,将身份权限与业务主体交由宿主管理。 - 使用 libSQL 重构向量存储,并完善图片消息、访客身份、排队调度、企业微信和支持聊天页面。 - 统一 HTTP、DTO 与 WebSocket 的 snake_case 协议,补齐模块初始化、业务动作和公共载荷等回归测试。
84 lines
3.4 KiB
Go
84 lines
3.4 KiB
Go
package response
|
|
|
|
type DashboardOverviewResponse struct {
|
|
Range string `json:"range"`
|
|
GeneratedAt string `json:"generated_at"`
|
|
Summary DashboardSummaryResponse `json:"summary"`
|
|
ConversationStats DashboardSectionStatsResponse `json:"conversation_stats"`
|
|
AgentStats DashboardAgentStatsResponse `json:"agent_stats"`
|
|
AIStats DashboardAIStatsResponse `json:"ai_stats"`
|
|
Alerts []DashboardAlertResponse `json:"alerts"`
|
|
QuickLinks []DashboardQuickLinkResponse `json:"quick_links"`
|
|
}
|
|
|
|
type DashboardSummaryResponse struct {
|
|
TodayNewConversations int64 `json:"today_new_conversations"`
|
|
ProcessingConversations int64 `json:"processing_conversations"`
|
|
PendingDispatchConversations int64 `json:"pending_dispatch_conversations"`
|
|
OnlineAgents int64 `json:"online_agents"`
|
|
AIServiceRate float64 `json:"ai_service_rate"`
|
|
}
|
|
|
|
type DashboardSectionStatsResponse struct {
|
|
StatusDistribution []DashboardStatusDistributionItem `json:"status_distribution"`
|
|
Trend []DashboardTrendItem `json:"trend"`
|
|
}
|
|
|
|
type DashboardStatusDistributionItem struct {
|
|
Status int `json:"status"`
|
|
Label string `json:"label"`
|
|
Count int64 `json:"count"`
|
|
}
|
|
|
|
type DashboardTrendItem struct {
|
|
Date string `json:"date"`
|
|
NewCount int64 `json:"new_count"`
|
|
ClosedCount int64 `json:"closed_count"`
|
|
}
|
|
|
|
type DashboardAgentStatsResponse struct {
|
|
OnlineAgents int64 `json:"online_agents"`
|
|
BusyAgents int64 `json:"busy_agents"`
|
|
OfflineAgents int64 `json:"offline_agents"`
|
|
TeamLoads []DashboardTeamLoadResponse `json:"team_loads"`
|
|
}
|
|
|
|
type DashboardTeamLoadResponse struct {
|
|
TeamID int64 `json:"team_id"`
|
|
TeamName string `json:"team_name"`
|
|
TotalAgents int64 `json:"total_agents"`
|
|
OnlineAgents int64 `json:"online_agents"`
|
|
BusyAgents int64 `json:"busy_agents"`
|
|
OfflineAgents int64 `json:"offline_agents"`
|
|
WaitingConversations int64 `json:"waiting_conversations"`
|
|
ProcessingConversations int64 `json:"processing_conversations"`
|
|
MaxConcurrentCapacity int64 `json:"max_concurrent_capacity"`
|
|
LoadRate float64 `json:"load_rate"`
|
|
HasScheduleNow bool `json:"has_schedule_now"`
|
|
}
|
|
|
|
type DashboardAIStatsResponse struct {
|
|
EnabledAIAgents int64 `json:"enabled_ai_agents"`
|
|
EnabledChannels int64 `json:"enabled_channels"`
|
|
TodayKnowledgeRetrieves int64 `json:"today_knowledge_retrieves"`
|
|
TodayKnowledgeRetrieveFailCount int64 `json:"today_knowledge_retrieve_fail_count"`
|
|
TodayKnowledgeRetrieveFailRate float64 `json:"today_knowledge_retrieve_fail_rate"`
|
|
TodayAgentRunFailCount int64 `json:"today_agent_run_fail_count"`
|
|
TodayAIHandoffCount int64 `json:"today_ai_handoff_count"`
|
|
}
|
|
|
|
type DashboardAlertResponse struct {
|
|
ID string `json:"id"`
|
|
Level string `json:"level"`
|
|
Title string `json:"title"`
|
|
Description string `json:"description"`
|
|
Count int64 `json:"count"`
|
|
Link string `json:"link"`
|
|
}
|
|
|
|
type DashboardQuickLinkResponse struct {
|
|
Title string `json:"title"`
|
|
Description string `json:"description"`
|
|
Link string `json:"link"`
|
|
}
|