Files
ai-agent/internal/pkg/dto/response/skill_response.go
T
mlogclub 1370e4b675 feat: enhance AI agent functionality with tool management and logging improvements
- Added AllowedToolCodes field to Context for managing tool access.
- Introduced ResumeSource in aiReplyTraceData to track resume points.
- Enhanced logging with additional fields: PlannedSkillName, SkillRouteTrace, InterruptType, ResumeSource, and FinalStatus.
- Implemented functions to parse and resolve allowed tool codes for agents and skills.
- Refactored skill definition creation and update logic to streamline request handling.
- Updated MCP tool catalog to include source type and integrated built-in tools.
- Improved UI components to display additional tool information and enhance user experience.
2026-04-10 14:43:57 +08:00

63 lines
2.5 KiB
Go

package response
import "time"
type SkillDefinitionResponse struct {
ID int64 `json:"id"`
Code string `json:"code"`
Name string `json:"name"`
Description string `json:"description"`
Content string `json:"content"`
Examples []string `json:"examples"`
AllowedToolCodes []string `json:"allowedToolCodes"`
Priority int `json:"priority"`
Status int `json:"status"`
StatusName string `json:"statusName"`
Remark string `json:"remark"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
CreateUserName string `json:"createUserName"`
UpdateUserName string `json:"updateUserName"`
}
type SkillDebugRunResponse struct {
SkillCode string `json:"skillCode"`
SkillName string `json:"skillName"`
ReplyText string `json:"replyText"`
PlanReason string `json:"planReason"`
SkillRouteTrace string `json:"skillRouteTrace"`
SkillAllowedToolCodes []string `json:"skillAllowedToolCodes"`
ToolCodes []string `json:"toolCodes"`
InvokedToolCodes []string `json:"invokedToolCodes"`
CheckPointID string `json:"checkPointId"`
Interrupted bool `json:"interrupted"`
TraceData string `json:"traceData"`
ErrorMessage string `json:"errorMessage"`
ConversationID int64 `json:"conversationId"`
AIAgentID int64 `json:"aiAgentId"`
}
type AgentRunLogResponse struct {
ID int64 `json:"id"`
ConversationID int64 `json:"conversationId"`
MessageID int64 `json:"messageId"`
AIAgentID int64 `json:"aiAgentId"`
AIConfigID int64 `json:"aiConfigId"`
UserMessage string `json:"userMessage"`
PlannedAction string `json:"plannedAction"`
PlannedSkillCode string `json:"plannedSkillCode"`
PlannedSkillName string `json:"plannedSkillName"`
SkillRouteTrace string `json:"skillRouteTrace"`
PlannedToolCode string `json:"plannedToolCode"`
PlanReason string `json:"planReason"`
InterruptType string `json:"interruptType"`
ResumeSource string `json:"resumeSource"`
FinalAction string `json:"finalAction"`
FinalStatus string `json:"finalStatus"`
ReplyText string `json:"replyText"`
ErrorMessage string `json:"errorMessage"`
LatencyMs int64 `json:"latencyMs"`
TraceData string `json:"traceData"`
CreatedAt string `json:"createdAt"`
}