MCPcopy Create free account
hub / github.com/freecodexyz/free-code / getToolResultsToDelete

Function getToolResultsToDelete

src/services/compact/cachedMicrocompact.ts:62–71  ·  view source on GitHub ↗
(state: CachedMCState)

Source from the content-addressed store, hash-verified

60): void {}
61
62export function getToolResultsToDelete(state: CachedMCState): string[] {
63 const config = getCachedMCConfig()
64 const activeRefs = state.toolOrder.filter(id => !state.deletedRefs.has(id))
65
66 if (!config.enabled || activeRefs.length < config.triggerThreshold) {
67 return []
68 }
69
70 return activeRefs.slice(0, Math.max(0, activeRefs.length - config.keepRecent))
71}
72
73export function createCacheEditsBlock(
74 state: CachedMCState,

Callers

nothing calls this directly

Calls 3

getCachedMCConfigFunction · 0.85
maxMethod · 0.80
hasMethod · 0.45

Tested by

no test coverage detected