MCPcopy Create free account
hub / github.com/IgorWarzocha/howcode / countDisplayableEntriesInRange

Function countDisplayableEntriesInRange

shared/thread-history.ts:22–37  ·  view source on GitHub ↗
(
  entries: SessionPathEntry[],
  startIndex: number,
  endIndex: number,
)

Source from the content-addressed store, hash-verified

20}
21
22function countDisplayableEntriesInRange(
23 entries: SessionPathEntry[],
24 startIndex: number,
25 endIndex: number,
26) {
27 let count = 0
28
29 for (let index = startIndex; index < endIndex; index += 1) {
30 const entry = entries[index]
31 if (entry && isDisplayableEntry(entry)) {
32 count += 1
33 }
34 }
35
36 return count
37}
38
39function appendEntryMessage(messages: AgentMessage[], entry: SessionPathEntry) {
40 switch (entry.type) {

Callers 1

buildThreadHistorySliceFunction · 0.85

Calls 1

isDisplayableEntryFunction · 0.85

Tested by

no test coverage detected