mirror of
https://github.com/openai/codex.git
synced 2026-04-24 14:45:27 +00:00
core: scaffold state module with SessionState/ActiveTurn/TurnState and wire into lib
This commit is contained in:
@@ -75,6 +75,7 @@ pub use rollout::find_conversation_path_by_id_str;
|
||||
pub use rollout::list::ConversationItem;
|
||||
pub use rollout::list::ConversationsPage;
|
||||
pub use rollout::list::Cursor;
|
||||
mod state;
|
||||
mod user_notification;
|
||||
pub mod util;
|
||||
|
||||
|
||||
9
codex-rs/core/src/state/mod.rs
Normal file
9
codex-rs/core/src/state/mod.rs
Normal file
@@ -0,0 +1,9 @@
|
||||
//! Session/turn state module scaffolding.
|
||||
//!
|
||||
//! This module will encapsulate all mutable state for a Codex session.
|
||||
//! It starts with lightweight placeholders to enable incremental refactors
|
||||
//! without changing behaviour.
|
||||
|
||||
mod session;
|
||||
mod turn;
|
||||
|
||||
12
codex-rs/core/src/state/session.rs
Normal file
12
codex-rs/core/src/state/session.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
//! Session-wide mutable state scaffolding.
|
||||
|
||||
/// Placeholder for session-persistent state.
|
||||
#[derive(Debug, Default)]
|
||||
pub(crate) struct SessionState;
|
||||
|
||||
impl SessionState {
|
||||
/// Create a new, empty session state.
|
||||
pub(crate) fn new() -> Self {
|
||||
Self
|
||||
}
|
||||
}
|
||||
9
codex-rs/core/src/state/turn.rs
Normal file
9
codex-rs/core/src/state/turn.rs
Normal file
@@ -0,0 +1,9 @@
|
||||
//! Turn-scoped state and active turn metadata scaffolding.
|
||||
|
||||
/// Metadata about the currently running turn.
|
||||
#[derive(Debug, Default)]
|
||||
pub(crate) struct ActiveTurn;
|
||||
|
||||
/// Mutable state for a single turn.
|
||||
#[derive(Debug, Default)]
|
||||
pub(crate) struct TurnState;
|
||||
Reference in New Issue
Block a user