Files
ai-agent/internal/pkg/dto/response/channel_response.go
T
mlogclub 5d7c10aeab refactor: rename agent widget references to AI agent for consistency
- 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.
2026-05-30 21:19:36 +08:00

42 lines
1.1 KiB
Go

package response
import (
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/enums"
)
type ChannelResponse struct {
ID int64 `json:"id"`
ChannelType string `json:"channelType"`
ChannelID string `json:"channelId"`
AIAgentID int64 `json:"aiAgentId"`
AIAgentName string `json:"aiAgentName,omitempty"`
Name string `json:"name"`
ConfigJSON string `json:"configJson"`
Status enums.Status `json:"status"`
Remark string `json:"remark"`
}
type WxWorkKFAccountResponse struct {
OpenKfID string `json:"openKfId"`
Name string `json:"name"`
Avatar string `json:"avatar"`
ManagePrivilege bool `json:"managePrivilege"`
}
func BuildChannelResponse(item *models.Channel) ChannelResponse {
if item == nil {
return ChannelResponse{}
}
return ChannelResponse{
ID: item.ID,
ChannelType: item.ChannelType,
ChannelID: item.ChannelID,
AIAgentID: item.AIAgentID,
Name: item.Name,
ConfigJSON: item.ConfigJSON,
Status: item.Status,
Remark: item.Remark,
}
}