mirror of
https://github.com/openai/codex.git
synced 2026-11-24 23:20:47 +00:00
This PR replicates the `tui` code directory and creates a temporary parallel `tui_app_server` directory. It also implements a new feature flag `tui_app_server` to select between the two tui implementations. Once the new app-server-based TUI is stabilized, we'll delete the old `tui` directory and feature flag.
17 lines
344 B
Rust
17 lines
344 B
Rust
pub(crate) struct SessionHeader {
|
|
model: String,
|
|
}
|
|
|
|
impl SessionHeader {
|
|
pub(crate) fn new(model: String) -> Self {
|
|
Self { model }
|
|
}
|
|
|
|
/// Updates the header's model text.
|
|
pub(crate) fn set_model(&mut self, model: &str) {
|
|
if self.model != model {
|
|
self.model = model.to_string();
|
|
}
|
|
}
|
|
}
|