feat: enhance tooling management with static and dynamic tool code handling

This commit is contained in:
mlogclub
2026-04-11 22:50:35 +08:00
parent e6d0fa2ba2
commit be17807152
4 changed files with 102 additions and 7 deletions
@@ -30,6 +30,17 @@ func (c *RuntimeTraceCollector) Marshal() string {
return string(buf)
}
func (c *RuntimeTraceCollector) SetTooling(staticToolCodes []string, dynamicToolCodes []string, toolSearchEnabled bool) {
if c == nil {
return
}
c.mu.Lock()
defer c.mu.Unlock()
c.Data.Input.StaticToolCodes = append([]string(nil), staticToolCodes...)
c.Data.Input.DynamicToolCodes = append([]string(nil), dynamicToolCodes...)
c.Data.Input.ToolSearchEnabled = toolSearchEnabled
}
func (c *RuntimeTraceCollector) AddToolItem(item ToolTraceItem) {
if c == nil {
return