mirror of
https://github.com/openai/codex.git
synced 2026-05-05 05:42:33 +03:00
feedback
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
use codex_core::spawn::CODEX_SANDBOX_NETWORK_DISABLED_ENV_VAR;
|
||||
use codex_mcp_server::CodexToolCallParam;
|
||||
use mcp_types::JSONRPCResponse;
|
||||
use mcp_types::ModelContextProtocolNotification;
|
||||
use mcp_types::RequestId;
|
||||
use serde_json::json;
|
||||
use tempfile::TempDir;
|
||||
@@ -94,7 +95,7 @@ async fn shell_command_interruption() -> anyhow::Result<()> {
|
||||
// Send interrupt notification
|
||||
mcp_process
|
||||
.send_notification(
|
||||
"notifications/cancelled",
|
||||
mcp_types::CancelledNotification::METHOD,
|
||||
Some(json!({ "requestId": codex_request_id })),
|
||||
)
|
||||
.await?;
|
||||
@@ -125,7 +126,7 @@ async fn shell_command_interruption() -> anyhow::Result<()> {
|
||||
// Send interrupt notification
|
||||
mcp_process
|
||||
.send_notification(
|
||||
"notifications/cancelled",
|
||||
mcp_types::CancelledNotification::METHOD,
|
||||
Some(json!({ "requestId": codex_reply_request_id })),
|
||||
)
|
||||
.await?;
|
||||
@@ -148,4 +149,4 @@ async fn shell_command_interruption() -> anyhow::Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
// Helpers are provided by tests/common
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ use mcp_test_support::create_config_toml;
|
||||
use mcp_test_support::create_final_assistant_message_sse_response;
|
||||
use mcp_test_support::create_mock_chat_completions_server;
|
||||
use mcp_types::JSONRPCNotification;
|
||||
use mcp_types::ModelContextProtocolNotification;
|
||||
use pretty_assertions::assert_eq;
|
||||
use serde_json::json;
|
||||
use tempfile::TempDir;
|
||||
@@ -181,7 +182,7 @@ async fn test_cancel_stream_then_reconnect_catches_up_initial_state() {
|
||||
|
||||
// Cancel stream A
|
||||
mcp.send_notification(
|
||||
"notifications/cancelled",
|
||||
mcp_types::CancelledNotification::METHOD,
|
||||
Some(json!({ "requestId": stream_a_id })),
|
||||
)
|
||||
.await
|
||||
@@ -245,7 +246,6 @@ async fn test_cancel_stream_then_reconnect_catches_up_initial_state() {
|
||||
}),
|
||||
];
|
||||
assert_eq!(*events, expected);
|
||||
drop(server);
|
||||
}
|
||||
|
||||
// create_config_toml is provided by tests/common
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user