MCPcopy Create free account
hub / github.com/diillson/chatcli / VisibleLen

Function VisibleLen

cli/agent/ui_renderer.go:534–536  ·  view source on GitHub ↗

VisibleLen calcula comprimento visível em colunas do terminal (sem ANSI codes). Delegates to lipgloss.Width — the same function the bordered box renderer uses to size top/bottom borders. Sharing one measurement path is what keeps wrap math and border math in agreement when the content has emoji pre

(s string)

Source from the content-addressed store, hash-verified

532// drift the right border outside the visible box; routing both sides
533// through lipgloss.Width removes the disagreement entirely.
534func VisibleLen(s string) int {
535 return lipgloss.Width(s)
536}
537
538// RenderTimelineEvent desenha um "card" estilizado com:
539// - cabeçalho `╭── icon title ─────╮` que se estende até a largura do conteúdo,

Callers 15

visibleLenTestFunction · 0.85
StreamOutputMethod · 0.85
wrapStreamLineFunction · 0.85
trimBlankBorderRowsFunction · 0.85
wrapTextFunction · 0.85
wrapStructuredFunction · 0.85
RenderBatchHeaderMethod · 0.85
RenderStreamBoxStartMethod · 0.85

Calls

no outgoing calls