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

Function appendSourceMessagesFromEntryRange

shared/thread-history.ts:94–106  ·  view source on GitHub ↗
(
  messages: AgentMessage[],
  pathEntries: SessionPathEntry[],
  startIndex: number,
  endIndex: number,
)

Source from the content-addressed store, hash-verified

92}
93
94function appendSourceMessagesFromEntryRange(
95 messages: AgentMessage[],
96 pathEntries: SessionPathEntry[],
97 startIndex: number,
98 endIndex: number,
99) {
100 for (let index = startIndex; index < endIndex; index += 1) {
101 const entry = pathEntries[index]
102 if (entry) {
103 appendEntryMessage(messages, entry)
104 }
105 }
106}
107
108function getSelectedCompactionIndex(pathEntries: SessionPathEntry[], revealedCompactions: number) {
109 if (revealedCompactions < 0) {

Callers 2

buildThreadHistorySliceFunction · 0.85

Calls 1

appendEntryMessageFunction · 0.85

Tested by

no test coverage detected