refactor: split agent.go into 12 files + add mcp_restart_server tool

This commit is contained in:
root
2026-07-22 15:40:27 +08:00
parent c24c53e1c6
commit 0e29471bec
20 changed files with 3150 additions and 3080 deletions

View File

@ -134,3 +134,11 @@ func (s *Server) CallTool(name string, args map[string]interface{}) (string, err
func (s *Server) Close() error {
return s.transport.Close()
}
func (s *Server) SetTransport(t Transport) {
s.mu.Lock()
defer s.mu.Unlock()
s.transport.Close()
s.transport = t
s.nextID = 0
}