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