mermaid_cli/constants.rs
1//! Constants module to avoid magic numbers in the codebase
2
3// Network Configuration
4pub const DEFAULT_OLLAMA_PORT: u16 = 11434;
5
6// Timeouts
7pub const COMMAND_TIMEOUT_SECS: u64 = 30;
8pub const COMMAND_MAX_TIMEOUT_SECS: u64 = 300;
9
10// UI Configuration
11pub const UI_POLL_INTERVAL_MS: u64 = 50;
12pub const UI_MOUSE_SCROLL_LINES: u16 = 3;
13pub const UI_ERROR_LOG_MAX_SIZE: usize = 50;
14
15// Default Model Configuration
16pub const DEFAULT_TEMPERATURE: f32 = 0.7;
17pub const DEFAULT_MAX_TOKENS: usize = 4096;
18
19// Context Management
20/// Maximum context tokens for managed message history
21pub const MAX_CONTEXT_TOKENS: usize = 75_000;
22/// Tokens reserved for the model's response within the context window
23pub const CONTEXT_RESERVE_TOKENS: usize = 4_000;