use model snapshot to prevent unsync access to model

This commit is contained in:
jrussellsmyth 2026-03-01 23:31:46 +00:00
parent 7660bf7c74
commit ce9d338956

View file

@ -72,7 +72,7 @@ func (sm *SubagentManager) UpdateModel(modelName string) {
defer sm.mu.Unlock() defer sm.mu.Unlock()
sm.defaultModelName = modelName sm.defaultModelName = modelName
} }
// If not set, subagent will have access to the provided tools.
func (sm *SubagentManager) SetTools(tools *ToolRegistry) { func (sm *SubagentManager) SetTools(tools *ToolRegistry) {
sm.mu.Lock() sm.mu.Lock()
defer sm.mu.Unlock() defer sm.mu.Unlock()