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

Method getLineEndReset

packages/pi-tui/src/utils.ts:605–614  ·  view source on GitHub ↗

* Get reset codes for attributes that need to be turned off at line end. * Underline must be closed to prevent bleeding into padding. * Active OSC 8 hyperlinks must be closed and re-opened on the next line. * Returns empty string if no attributes need closing.

()

Source from the content-addressed store, hash-verified

603 * Returns empty string if no attributes need closing.
604 */
605 getLineEndReset(): string {
606 let result = "";
607 if (this.underline) {
608 result += "\x1b[24m"; // Underline off only
609 }
610 if (this.activeHyperlink) {
611 result += formatOsc8Close(this.activeHyperlink.terminator); // Re-opened at line start via getActiveCodes()
612 }
613 return result;
614 }
615}
616
617function updateTrackerFromText(text: string, tracker: AnsiCodeTracker): void {

Callers 2

wrapSingleLineFunction · 0.95
breakLongWordFunction · 0.80

Calls 1

formatOsc8CloseFunction · 0.85

Tested by

no test coverage detected