( requestedCount: number, availability: UndoAvailability, )
| 339 | } |
| 340 | |
| 341 | function formatUndoLimitMessage( |
| 342 | requestedCount: number, |
| 343 | availability: UndoAvailability, |
| 344 | ): string { |
| 345 | const reason = availability.stoppedAtCompaction ? ' after the last compaction' : ''; |
| 346 | const requested = formatPromptCount(requestedCount); |
| 347 | const max = formatPromptCount(availability.maxCount); |
| 348 | return `Cannot undo ${requested}; only ${max} can be undone in the active context${reason}.`; |
| 349 | } |
| 350 | |
| 351 | function formatNothingToUndoMessage(availability: UndoAvailability): string { |
| 352 | if (availability.stoppedAtCompaction) { |
no test coverage detected