MCPcopy Create free account
hub / github.com/anomalyco/opencode / compactEchoMap

Function compactEchoMap

packages/opencode/src/cli/cmd/run/subagent-data.ts:518–521  ·  view source on GitHub ↗
(data: SessionData, messageIDs: Set<string>)

Source from the content-addressed store, hash-verified

516}
517
518function compactEchoMap(data: SessionData, messageIDs: Set<string>) {
519 const keys = new Set([...messageIDs, ...recent(data.echo.keys(), SUBAGENT_ECHO_LIMIT)])
520 return copyMap(data.echo, keys)
521}
522
523function compactIDs(detail: DetailState) {
524 return new Set(recent(detail.data.ids, SUBAGENT_COMMIT_LIMIT + SUBAGENT_ERROR_LIMIT))

Callers 1

compactDetailFunction · 0.85

Calls 2

copyMapFunction · 0.85
recentFunction · 0.70

Tested by

no test coverage detected