MCPcopy
hub / github.com/di-sukharev/opencommit / render

Method render

out/cli.cjs:445–471  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

443 this.output.write(import_sisteransi.cursor.move(-999, u3 * -1));
444 }
445 render() {
446 const u3 = R4(this._render(this) ?? "", process.stdout.columns, { hard: true });
447 if (u3 !== this._prevFrame) {
448 if (this.state === "initial") this.output.write(import_sisteransi.cursor.hide);
449 else {
450 const F5 = aD2(this._prevFrame, u3);
451 if (this.restoreCursor(), F5 && F5?.length === 1) {
452 const e3 = F5[0];
453 this.output.write(import_sisteransi.cursor.move(0, e3)), this.output.write(import_sisteransi.erase.lines(1));
454 const s2 = u3.split(`
455`);
456 this.output.write(s2[e3]), this._prevFrame = u3, this.output.write(import_sisteransi.cursor.move(0, s2.length - e3 - 1));
457 return;
458 } else if (F5 && F5?.length > 1) {
459 const e3 = F5[0];
460 this.output.write(import_sisteransi.cursor.move(0, e3)), this.output.write(import_sisteransi.erase.down());
461 const s2 = u3.split(`
462`).slice(e3);
463 this.output.write(s2.join(`
464`)), this._prevFrame = u3;
465 return;
466 }
467 this.output.write(import_sisteransi.erase.down());
468 }
469 this.output.write(u3), this.state === "initial" && (this.state = "active"), this._prevFrame = u3;
470 }
471 }
472 };
473 xD2 = class extends x3 {
474 get cursor() {

Callers 5

promptMethod · 0.80
onKeypressMethod · 0.80
sectionMethod · 0.80
tableMethod · 0.80
x2Function · 0.80

Calls 5

R4Function · 0.85
aD2Function · 0.85
restoreCursorMethod · 0.80
writeMethod · 0.45
sliceMethod · 0.45

Tested by

no test coverage detected