fix: introduce codex-protocol crate (#2355)

This commit is contained in:
Michael Bolin
2025-08-15 12:44:40 -07:00
committed by GitHub
parent 7c26c8e091
commit d262244725
23 changed files with 244 additions and 43 deletions

View File

@@ -33,6 +33,7 @@ codex-common = { path = "../common", features = [
"sandbox_summary",
] }
codex-core = { path = "../core" }
codex-protocol = { path = "../protocol" }
codex-file-search = { path = "../file-search" }
codex-login = { path = "../login" }
codex-ollama = { path = "../ollama" }

View File

@@ -3,7 +3,6 @@ use std::path::PathBuf;
use std::sync::Arc;
use codex_core::config::Config;
use codex_core::parse_command::ParsedCommand;
use codex_core::protocol::AgentMessageDeltaEvent;
use codex_core::protocol::AgentMessageEvent;
use codex_core::protocol::AgentReasoningDeltaEvent;
@@ -26,6 +25,7 @@ use codex_core::protocol::PatchApplyBeginEvent;
use codex_core::protocol::TaskCompleteEvent;
use codex_core::protocol::TokenUsage;
use codex_core::protocol::TurnDiffEvent;
use codex_protocol::parse_command::ParsedCommand;
use crossterm::event::KeyEvent;
use crossterm::event::KeyEventKind;
use ratatui::buffer::Buffer;

View File

@@ -204,9 +204,12 @@ fn exec_history_cell_shows_working_then_completed() {
call_id: "call-1".into(),
command: vec!["bash".into(), "-lc".into(), "echo done".into()],
cwd: std::env::current_dir().unwrap_or_else(|_| PathBuf::from(".")),
parsed_cmd: vec![codex_core::parse_command::ParsedCommand::Unknown {
cmd: "echo done".into(),
}],
parsed_cmd: vec![
codex_core::parse_command::ParsedCommand::Unknown {
cmd: "echo done".into(),
}
.into(),
],
}),
});
@@ -246,9 +249,12 @@ fn exec_history_cell_shows_working_then_failed() {
call_id: "call-2".into(),
command: vec!["bash".into(), "-lc".into(), "false".into()],
cwd: std::env::current_dir().unwrap_or_else(|_| PathBuf::from(".")),
parsed_cmd: vec![codex_core::parse_command::ParsedCommand::Unknown {
cmd: "false".into(),
}],
parsed_cmd: vec![
codex_core::parse_command::ParsedCommand::Unknown {
cmd: "false".into(),
}
.into(),
],
}),
});

View File

@@ -9,7 +9,6 @@ use codex_ansi_escape::ansi_escape_line;
use codex_common::create_config_summary_entries;
use codex_common::elapsed::format_duration;
use codex_core::config::Config;
use codex_core::parse_command::ParsedCommand;
use codex_core::plan_tool::PlanItemArg;
use codex_core::plan_tool::StepStatus;
use codex_core::plan_tool::UpdatePlanArgs;
@@ -20,6 +19,7 @@ use codex_core::protocol::SessionConfiguredEvent;
use codex_core::protocol::TokenUsage;
use codex_login::get_auth_file;
use codex_login::try_read_auth_json;
use codex_protocol::parse_command::ParsedCommand;
use image::DynamicImage;
use image::ImageReader;
use mcp_types::EmbeddedResourceResource;