(ctx context.Context, raw json.RawMessage)
| 992 | } |
| 993 | |
| 994 | func (h *HostAPIHandler) handleSessionsStatus(ctx context.Context, raw json.RawMessage) (any, error) { |
| 995 | var params hostAPISessionTargetParams |
| 996 | if err := decodeHostAPIParams(raw, ¶ms); err != nil { |
| 997 | return nil, err |
| 998 | } |
| 999 | if h.sessions == nil { |
| 1000 | return nil, errors.New("extension: session manager is not configured") |
| 1001 | } |
| 1002 | if strings.TrimSpace(params.SessionID) == "" { |
| 1003 | return nil, invalidParamsRPCError(errors.New("session_id is required")) |
| 1004 | } |
| 1005 | |
| 1006 | info, err := h.requireHostAPISessionWorkspace(ctx, params.WorkspaceID, params.SessionID) |
| 1007 | if err != nil { |
| 1008 | return nil, err |
| 1009 | } |
| 1010 | return hostAPISessionStatusFromInfo(info), nil |
| 1011 | } |
| 1012 | |
| 1013 | func (h *HostAPIHandler) handleSessionsEvents(ctx context.Context, raw json.RawMessage) (any, error) { |
| 1014 | var params hostAPISessionEventsParams |
nothing calls this directly
no test coverage detected