MCPcopy Create free account
hub / github.com/PatterAI/Patter / push

Function push

libraries/typescript/src/handler-utils.ts:31–34  ·  view source on GitHub ↗
(entry: HistoryEntry)

Source from the content-addressed store, hash-verified

29 const entries: HistoryEntry[] = [];
30
31 const push = (entry: HistoryEntry): void => {
32 if (entries.length >= maxSize) entries.shift();
33 entries.push(entry);
34 };
35
36 const getHistory = (): ReadonlyArray<HistoryEntry> => [...entries];
37

Callers 1

synthesizeStreamMethod · 0.50

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected