nextCopilotPollDelay function

Duration nextCopilotPollDelay(
  1. Duration current, {
  2. required bool slowDown,
})

The next poll wait: current, plus the 5s slow_down penalty when the server said slow_down (the penalty is cumulative — every slow_down grows the wait by another 5s).

Implementation

Duration nextCopilotPollDelay(Duration current, {required bool slowDown}) =>
    slowDown ? current + _slowDownPenalty : current;