feat: make it possible to set disable_response_storage = true in config.toml (#714)
https://github.com/openai/codex/pull/642 introduced support for the `--disable-response-storage` flag, but if you are a ZDR customer, it is tedious to set this every time, so this PR makes it possible to set this once in `config.toml` and be done with it. Incidentally, this tidies things up such that now `init_codex()` takes only one parameter: `Config`.
This commit is contained in:
@@ -56,10 +56,14 @@ pub async fn run_main(cli: Cli) -> anyhow::Result<()> {
|
||||
// the user for approval.
|
||||
approval_policy: Some(AskForApproval::Never),
|
||||
sandbox_policy: sandbox_policy.map(Into::into),
|
||||
disable_response_storage: if disable_response_storage {
|
||||
Some(true)
|
||||
} else {
|
||||
None
|
||||
},
|
||||
};
|
||||
let config = Config::load_with_overrides(overrides)?;
|
||||
let (codex_wrapper, event, ctrl_c) =
|
||||
codex_wrapper::init_codex(config, disable_response_storage).await?;
|
||||
let (codex_wrapper, event, ctrl_c) = codex_wrapper::init_codex(config).await?;
|
||||
let codex = Arc::new(codex_wrapper);
|
||||
info!("Codex initialized with event: {event:?}");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user