vtcode_tui/config/
types.rs1use serde::{Deserialize, Serialize};
2use std::fmt;
3
4#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, Default)]
5#[serde(rename_all = "lowercase")]
6pub enum ReasoningEffortLevel {
7 None,
8 Minimal,
9 Low,
10 #[default]
11 Medium,
12 High,
13 XHigh,
14 Max,
15}
16
17impl ReasoningEffortLevel {
18 pub const fn as_str(self) -> &'static str {
19 match self {
20 Self::None => "none",
21 Self::Minimal => "minimal",
22 Self::Low => "low",
23 Self::Medium => "medium",
24 Self::High => "high",
25 Self::XHigh => "xhigh",
26 Self::Max => "max",
27 }
28 }
29}
30
31impl fmt::Display for ReasoningEffortLevel {
32 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
33 f.write_str(self.as_str())
34 }
35}
36
37#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, Default)]
38#[serde(rename_all = "lowercase")]
39pub enum SystemPromptMode {
40 Minimal,
41 Lightweight,
42 #[default]
43 Default,
44 Specialized,
45}
46
47impl SystemPromptMode {
48 pub const fn as_str(self) -> &'static str {
49 match self {
50 Self::Minimal => "minimal",
51 Self::Lightweight => "lightweight",
52 Self::Default => "default",
53 Self::Specialized => "specialized",
54 }
55 }
56}
57
58impl fmt::Display for SystemPromptMode {
59 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
60 f.write_str(self.as_str())
61 }
62}
63
64#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, Default)]
65#[serde(rename_all = "lowercase")]
66pub enum ToolDocumentationMode {
67 Minimal,
68 #[default]
69 Progressive,
70 Full,
71}
72
73impl ToolDocumentationMode {
74 pub const fn as_str(self) -> &'static str {
75 match self {
76 Self::Minimal => "minimal",
77 Self::Progressive => "progressive",
78 Self::Full => "full",
79 }
80 }
81}
82
83impl fmt::Display for ToolDocumentationMode {
84 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
85 f.write_str(self.as_str())
86 }
87}
88
89#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, Default)]
90#[serde(rename_all = "lowercase")]
91pub enum VerbosityLevel {
92 Low,
93 #[default]
94 Medium,
95 High,
96}
97
98impl VerbosityLevel {
99 pub const fn as_str(self) -> &'static str {
100 match self {
101 Self::Low => "low",
102 Self::Medium => "medium",
103 Self::High => "high",
104 }
105 }
106}
107
108impl fmt::Display for VerbosityLevel {
109 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
110 f.write_str(self.as_str())
111 }
112}
113
114#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, Default)]
115#[serde(rename_all = "lowercase")]
116pub enum UiSurfacePreference {
117 #[default]
118 Auto,
119 Alternate,
120 Inline,
121}
122
123impl UiSurfacePreference {
124 pub const fn as_str(self) -> &'static str {
125 match self {
126 Self::Auto => "auto",
127 Self::Alternate => "alternate",
128 Self::Inline => "inline",
129 }
130 }
131}
132
133impl fmt::Display for UiSurfacePreference {
134 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
135 f.write_str(self.as_str())
136 }
137}