We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c692aa commit 8aacf67Copy full SHA for 8aacf67
crates/chat-cli/src/cli/mcp.rs
@@ -152,6 +152,10 @@ impl AddArgs {
152
Some(Scope::Workspace) => directories::chat_legacy_workspace_mcp_config(os)?,
153
_ => directories::chat_legacy_global_mcp_config(os)?,
154
};
155
+ if !legacy_mcp_config_path.exists() {
156
+ // Create an empty config file that won't fail to deserialize.
157
+ os.fs.write(&legacy_mcp_config_path, "{ \"mcpServers\": {} }").await?;
158
+ }
159
let mut mcp_servers = McpServerConfig::load_from_file(os, &legacy_mcp_config_path).await?;
160
161
if mcp_servers.mcp_servers.contains_key(&self.name) && !self.force {
0 commit comments