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

Function uiTermWidth

cli/ui_boxes.go:15–21  ·  view source on GitHub ↗

─── Terminal Box Helpers ────────────────────────────────────── Shared UI functions for rendering consistent boxed output across /mcp, /hooks, /cost, /channel, /worktree, etc.

()

Source from the content-addressed store, hash-verified

13// across /mcp, /hooks, /cost, /channel, /worktree, etc.
14
15func uiTermWidth() int {
16 w, _, err := term.GetSize(int(os.Stdout.Fd())) //#nosec G115 -- value bounded by domain
17 if err != nil || w <= 0 {
18 return 80
19 }
20 return w
21}
22
23// uiBox renders a box header: ╭── icon TITLE
24func uiBox(icon, title, color string) string {

Callers 1

uiBoxEndFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected