save session metadata

This commit is contained in:
Ryan Ragona
2025-04-26 14:25:26 -07:00
parent e782378176
commit 96d8d2a37a
15 changed files with 211 additions and 26 deletions

View File

@@ -26,3 +26,6 @@ tokio = { version = "1", features = [
] }
tracing = { version = "0.1.41", features = ["log"] }
tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }
# For serialising the `Cli` struct into the on-disk session metadata.
serde = { version = "1.0", features = ["derive"] }

View File

@@ -2,10 +2,16 @@ use clap::ArgAction;
use clap::Parser;
use codex_core::ApprovalModeCliArg;
use codex_core::SandboxModeCliArg;
use serde::{Deserialize, Serialize};
use std::path::PathBuf;
/// Commandline arguments.
#[derive(Debug, Parser)]
/// Command-line interface for the interactive `codex-repl` agent.
///
/// Making the struct serialisable allows us to persist the full configuration
/// inside the session metadata so we can inspect the exact flags that were
/// used to launch the session at a later time.
#[derive(Debug, Parser, Clone, Serialize, Deserialize)]
#[command(
author,
version,