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
+5
View File
@@ -950,9 +950,14 @@ type AgentRunLog struct {
UserMessage string `gorm:"type:longtext"`
PlannedAction string `gorm:"type:varchar(30);not null;default:'';index"`
PlannedSkillCode string `gorm:"type:varchar(100);not null;default:'';index"`
PlannedSkillName string `gorm:"type:varchar(100);not null;default:''"`
SkillRouteTrace string `gorm:"type:text"`
PlannedToolCode string `gorm:"type:varchar(200);not null;default:'';index"`
PlanReason string `gorm:"type:varchar(500);not null;default:''"`
InterruptType string `gorm:"type:varchar(50);not null;default:'';index"`
ResumeSource string `gorm:"type:varchar(50);not null;default:'';index"`
FinalAction string `gorm:"type:varchar(30);not null;default:'';index"`
FinalStatus string `gorm:"type:varchar(30);not null;default:'';index"`
ReplyText string `gorm:"type:longtext"`
ErrorMessage string `gorm:"type:text"`
LatencyMs int64 `gorm:"type:bigint;not null;default:0"`