mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
feat: add name to beta features (#8266)
Add a name to Beta features <img width="906" height="153" alt="Screenshot 2025-12-18 at 16 42 49" src="https://github.com/user-attachments/assets/d56f3519-0613-4d9a-ad4d-38b1a7eb125a" />
This commit is contained in:
@@ -19,6 +19,7 @@ pub(crate) use legacy::LegacyFeatureToggles;
|
||||
pub enum Stage {
|
||||
Experimental,
|
||||
Beta {
|
||||
name: &'static str,
|
||||
menu_description: &'static str,
|
||||
announcement: &'static str,
|
||||
},
|
||||
@@ -28,6 +29,13 @@ pub enum Stage {
|
||||
}
|
||||
|
||||
impl Stage {
|
||||
pub fn beta_menu_name(self) -> Option<&'static str> {
|
||||
match self {
|
||||
Stage::Beta { name, .. } => Some(name),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn beta_menu_description(self) -> Option<&'static str> {
|
||||
match self {
|
||||
Stage::Beta {
|
||||
@@ -324,6 +332,7 @@ pub const FEATURES: &[FeatureSpec] = &[
|
||||
id: Feature::UnifiedExec,
|
||||
key: "unified_exec",
|
||||
stage: Stage::Beta {
|
||||
name: "Background terminal",
|
||||
menu_description: "Run long-running terminal commands in the background.",
|
||||
announcement: "NEW! Try Background terminals for long running processes. Enable in /experimental!",
|
||||
},
|
||||
@@ -333,6 +342,7 @@ pub const FEATURES: &[FeatureSpec] = &[
|
||||
id: Feature::ShellSnapshot,
|
||||
key: "shell_snapshot",
|
||||
stage: Stage::Beta {
|
||||
name: "Shell snapshot",
|
||||
menu_description: "Snapshot your shell environment to avoid re-running login scripts for every command.",
|
||||
announcement: "NEW! Try shell snapshotting to make your Codex faster. Enable in /experimental!",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user