getSessionSnapshot returns the full state of a session in one response (stored fields + live runtime state + last event sequence number) so a client can rebuild its view and then tail /events?since= without missing any transition.
(c echo.Context)
| 320 | // client can rebuild its view and then tail /events?since=<last_event_seq> |
| 321 | // without missing any transition. |
| 322 | func (s *Server) getSessionSnapshot(c echo.Context) error { |
| 323 | snapshot, err := s.sm.GetSessionSnapshot(c.Request().Context(), c.Param("id")) |
| 324 | if err != nil { |
| 325 | return echo.NewHTTPError(http.StatusNotFound, fmt.Sprintf("session not found: %v", err)) |
| 326 | } |
| 327 | return c.JSON(http.StatusOK, snapshot) |
| 328 | } |
| 329 | |
| 330 | func (s *Server) resumeSession(c echo.Context) error { |
| 331 | var req api.ResumeSessionRequest |
nothing calls this directly
no test coverage detected