MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / setProgress

Method setProgress

packages/pi-tui/src/terminal.ts:509–523  ·  view source on GitHub ↗
(active: boolean)

Source from the content-addressed store, hash-verified

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;

Callers

nothing calls this directly

Calls 2

clearProgressIntervalMethod · 0.95
writeMethod · 0.65

Tested by

no test coverage detected