mirror of
https://github.com/openai/codex.git
synced 2026-04-28 18:32:04 +03:00
Add stage field for experimental flags. (#10793)
- [x] Add stage field for experimental flags.
This commit is contained in:
@@ -1055,18 +1055,39 @@ pub struct ExperimentalFeatureListParams {
|
||||
pub limit: Option<u32>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub enum ExperimentalFeatureStage {
|
||||
/// Feature is available for user testing and feedback.
|
||||
Beta,
|
||||
/// Feature is still being built and not ready for broad use.
|
||||
UnderDevelopment,
|
||||
/// Feature is production-ready.
|
||||
Stable,
|
||||
/// Feature is deprecated and should be avoided.
|
||||
Deprecated,
|
||||
/// Feature flag is retained only for backwards compatibility.
|
||||
Removed,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct ExperimentalFeature {
|
||||
/// Stable key used in config.toml and CLI flag toggles.
|
||||
pub flag_name: String,
|
||||
pub name: String,
|
||||
/// Lifecycle stage of this feature flag.
|
||||
pub stage: ExperimentalFeatureStage,
|
||||
/// User-facing display name shown in the experimental features UI.
|
||||
pub display_name: String,
|
||||
/// Null when this feature is not in beta.
|
||||
pub display_name: Option<String>,
|
||||
/// Short summary describing what the feature does.
|
||||
pub description: String,
|
||||
/// Null when this feature is not in beta.
|
||||
pub description: Option<String>,
|
||||
/// Announcement copy shown to users when the feature is introduced.
|
||||
pub announcement: String,
|
||||
/// Null when this feature is not in beta.
|
||||
pub announcement: Option<String>,
|
||||
/// Whether this feature is currently enabled in the loaded config.
|
||||
pub enabled: bool,
|
||||
/// Whether this feature is enabled by default.
|
||||
|
||||
Reference in New Issue
Block a user