mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-09-22 01:48:11 +00:00
refactor: split agent.go into 12 files + add mcp_restart_server tool
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user