mirror of
https://github.com/openai/codex.git
synced 2026-09-20 12:47:38 +00:00
feat: add ZDR support to Rust implementation
This commit is contained in:
@@ -16,6 +16,10 @@ pub struct Cli {
|
||||
#[arg(long = "skip-git-repo-check", default_value_t = false)]
|
||||
pub skip_git_repo_check: bool,
|
||||
|
||||
/// Disable server‑side response storage (sends the full conversation context with every request)
|
||||
#[arg(long = "disable-response-storage", default_value_t = false)]
|
||||
pub disable_response_storage: bool,
|
||||
|
||||
/// Initial instructions for the agent.
|
||||
pub prompt: Option<String>,
|
||||
}
|
||||
|
||||
@@ -31,9 +31,10 @@ pub async fn run_main(cli: Cli) -> anyhow::Result<()> {
|
||||
.try_init();
|
||||
|
||||
let Cli {
|
||||
skip_git_repo_check,
|
||||
model,
|
||||
images,
|
||||
model,
|
||||
skip_git_repo_check,
|
||||
disable_response_storage,
|
||||
prompt,
|
||||
..
|
||||
} = cli;
|
||||
@@ -50,8 +51,13 @@ pub async fn run_main(cli: Cli) -> anyhow::Result<()> {
|
||||
// likely come from a new --execution-policy arg.
|
||||
let approval_policy = AskForApproval::Never;
|
||||
let sandbox_policy = SandboxPolicy::NetworkAndFileWriteRestricted;
|
||||
let (codex_wrapper, event, ctrl_c) =
|
||||
codex_wrapper::init_codex(approval_policy, sandbox_policy, model).await?;
|
||||
let (codex_wrapper, event, ctrl_c) = codex_wrapper::init_codex(
|
||||
approval_policy,
|
||||
sandbox_policy,
|
||||
disable_response_storage,
|
||||
model,
|
||||
)
|
||||
.await?;
|
||||
let codex = Arc::new(codex_wrapper);
|
||||
info!("Codex initialized with event: {event:?}");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user