(limit: number = 50)
| 193 | * Get the N most recent activity entries. |
| 194 | */ |
| 195 | export function getActivityHistory(limit: number = 50): { |
| 196 | entries: ActivityEntry[]; |
| 197 | totalAdded: number; |
| 198 | } { |
| 199 | const allEntries = activityBuffer.toArray(); |
| 200 | const sliced = limit < allEntries.length ? allEntries.slice(-limit) : allEntries; |
| 201 | return { entries: sliced, totalAdded: activityBuffer.totalAdded }; |
| 202 | } |
| 203 | |
| 204 | /** |
| 205 | * Get subscriber count (for debugging/health). |
no test coverage detected