(state: SessionState)
| 16 | } |
| 17 | |
| 18 | export 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 | |
| 29 | export function attachCompressionDuration( |
| 30 | messagesState: PruneMessagesState, |