MCPcopy Create free account
hub / github.com/codehamr/codehamr / backendLabel

Function backendLabel

internal/tui/format.go:62–67  ·  view source on GitHub ↗

backendLabel renders the connection signal. Connected: profile name, bold, no colour. Disconnected: bold yellow plus a `!` marker, so the state stays legible on colour-stripped terminals.

(c *config.Config, connected bool)

Source from the content-addressed store, hash-verified

60// no colour. Disconnected: bold yellow plus a `!` marker, so the state stays
61// legible on colour-stripped terminals.
62func backendLabel(c *config.Config, connected bool) string {
63 if connected {
64 return styleBackendOK.Render(c.Active)
65 }
66 return styleBackendWarn.Render(c.Active + " !")
67}
68
69// humanInt formats a non-negative integer with commas so a context window
70// like 262144 reads as "262,144" rather than a wall of digits.

Calls

no outgoing calls