MCPcopy Create free account
hub / github.com/betta-tech/byo-coding-agent / mcpStatusText

Method mcpStatusText

internal/ui/program.go:1126–1139  ·  view source on GitHub ↗

mcpStatusText formats the loading line shown next to the spinner while background MCP servers are being connected. Empty when nothing's in flight (the View() switch checks mcpLoading before calling).

()

Source from the content-addressed store, hash-verified

1124// background MCP servers are being connected. Empty when nothing's in
1125// flight (the View() switch checks mcpLoading before calling).
1126func (m harness) mcpStatusText() string {
1127 var msg string
1128 if m.mcpCurrent != "" {
1129 msg = fmt.Sprintf("connecting MCP: %s (%d/%d)", m.mcpCurrent, m.mcpDone+1, m.mcpTotal)
1130 } else if m.mcpDone < m.mcpTotal {
1131 msg = fmt.Sprintf("connecting MCP (%d/%d)", m.mcpDone, m.mcpTotal)
1132 } else {
1133 msg = fmt.Sprintf("MCP ready (%d server%s)", m.mcpDone-m.mcpFailed, plural(m.mcpDone-m.mcpFailed))
1134 }
1135 if m.mcpFailed > 0 {
1136 msg += fmt.Sprintf(" · %d failed", m.mcpFailed)
1137 }
1138 return msg
1139}
1140
1141func plural(n int) string {
1142 if n == 1 {

Callers 1

inputAreaMethod · 0.95

Calls 1

pluralFunction · 0.85

Tested by

no test coverage detected