mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-10-02 23:33:58 +00:00
feat: waiter CLI remote mode calls REST API directly for management commands
This commit is contained in:
@ -41,6 +41,15 @@ func (s *State) Connected() bool {
|
||||
return s.conn != nil
|
||||
}
|
||||
|
||||
func (s *State) RemoteConn() *remoteConn {
|
||||
s.mu.Lock()
|
||||
defer s.mu.Unlock()
|
||||
if rc, ok := s.conn.(*remoteConn); ok {
|
||||
return rc
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *State) Send(line string) error {
|
||||
s.mu.Lock()
|
||||
c := s.conn
|
||||
|
||||
Reference in New Issue
Block a user