Skip to main content

codex/cli/
update.rs

1use crate::CliOverridesPatch;
2
3/// Request for `codex update`.
4#[derive(Clone, Debug, Eq, PartialEq)]
5pub struct UpdateCommandRequest {
6    /// Per-call CLI overrides layered on top of the builder.
7    pub overrides: CliOverridesPatch,
8}
9
10impl UpdateCommandRequest {
11    pub fn new() -> Self {
12        Self {
13            overrides: CliOverridesPatch::default(),
14        }
15    }
16
17    /// Replaces the default CLI overrides for this request.
18    pub fn with_overrides(mut self, overrides: CliOverridesPatch) -> Self {
19        self.overrides = overrides;
20        self
21    }
22}
23
24impl Default for UpdateCommandRequest {
25    fn default() -> Self {
26        Self::new()
27    }
28}