MCPcopy Create free account
hub / github.com/astercloud/aster / handleGetStatus

Method handleGetStatus

pkg/desktop/desktop.go:430–449  ·  view source on GitHub ↗
(msg *FrontendMessage)

Source from the content-addressed store, hash-verified

428}
429
430func (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
451func (a *App) handleGetHistory(msg *FrontendMessage) (*BackendResponse, error) {
452 _, ok := a.GetAgent(msg.AgentID)

Callers 1

handleMessageMethod · 0.95

Calls 3

GetAgentMethod · 0.95
IDMethod · 0.65
StatusMethod · 0.45

Tested by

no test coverage detected