5d7c10aeab
- Updated runtime configuration to use __CS_AI_AGENT_WIDGET_CONFIG__ instead of __CS_AGENT_WIDGET_CONFIG__. - Changed message types in support host bridge from "cs-agent" to "cs-ai-agent". - Minified SDK script updated to reflect new AI agent naming conventions. - Adjusted scrollbar styles in main.scss to use .cs-ai-agent-scrollbar instead of .cs-agent-scrollbar.
40 lines
1.2 KiB
Go
40 lines
1.2 KiB
Go
package builders
|
|
|
|
import (
|
|
"cs-ai-agent/internal/pkg/dto/response"
|
|
"cs-ai-agent/internal/services"
|
|
"time"
|
|
)
|
|
|
|
func BuildAgentTeamScheduleBatchPreviewResponse(result *services.AgentTeamScheduleBatchPreviewResult) *response.AgentTeamScheduleBatchPreviewResponse {
|
|
if result == nil {
|
|
return nil
|
|
}
|
|
items := make([]response.AgentTeamScheduleBatchPreviewItem, 0, len(result.Items))
|
|
for _, item := range result.Items {
|
|
items = append(items, response.AgentTeamScheduleBatchPreviewItem{
|
|
TeamID: item.TeamID,
|
|
TeamName: item.TeamName,
|
|
Date: item.Date.Format(time.DateOnly),
|
|
Weekday: item.Weekday,
|
|
StartAt: item.StartAt.Format(time.DateTime),
|
|
EndAt: item.EndAt.Format(time.DateTime),
|
|
Remark: item.Remark,
|
|
Conflict: item.Conflict,
|
|
ConflictReason: item.ConflictReason,
|
|
})
|
|
}
|
|
return &response.AgentTeamScheduleBatchPreviewResponse{
|
|
Total: result.Total,
|
|
Conflict: result.Conflict,
|
|
Items: items,
|
|
}
|
|
}
|
|
|
|
func BuildAgentTeamScheduleBatchGenerateResponse(result *services.AgentTeamScheduleBatchGenerateResult) *response.AgentTeamScheduleBatchGenerateResponse {
|
|
if result == nil {
|
|
return nil
|
|
}
|
|
return &response.AgentTeamScheduleBatchGenerateResponse{Created: result.Created}
|
|
}
|