mirror of
https://github.com/openai/codex.git
synced 2026-11-03 16:23:51 +00:00
feat: use latest disk value for mcp servers status (#7907)
### Summary Instead of stale in memory config value for listing mcp server statuses, we pull the latest disk value.
This commit is contained in:
1 parent
9e91e49edb
commit
163a7e317e
1 file changed
+10
-3
@@ -2079,12 +2079,19 @@ impl CodexMessageProcessor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fn list_mcp_servers(&self, request_id: RequestId, params: ListMcpServersParams) {
|
async fn list_mcp_servers(&self, request_id: RequestId, params: ListMcpServersParams) {
|
||||||
let snapshot = collect_mcp_snapshot(self.config.as_ref()).await;
|
let config = match self.load_latest_config().await {
|
||||||
|
Ok(config) => config,
|
||||||
|
Err(error) => {
|
||||||
|
self.outgoing.send_error(request_id, error).await;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
let snapshot = collect_mcp_snapshot(&config).await;
|
||||||
|
|
||||||
let tools_by_server = group_tools_by_server(&snapshot.tools);
|
let tools_by_server = group_tools_by_server(&snapshot.tools);
|
||||||
|
|
||||||
let mut server_names: Vec<String> = self
|
let mut server_names: Vec<String> = config
|
||||||
.config
|
|
||||||
.mcp_servers
|
.mcp_servers
|
||||||
.keys()
|
.keys()
|
||||||
.cloned()
|
.cloned()
|
||||||
|
|||||||
Reference in new issue
Block a user