kowalski_code_agent/
config.rs

1use kowalski_agent_template::config::TemplateAgentConfig;
2use kowalski_core::config::Config;
3use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Clone, Serialize, Deserialize)]
6pub struct CodeAgentConfig {
7    /// Base template configuration
8    pub template: TemplateAgentConfig,
9
10    /// Maximum file size to process (in bytes)
11    pub max_file_size: usize,
12
13    /// Maximum number of files to process in a single operation
14    pub max_files_per_operation: usize,
15
16    /// Whether to enable syntax highlighting
17    pub enable_syntax_highlighting: bool,
18
19    /// Whether to enable code formatting
20    pub enable_code_formatting: bool,
21
22    /// Whether to enable code analysis
23    pub enable_code_analysis: bool,
24
25    /// Whether to enable code refactoring
26    pub enable_code_refactoring: bool,
27
28    /// Whether to enable documentation generation
29    pub enable_documentation: bool,
30
31    /// Whether to enable test generation
32    pub enable_test_generation: bool,
33
34    /// Whether to enable dependency analysis
35    pub enable_dependency_analysis: bool,
36
37    /// Whether to enable security analysis
38    pub enable_security_analysis: bool,
39
40    /// Whether to enable performance analysis
41    pub enable_performance_analysis: bool,
42
43    /// Whether to enable code metrics
44    pub enable_code_metrics: bool,
45
46    /// Whether to enable code duplication detection
47    pub enable_duplication_detection: bool,
48
49    /// Whether to enable code complexity analysis
50    pub enable_complexity_analysis: bool,
51
52    /// Whether to enable code coverage analysis
53    pub enable_coverage_analysis: bool,
54
55    /// Whether to enable code style checking
56    pub enable_style_checking: bool,
57
58    /// Whether to enable code linting
59    pub enable_linting: bool,
60
61    /// Whether to enable code type checking
62    pub enable_type_checking: bool,
63
64    /// Whether to enable code static analysis
65    pub enable_static_analysis: bool,
66
67    /// Whether to enable code dynamic analysis
68    pub enable_dynamic_analysis: bool,
69
70    /// Whether to enable code profiling
71    pub enable_profiling: bool,
72
73    /// Whether to enable code debugging
74    pub enable_debugging: bool,
75
76    /// Whether to enable code tracing
77    pub enable_tracing: bool,
78
79    /// Whether to enable code logging
80    pub enable_logging: bool,
81
82    /// Whether to enable code monitoring
83    pub enable_monitoring: bool,
84
85    /// Whether to enable code metrics collection
86    pub enable_metrics_collection: bool,
87
88    /// Whether to enable code reporting
89    pub enable_reporting: bool,
90
91    /// Whether to enable code visualization
92    pub enable_visualization: bool,
93
94    /// Whether to enable code documentation
95    pub enable_documentation_generation: bool,
96
97    /// Whether to enable code refactoring
98    pub enable_refactoring: bool,
99
100    /// Whether to enable code optimization
101    pub enable_optimization: bool,
102
103    /// Whether to enable code security
104    pub enable_security: bool,
105
106    /// Whether to enable code performance
107    pub enable_performance: bool,
108
109    /// Whether to enable code quality
110    pub enable_quality: bool,
111
112    /// Whether to enable code maintainability
113    pub enable_maintainability: bool,
114
115    /// Whether to enable code reliability
116    pub enable_reliability: bool,
117
118    /// Whether to enable code portability
119    pub enable_portability: bool,
120
121    /// Whether to enable code reusability
122    pub enable_reusability: bool,
123
124    /// Whether to enable code testability
125    pub enable_testability: bool,
126
127    /// Whether to enable code understandability
128    pub enable_understandability: bool,
129
130    /// Whether to enable code modifiability
131    pub enable_modifiability: bool,
132
133    /// Whether to enable code efficiency
134    pub enable_efficiency: bool,
135
136    /// Whether to enable code effectiveness
137    pub enable_effectiveness: bool,
138
139    /// Whether to enable code correctness
140    pub enable_correctness: bool,
141
142    /// Whether to enable code completeness
143    pub enable_completeness: bool,
144
145    /// Whether to enable code consistency
146    pub enable_consistency: bool,
147
148    /// Whether to enable code traceability
149    pub enable_traceability: bool,
150
151    /// Whether to enable code verifiability
152    pub enable_verifiability: bool,
153}
154
155impl Default for CodeAgentConfig {
156    fn default() -> Self {
157        Self {
158            template: TemplateAgentConfig::default(),
159            max_file_size: 1024 * 1024, // 1MB
160            max_files_per_operation: 100,
161            enable_syntax_highlighting: true,
162            enable_code_formatting: true,
163            enable_code_analysis: true,
164            enable_code_refactoring: true,
165            enable_documentation: true,
166            enable_test_generation: true,
167            enable_dependency_analysis: true,
168            enable_security_analysis: true,
169            enable_performance_analysis: true,
170            enable_code_metrics: true,
171            enable_duplication_detection: true,
172            enable_complexity_analysis: true,
173            enable_coverage_analysis: true,
174            enable_style_checking: true,
175            enable_linting: true,
176            enable_type_checking: true,
177            enable_static_analysis: true,
178            enable_dynamic_analysis: true,
179            enable_profiling: true,
180            enable_debugging: true,
181            enable_tracing: true,
182            enable_logging: true,
183            enable_monitoring: true,
184            enable_metrics_collection: true,
185            enable_reporting: true,
186            enable_visualization: true,
187            enable_documentation_generation: true,
188            enable_refactoring: true,
189            enable_optimization: true,
190            enable_security: true,
191            enable_performance: true,
192            enable_quality: true,
193            enable_maintainability: true,
194            enable_reliability: true,
195            enable_portability: true,
196            enable_reusability: true,
197            enable_testability: true,
198            enable_understandability: true,
199            enable_modifiability: true,
200            enable_efficiency: true,
201            enable_effectiveness: true,
202            enable_correctness: true,
203            enable_completeness: true,
204            enable_consistency: true,
205            enable_traceability: true,
206            enable_verifiability: true,
207        }
208    }
209}
210
211impl From<Config> for CodeAgentConfig {
212    fn from(config: Config) -> Self {
213        Self {
214            template: TemplateAgentConfig::from(config),
215            ..Default::default()
216        }
217    }
218}