refactor: replace skill code with skill ID across the application

- Updated skill handling to use skill IDs instead of skill codes in various components, services, and models.
- Modified tests to reflect changes in skill identification.
- Removed references to skill codes in favor of skill IDs for consistency and clarity.
- Updated localization files to remove skill code references and adjust error messages accordingly.
This commit is contained in:
mlogclub
2026-06-20 20:42:07 +08:00
parent 39c648f3c1
commit 541e4c5874
49 changed files with 258 additions and 341 deletions
+4 -6
View File
@@ -2,12 +2,10 @@ package request
type SkillDefinitionListRequest struct {
Name string `json:"name"`
Code string `json:"code"`
Status int `json:"status"`
}
type CreateSkillDefinitionRequest struct {
Code string `json:"code"`
Name string `json:"name"`
Description string `json:"description"`
Instruction string `json:"instruction"`
@@ -35,10 +33,10 @@ type UpdateSkillDefinitionStatusRequest struct {
}
type SkillDebugRunRequest struct {
AIAgentID int64 `json:"aiAgentId"`
ConversationID int64 `json:"conversationId"`
SkillCode string `json:"skillCode"`
UserMessage string `json:"userMessage"`
AIAgentID int64 `json:"aiAgentId"`
ConversationID int64 `json:"conversationId"`
SkillDefinitionID int64 `json:"skillDefinitionId"`
UserMessage string `json:"userMessage"`
}
type SkillDebugResumeRequest struct {
-1
View File
@@ -12,7 +12,6 @@ type AIAgentTeamResponse struct {
type AIAgentSkillResponse struct {
ID int64 `json:"id"`
Code string `json:"code"`
Name string `json:"name"`
}
+19 -20
View File
@@ -4,7 +4,6 @@ import "time"
type SkillDefinitionResponse struct {
ID int64 `json:"id"`
Code string `json:"code"`
Name string `json:"name"`
Description string `json:"description"`
Instruction string `json:"instruction"`
@@ -20,24 +19,24 @@ type SkillDefinitionResponse struct {
}
type SkillDebugRunResponse struct {
SkillCode string `json:"skillCode"`
SkillName string `json:"skillName"`
ReplyText string `json:"replyText"`
PlanReason string `json:"planReason"`
SkillRouteTrace string `json:"skillRouteTrace"`
ToolWhitelist []string `json:"toolWhitelist"`
ExposedToolCodes []string `json:"exposedToolCodes"`
InvokedToolCodes []string `json:"invokedToolCodes"`
ToolSearchTrace string `json:"toolSearchTrace"`
GraphToolTrace string `json:"graphToolTrace"`
GraphToolCode string `json:"graphToolCode"`
InterruptType string `json:"interruptType"`
CheckPointID string `json:"checkPointId"`
Interrupted bool `json:"interrupted"`
TraceData string `json:"traceData"`
ErrorMessage string `json:"errorMessage"`
ConversationID int64 `json:"conversationId"`
AIAgentID int64 `json:"aiAgentId"`
SkillDefinitionID int64 `json:"skillDefinitionId"`
SkillName string `json:"skillName"`
ReplyText string `json:"replyText"`
PlanReason string `json:"planReason"`
SkillRouteTrace string `json:"skillRouteTrace"`
ToolWhitelist []string `json:"toolWhitelist"`
ExposedToolCodes []string `json:"exposedToolCodes"`
InvokedToolCodes []string `json:"invokedToolCodes"`
ToolSearchTrace string `json:"toolSearchTrace"`
GraphToolTrace string `json:"graphToolTrace"`
GraphToolCode string `json:"graphToolCode"`
InterruptType string `json:"interruptType"`
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 {
@@ -49,7 +48,7 @@ type AgentRunLogResponse struct {
AIConfigID int64 `json:"aiConfigId"`
UserMessage string `json:"userMessage"`
PlannedAction string `json:"plannedAction"`
PlannedSkillCode string `json:"plannedSkillCode"`
PlannedSkillID int64 `json:"plannedSkillId"`
PlannedSkillName string `json:"plannedSkillName"`
SkillRouteTrace string `json:"skillRouteTrace"`
ToolSearchTrace string `json:"toolSearchTrace"`