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

Method getActiveCodes

packages/pi-tui/src/utils.ts:563–581  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

561 }
562
563 getActiveCodes(): string {
564 const codes: string[] = [];
565 if (this.bold) codes.push("1");
566 if (this.dim) codes.push("2");
567 if (this.italic) codes.push("3");
568 if (this.underline) codes.push("4");
569 if (this.blink) codes.push("5");
570 if (this.inverse) codes.push("7");
571 if (this.hidden) codes.push("8");
572 if (this.strikethrough) codes.push("9");
573 if (this.fgColor) codes.push(this.fgColor);
574 if (this.bgColor) codes.push(this.bgColor);
575
576 let result = codes.length > 0 ? `\x1b[${codes.join(";")}m` : "";
577 if (this.activeHyperlink) {
578 result += formatOsc8Hyperlink(this.activeHyperlink);
579 }
580 return result;
581 }
582
583 hasActiveCodes(): boolean {
584 return (

Callers 4

wrapTextWithAnsiFunction · 0.95
wrapSingleLineFunction · 0.95
breakLongWordFunction · 0.80
extractSegmentsFunction · 0.80

Calls 2

formatOsc8HyperlinkFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected