mirror of
https://github.com/openai/codex.git
synced 2026-09-04 15:08:45 +00:00
Serialize plugin install requests (#32894)
## What changed - Mark `request_plugin_install` as not supporting parallel tool calls so install requests execute serially. - Add a unit test covering the handler's parallel-call capability. GitOrigin-RevId: 5f2c8184562bd776b0e527e5e258c61c604a0910
This commit is contained in:
@@ -79,7 +79,7 @@ impl ToolExecutor<ToolInvocation> for RequestPluginInstallHandler {
|
||||
}
|
||||
|
||||
fn supports_parallel_tool_calls(&self) -> bool {
|
||||
true
|
||||
false
|
||||
}
|
||||
|
||||
fn handle(&self, invocation: ToolInvocation) -> codex_tools::ToolExecutorFuture<'_> {
|
||||
|
||||
@@ -21,6 +21,16 @@ use rmcp::model::ElicitationAction;
|
||||
use serde_json::json;
|
||||
use tempfile::tempdir;
|
||||
|
||||
#[test]
|
||||
fn request_plugin_install_does_not_support_parallel_tool_calls() {
|
||||
let handler = RequestPluginInstallHandler::new(
|
||||
Vec::new(),
|
||||
ToolSuggestPresentation::RecommendationContext,
|
||||
);
|
||||
|
||||
assert!(!handler.supports_parallel_tool_calls());
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn verified_plugin_install_completed_requires_installed_plugin() {
|
||||
let codex_home = tempdir().expect("tempdir should succeed");
|
||||
|
||||
Reference in New Issue
Block a user