(active: boolean)
| 507 | } |
| 508 | |
| 509 | setProgress(active: boolean): void { |
| 510 | if (active) { |
| 511 | // OSC 9;4;3 - indeterminate progress |
| 512 | process.stdout.write(TERMINAL_PROGRESS_ACTIVE_SEQUENCE); |
| 513 | if (!this.progressInterval) { |
| 514 | this.progressInterval = setInterval(() => { |
| 515 | process.stdout.write(TERMINAL_PROGRESS_ACTIVE_SEQUENCE); |
| 516 | }, TERMINAL_PROGRESS_KEEPALIVE_MS); |
| 517 | } |
| 518 | } else { |
| 519 | this.clearProgressInterval(); |
| 520 | // OSC 9;4;0 - clear progress |
| 521 | process.stdout.write(TERMINAL_PROGRESS_CLEAR_SEQUENCE); |
| 522 | } |
| 523 | } |
| 524 | |
| 525 | private clearProgressInterval(): boolean { |
| 526 | if (!this.progressInterval) return false; |
nothing calls this directly
no test coverage detected