MCPcopy Create free account
hub / github.com/compozy/agh / ListMemoryDailyLogs

Method ListMemoryDailyLogs

internal/api/core/memory.go:949–969  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

947}
948
949func (h *BaseHandlers) ListMemoryDailyLogs(c *gin.Context) {
950 if h.MemoryStore == nil {
951 h.respondMemoryError(c, http.StatusInternalServerError, errors.New("memory store is not configured"), nil)
952 return
953 }
954 query, err := h.memoryDailyLogListQuery(c)
955 if err != nil {
956 h.respondMemoryError(c, StatusForMemoryError(err), err, nil)
957 return
958 }
959 records, err := h.MemoryStore.ListDailyLogRecords(c.Request.Context(), query)
960 if err != nil {
961 h.respondMemoryError(c, StatusForMemoryError(err), err, nil)
962 return
963 }
964 payloads := make([]contract.MemoryDailyLogPayload, 0, len(records))
965 for _, record := range records {
966 payloads = append(payloads, memoryDailyLogPayload(record))
967 }
968 c.JSON(http.StatusOK, contract.MemoryDailyLogListResponse{Logs: payloads})
969}
970
971func (h *BaseHandlers) GetMemoryExtractorStatus(c *gin.Context) {
972 if h.MemoryExtractor == nil {

Callers

nothing calls this directly

Calls 6

respondMemoryErrorMethod · 0.95
StatusForMemoryErrorFunction · 0.85
appendFunction · 0.85
memoryDailyLogPayloadFunction · 0.85
ListDailyLogRecordsMethod · 0.80

Tested by

no test coverage detected