MCPcopy Index your code
hub / github.com/Opencode-DCP/opencode-dynamic-context-pruning / allocateRunId

Function allocateRunId

lib/compress/state.ts:18–27  ·  view source on GitHub ↗
(state: SessionState)

Source from the content-addressed store, hash-verified

16}
17
18export function allocateRunId(state: SessionState): number {
19 const next = state.prune.messages.nextRunId
20 if (!Number.isInteger(next) || next < 1) {
21 state.prune.messages.nextRunId = 2
22 return 1
23 }
24
25 state.prune.messages.nextRunId = next + 1
26 return next
27}
28
29export function attachCompressionDuration(
30 messagesState: PruneMessagesState,

Callers 2

executeFunction · 0.90
executeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected