1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! Centralized message constants and formatting utilities
//!
//! This module provides consistent error messages and warnings used
//! throughout the application. Centralizing messages helps maintain
//! consistency and facilitates future internationalization.
/// Error message displayed when configuration is invalid
pub const MSG_FAILED_INVALID_CONFIG: &str = "Failed to build status line due to invalid config";
/// Error message displayed when no input is received from stdin
pub const MSG_FAILED_EMPTY_INPUT: &str = "Failed to build status line due to empty input";
/// Error message displayed when JSON parsing fails
pub const MSG_FAILED_INVALID_JSON: &str = "Failed to build status line due to invalid json";
/// Generates a warning message for unknown style tokens
///
/// # Arguments
///
/// * `module_name` - Name of the module with the invalid style
/// * `token` - The unknown style token
///
/// # Returns
///
/// A formatted warning message
///
/// # Examples
///
/// ```
/// use claude_code_statusline_core::messages::warn_unknown_style_token;
///
/// let msg = warn_unknown_style_token("directory", "blink");
/// assert_eq!(msg, "Unknown style token in directory.style: 'blink' (ignored)");
/// ```
/// Generates a warning message for unknown format tokens
///
/// # Arguments
///
/// * `token` - The unknown format token (without $ prefix)
///
/// # Returns
///
/// A formatted warning message
///
/// # Examples
///
/// ```
/// use claude_code_statusline_core::messages::warn_unknown_format_token;
///
/// let msg = warn_unknown_format_token("unknown");
/// assert_eq!(msg, "Unknown format token: '$unknown'");
/// ```