mcpServerExists returns true when the named server is currently configured (either running or stopped-but-known). Used to give a crisp "unknown server" message instead of a confusing pass-through.
(name string)
| 358 | // configured (either running or stopped-but-known). Used to give a |
| 359 | // crisp "unknown server" message instead of a confusing pass-through. |
| 360 | func (cli *ChatCLI) mcpServerExists(name string) bool { |
| 361 | for _, s := range cli.mcpManager.GetServerStatus() { |
| 362 | if s.Name == name { |
| 363 | return true |
| 364 | } |
| 365 | } |
| 366 | return false |
| 367 | } |
| 368 | |
| 369 | // getMCPSuggestions powers /mcp completion. Two completion phases: |
| 370 | // |
no test coverage detected