MCPcopy Index your code
hub / github.com/garrytan/gstack / getActivityHistory

Function getActivityHistory

browse/src/activity.ts:195–202  ·  view source on GitHub ↗
(limit: number = 50)

Source from the content-addressed store, hash-verified

193 * Get the N most recent activity entries.
194 */
195export 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).

Callers 2

activity.test.tsFile · 0.90
makeFetchHandlerFunction · 0.90

Calls 1

toArrayMethod · 0.45

Tested by

no test coverage detected