1use crate::types::*;
2
3impl Default for GeneralConfig {
4 fn default() -> Self {
5 Self {
6 editor: None,
7 default_account: None,
8 sync_interval: 60,
9 hook_timeout: 30,
10 attachment_dir: crate::resolve::data_dir().join("attachments"),
11 }
12 }
13}
14
15impl Default for RenderConfig {
16 fn default() -> Self {
17 Self {
18 html_command: None,
19 reader_mode: true,
20 show_reader_stats: true,
21 }
22 }
23}
24
25impl Default for SearchConfig {
26 fn default() -> Self {
27 Self {
28 default_sort: SortOrder::DateDesc,
29 max_results: 200,
30 default_mode: mxr_core::SearchMode::Lexical,
31 semantic: SemanticConfig::default(),
32 }
33 }
34}
35
36impl Default for SemanticConfig {
37 fn default() -> Self {
38 Self {
39 enabled: false,
40 auto_download_models: true,
41 active_profile: mxr_core::SemanticProfile::BgeSmallEnV15,
42 max_pending_jobs: 256,
43 query_timeout_ms: 1500,
44 }
45 }
46}
47
48impl Default for SnoozeConfig {
49 fn default() -> Self {
50 Self {
51 morning_hour: 9,
52 evening_hour: 18,
53 weekend_day: "saturday".to_string(),
54 weekend_hour: 10,
55 }
56 }
57}
58
59impl Default for AppearanceConfig {
60 fn default() -> Self {
61 Self {
62 theme: "default".to_string(),
63 sidebar: true,
64 date_format: "%b %d".to_string(),
65 date_format_full: "%Y-%m-%d %H:%M".to_string(),
66 subject_max_width: 60,
67 }
68 }
69}
70
71impl Default for LoggingConfig {
72 fn default() -> Self {
73 Self {
74 level: "info".to_string(),
75 max_size_mb: 250,
76 max_files: 10,
77 stderr: true,
78 event_retention_days: 90,
79 }
80 }
81}