MCPcopy
hub / github.com/Doorman11991/smallcode / _renderToolPanel

Method _renderToolPanel

src/tui/fullscreen.js:441–463  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

439 }
440
441 _renderToolPanel() {
442 if (this.toolWidth <= 0) return '';
443 let buf = '';
444 const col = this.chatWidth + 1;
445
446 // Divider
447 for (let i = 0; i < this.chatHeight; i++) {
448 buf += ANSI.moveTo(i + 1, col);
449 buf += this.theme.border + BOX.vertical + ANSI.reset;
450 }
451
452 // Tool log content
453 const startLine = Math.max(0, this.toolLines.length - this.chatHeight);
454 const visible = this.toolLines.slice(startLine, startLine + this.chatHeight);
455
456 for (let i = 0; i < this.chatHeight; i++) {
457 buf += ANSI.moveTo(i + 1, col + 1);
458 const line = visible[i] || '';
459 buf += this._truncate(line, this.toolWidth - 1);
460 }
461
462 return buf;
463 }
464
465 _renderInput() {
466 let buf = '';

Callers 1

renderMethod · 0.95

Calls 1

_truncateMethod · 0.95

Tested by

no test coverage detected