getStatus handles GET /status
(ctx context.Context, input *struct{})
| 437 | |
| 438 | // getStatus handles GET /status |
| 439 | func (s *Server) getStatus(ctx context.Context, input *struct{}) (*StatusResponse, error) { |
| 440 | s.mu.RLock() |
| 441 | defer s.mu.RUnlock() |
| 442 | |
| 443 | status := s.conversation.Status() |
| 444 | agentStatus := convertStatus(status) |
| 445 | |
| 446 | resp := &StatusResponse{} |
| 447 | resp.Body.Status = agentStatus |
| 448 | resp.Body.AgentType = s.agentType |
| 449 | resp.Body.Transport = s.transport |
| 450 | |
| 451 | return resp, nil |
| 452 | } |
| 453 | |
| 454 | // getMessages handles GET /messages |
| 455 | func (s *Server) getMessages(ctx context.Context, input *struct{}) (*MessagesResponse, error) { |
nothing calls this directly
no test coverage detected