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.
This commit is contained in:
mlogclub
2026-04-10 14:43:57 +08:00
parent 7411bac57d
commit 1370e4b675
23 changed files with 642 additions and 222 deletions
@@ -10,6 +10,7 @@ import (
"cs-agent/internal/models"
"cs-agent/internal/pkg/dto"
"cs-agent/internal/pkg/dto/request"
"cs-agent/internal/pkg/toolx"
"cs-agent/internal/services"
componenttool "github.com/cloudwego/eino/components/tool"
@@ -20,8 +21,8 @@ import (
)
const (
CreateTicketConfirmToolCode = "builtin/create_ticket_with_confirmation"
CreateTicketConfirmToolName = "create_ticket_with_confirmation"
CreateTicketConfirmToolCode = toolx.BuiltinCreateTicketConfirmToolCode
CreateTicketConfirmToolName = toolx.BuiltinCreateTicketConfirmToolName
)
type CreateTicketConfirmState struct {