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).
()
| 1124 | // background MCP servers are being connected. Empty when nothing's in |
| 1125 | // flight (the View() switch checks mcpLoading before calling). |
| 1126 | func (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 | |
| 1141 | func plural(n int) string { |
| 1142 | if n == 1 { |