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

Function recent

packages/opencode/src/cli/cmd/run/subagent-data.ts:237–240  ·  view source on GitHub ↗
(input: Iterable<T>, limit: number)

Source from the content-addressed store, hash-verified

235}
236
237function recent<T>(input: Iterable<T>, limit: number) {
238 const list = [...input]
239 return list.slice(Math.max(0, list.length - limit))
240}
241
242function copyMap<K, V>(source: Map<K, V>, keep: Set<K>) {
243 const out = new Map<K, V>()

Callers 4

compactCallMapFunction · 0.70
compactEchoMapFunction · 0.70
compactIDsFunction · 0.70
compactDetailFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected