1use std::fmt;
4
5#[derive(Clone, Copy, Debug, Eq, PartialEq)]
7pub enum SettingName {
8 ActiveProjectId,
10 ActiveTab,
12 DefaultFastAgent,
14 DefaultFastModel,
16 DefaultFastReasoningLevel,
18 DefaultFastSpeedMode,
20 DefaultReviewAgent,
22 DefaultReviewModel,
24 DefaultReviewReasoningLevel,
26 DefaultReviewSpeedMode,
28 DefaultResponseStyle,
30 DefaultSmartAgent,
32 DefaultSmartModel,
34 DefaultSmartReasoningLevel,
36 DefaultSmartSpeedMode,
38 IncludeCoauthoredByAgentty,
41 LaunchConfiguration,
43 LastUsedModelAsDefault,
45 ProjectCatalogVisible,
47 ProjectDiscoveryPromptSeen,
49 TelemetryInstallationId,
51 Theme,
53}
54
55impl SettingName {
56 pub fn as_str(self) -> &'static str {
58 match self {
59 Self::ActiveProjectId => "ActiveProjectId",
60 Self::ActiveTab => "ActiveTab",
61 Self::DefaultFastAgent => "DefaultFastAgent",
62 Self::DefaultFastModel => "DefaultFastModel",
63 Self::DefaultFastReasoningLevel => "DefaultFastReasoningLevel",
64 Self::DefaultFastSpeedMode => "DefaultFastSpeedMode",
65 Self::DefaultReviewAgent => "DefaultReviewAgent",
66 Self::DefaultReviewModel => "DefaultReviewModel",
67 Self::DefaultReviewReasoningLevel => "DefaultReviewReasoningLevel",
68 Self::DefaultReviewSpeedMode => "DefaultReviewSpeedMode",
69 Self::DefaultResponseStyle => "DefaultResponseStyle",
70 Self::DefaultSmartAgent => "DefaultSmartAgent",
71 Self::DefaultSmartModel => "DefaultSmartModel",
72 Self::DefaultSmartReasoningLevel => "DefaultSmartReasoningLevel",
73 Self::DefaultSmartSpeedMode => "DefaultSmartSpeedMode",
74 Self::IncludeCoauthoredByAgentty => "IncludeCoauthoredByAgentty",
75 Self::LaunchConfiguration => "LaunchConfiguration",
76 Self::LastUsedModelAsDefault => "LastUsedModelAsDefault",
77 Self::ProjectCatalogVisible => "ProjectCatalogVisible",
78 Self::ProjectDiscoveryPromptSeen => "ProjectDiscoveryPromptSeen",
79 Self::TelemetryInstallationId => "TelemetryInstallationId",
80 Self::Theme => "Theme",
81 }
82 }
83}
84
85impl fmt::Display for SettingName {
86 fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
87 formatter.write_str(self.as_str())
88 }
89}
90
91#[cfg(test)]
92#[path = "setting_test.rs"]
93mod tests;