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 869c3c1 commit bc976aaCopy full SHA for bc976aa
crates/chat-cli/src/cli/agent/context_migrate.rs
@@ -213,7 +213,19 @@ impl ContextMigrate<'c'> {
213
os.fs.create_dir_all(&global_agent_path).await?;
214
}
215
216
- for agent in &new_agents {
+ let formatted_server_list = mcp_servers
217
+ .map(|config| {
218
+ config
219
+ .mcp_servers
220
+ .keys()
221
+ .map(|server_name| format!("@{server_name}"))
222
+ .collect::<Vec<_>>()
223
+ })
224
+ .unwrap_or_default();
225
+
226
+ for agent in &mut new_agents {
227
+ agent.tools.extend(formatted_server_list.clone());
228
229
let content = serde_json::to_string_pretty(agent)?;
230
if let Some(path) = agent.path.as_ref() {
231
info!("Agent {} peristed in path {}", agent.name, path.to_string_lossy());
0 commit comments