resolveMCPConfigPath returns the path chatcli should consult for MCP server configuration: the explicit `CHATCLI_MCP_CONFIG` override when set, otherwise the conventional `~/.chatcli/mcp_servers.json`. Extracted so tests can drive the auto-enable decision without stomping on the real user environmen
()
| 1620 | // Extracted so tests can drive the auto-enable decision without |
| 1621 | // stomping on the real user environment. |
| 1622 | func resolveMCPConfigPath() string { |
| 1623 | if p := os.Getenv("CHATCLI_MCP_CONFIG"); p != "" { |
| 1624 | return p |
| 1625 | } |
| 1626 | return mcp.DefaultConfigPath() |
| 1627 | } |
| 1628 | |
| 1629 | // shouldAutoEnableMCP returns true when MCP should be initialized |
| 1630 | // automatically (i.e., without `CHATCLI_MCP_ENABLED=true`). It says |