(msg *FrontendMessage)
| 428 | } |
| 429 | |
| 430 | func (a *App) handleGetStatus(msg *FrontendMessage) (*BackendResponse, error) { |
| 431 | ag, ok := a.GetAgent(msg.AgentID) |
| 432 | if !ok { |
| 433 | return &BackendResponse{ |
| 434 | ID: msg.ID, |
| 435 | Success: false, |
| 436 | Error: "agent not found: " + msg.AgentID, |
| 437 | }, nil |
| 438 | } |
| 439 | |
| 440 | status := ag.Status() |
| 441 | return &BackendResponse{ |
| 442 | ID: msg.ID, |
| 443 | Success: true, |
| 444 | Data: map[string]any{ |
| 445 | "id": ag.ID(), |
| 446 | "state": status.State, |
| 447 | }, |
| 448 | }, nil |
| 449 | } |
| 450 | |
| 451 | func (a *App) handleGetHistory(msg *FrontendMessage) (*BackendResponse, error) { |
| 452 | _, ok := a.GetAgent(msg.AgentID) |
no test coverage detected