MCPcopy
hub / github.com/codeaashu/claude-code / notifyCompaction

Function notifyCompaction

src/services/api/promptCacheBreakDetection.ts:689–698  ·  view source on GitHub ↗
(
  querySource: QuerySource,
  agentId?: AgentId,
)

Source from the content-addressed store, hash-verified

687 * will naturally drop on the next call — that's not a break.
688 */
689export function notifyCompaction(
690 querySource: QuerySource,
691 agentId?: AgentId,
692): void {
693 const key = getTrackingKey(querySource, agentId)
694 const state = key ? previousStateBySource.get(key) : undefined
695 if (state) {
696 state.prevCacheReadTokens = null
697 }
698}
699
700export function cleanupAgentTracking(agentId: AgentId): void {
701 previousStateBySource.delete(agentId)

Callers 4

callFunction · 0.85
compactConversationFunction · 0.85
autoCompactIfNeededFunction · 0.85

Calls 2

getTrackingKeyFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected