feat: implement skill middleware and enhance tool handling for selected skills

This commit is contained in:
mlogclub
2026-04-12 10:11:17 +08:00
parent 06abbbeeb6
commit 560ebdbf13
9 changed files with 153 additions and 13 deletions
@@ -55,6 +55,16 @@ func (c *RuntimeTraceCollector) SetInstructionSummary(summary InstructionTraceSu
c.Data.Instruction.HasToolRule = summary.HasToolRule
}
func (c *RuntimeTraceCollector) SetSkillMiddleware(enabled bool, toolName string) {
if c == nil {
return
}
c.mu.Lock()
defer c.mu.Unlock()
c.Data.Skill.MiddlewareEnabled = enabled
c.Data.Skill.MiddlewareToolName = toolName
}
func (c *RuntimeTraceCollector) AddToolItem(item ToolTraceItem) {
if c == nil {
return