mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-14 00:16:38 +00:00
fix: invalidate TeamToolManager cache on team create
handleCreate() only invalidated agentRouter but missed emitting the pub/sub event for TeamToolManager. Reuse invalidateTeamCaches() which does both, matching the pattern used by all other team mutations.
This commit is contained in:
1 parent
fa5f51e72e
commit
e596d2b656
1 file changed
+2
-7
@@ -156,13 +156,8 @@ func (m *TeamsMethods) handleCreate(ctx context.Context, client *gateway.Client,
|
||||
m.autoCreateTeamLinks(ctx, team.ID, leadAgent, memberAgents, client.UserID())
|
||||
}
|
||||
|
||||
// Invalidate agent caches so TEAM.md gets injected
|
||||
if m.agentRouter != nil {
|
||||
m.agentRouter.InvalidateAgent(leadAgent.AgentKey)
|
||||
for _, ag := range memberAgents {
|
||||
m.agentRouter.InvalidateAgent(ag.AgentKey)
|
||||
}
|
||||
}
|
||||
// Invalidate agent + team tool caches so TEAM.md gets injected
|
||||
m.invalidateTeamCaches(ctx, team.ID)
|
||||
|
||||
client.SendResponse(protocol.NewOKResponse(req.ID, map[string]any{
|
||||
"team": team,
|
||||
|
||||
Reference in new issue
Block a user