Use then_some for Notes metadata in the multi-environment MCP test (#64823)

GitOrigin-RevId: 8fab548c5c06ec5b0f005872f0b98d6c2d93fcbd
This commit is contained in:
ioanbudea-OAI
2026-11-30 22:53:09 +00:00
committed by copyberry
parent 3496c2f99c
commit 6b599f7a8e
@@ -41,7 +41,8 @@ impl codex_extension_api::ToolLifecycleContributor for NotesMetadata {
_turn: &codex_extension_api::ExtensionData,
tool: &codex_extension_api::McpToolContext,
) -> Option<(&'static str, Value)> {
(tool.plugin_id.as_deref() == Some("env-a:notes")).then(|| ("x-notes-preview", json!(true)))
(tool.plugin_id.as_deref() == Some("env-a:notes"))
.then_some(("x-notes-preview", json!(true)))
}
fn on_mcp_tool_result<'a>(