mirror of
https://github.com/openai/codex.git
synced 2026-04-28 02:11:08 +03:00
fmt
This commit is contained in:
@@ -8,16 +8,16 @@ use codex_core::protocol::AgentMessageEvent;
|
||||
use codex_core::protocol::ApplyPatchApprovalRequestEvent;
|
||||
use codex_core::protocol::Event;
|
||||
use codex_core::protocol::EventMsg;
|
||||
use codex_core::protocol::InputItem;
|
||||
use codex_core::protocol::Op;
|
||||
use codex_core::protocol::ExecApprovalRequestEvent;
|
||||
use codex_core::protocol::FileChange;
|
||||
use codex_core::protocol::InputItem;
|
||||
use codex_core::protocol::Op;
|
||||
use mcp_types::RequestId;
|
||||
use tokio::sync::Mutex;
|
||||
// no streaming watch channel; streaming is toggled via set_streaming on the struct
|
||||
use tokio_util::sync::CancellationToken;
|
||||
use tracing::error;
|
||||
use uuid::Uuid;
|
||||
use tokio_util::sync::CancellationToken;
|
||||
|
||||
use crate::exec_approval::handle_exec_approval_request;
|
||||
use crate::mcp_protocol::CodexEventNotificationParams;
|
||||
@@ -98,10 +98,7 @@ impl Conversation {
|
||||
items: Vec<InputItem>,
|
||||
) -> CodexResult<()> {
|
||||
let _ = request_id; // request_id is not used to enforce uniqueness; Codex generates ids.
|
||||
self.codex
|
||||
.submit(Op::UserInput { items })
|
||||
.await
|
||||
.map(|_| ())
|
||||
self.codex.submit(Op::UserInput { items }).await.map(|_| ())
|
||||
}
|
||||
|
||||
async fn handle_event(&self, event: Event) {
|
||||
|
||||
@@ -23,8 +23,8 @@ mod json_to_toml;
|
||||
pub mod mcp_protocol;
|
||||
pub(crate) mod message_processor;
|
||||
mod outgoing_message;
|
||||
mod request_id;
|
||||
mod patch_approval;
|
||||
mod request_id;
|
||||
pub(crate) mod tool_handlers;
|
||||
|
||||
use crate::message_processor::MessageProcessor;
|
||||
|
||||
@@ -678,10 +678,7 @@ impl MessageProcessor {
|
||||
}
|
||||
};
|
||||
|
||||
if let Err(e) = codex_arc
|
||||
.submit(codex_core::protocol::Op::Interrupt)
|
||||
.await
|
||||
{
|
||||
if let Err(e) = codex_arc.submit(codex_core::protocol::Op::Interrupt).await {
|
||||
tracing::error!("Failed to submit interrupt to Codex: {e}");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -62,7 +62,9 @@ pub(crate) async fn handle_send_message(
|
||||
.send_response_with_optional_error(
|
||||
id,
|
||||
Some(ToolCallResponseResult::ConversationSendMessage(
|
||||
ConversationSendMessageResult::Error { message: e.to_string() },
|
||||
ConversationSendMessageResult::Error {
|
||||
message: e.to_string(),
|
||||
},
|
||||
)),
|
||||
Some(true),
|
||||
)
|
||||
|
||||
@@ -148,5 +148,3 @@ async fn shell_command_interruption() -> anyhow::Result<()> {
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user