MCPcopy
hub / github.com/continuedev/continue / findCompactionIndex

Function findCompactionIndex

extensions/cli/src/compaction.ts:174–181  ·  view source on GitHub ↗
(
  chatHistory: ChatHistoryItem[],
)

Source from the content-addressed store, hash-verified

172 * @returns The index of the compaction message, or null if not found
173 */
174export function findCompactionIndex(
175 chatHistory: ChatHistoryItem[],
176): number | null {
177 const compactedIndex = chatHistory.findIndex(
178 (item) => item.conversationSummary !== undefined,
179 );
180 return compactedIndex === -1 ? null : compactedIndex;
181}
182
183/**
184 * Gets the history to send to the LLM, taking compaction into account

Callers 3

compaction.test.tsFile · 0.85
runHeadlessModeFunction · 0.85
useChatFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected