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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
//! LC (LLM Client) Library
//!
//! This library provides the core functionality for the LC CLI tool,
//! including configuration management, provider handling, and chat functionality.
//!
//! # Platform Differences
//!
//! This crate includes platform-specific features that are only available on certain operating systems:
//!
//! ## Unix Socket Support
//!
//! Unix socket functionality is only available on Unix-like systems (Linux, macOS, BSD, WSL2) and requires
//! the `unix-sockets` feature to be enabled.
//!
//! ### MCP Daemon
//!
//! The MCP (Model Context Protocol) daemon functionality uses Unix domain sockets for inter-process
//! communication and is therefore only available on Unix systems:
//!
//! - **Unix systems** (Linux, macOS, WSL2): Full MCP daemon support with persistent connections
//! - **Windows**: MCP daemon is not supported; direct MCP connections work on all platforms
//!
//! ## Usage Statistics
//!
//! Usage statistics functionality works on all platforms (Windows, macOS, Linux, WSL2).
//! It uses SQLite database which has full cross-platform support.
//!
//! ### Feature Flags
//!
//! - `unix-sockets`: Enables Unix socket functionality (default on Unix systems)
//! - `pdf`: Enables PDF processing support (default)
//!
//! To build without Unix socket support:
//! ```bash
//! cargo build --no-default-features --features pdf
//! ```
//!
//! To build with all features:
//! ```bash
//! cargo build --features "unix-sockets,pdf"
//! ```
// CLI modules
// Core modules
// Re-export core modules at the top level for compatibility
pub use chat;
pub use completion;
pub use http_client;
pub use provider;
pub use provider_installer;
// Data modules
// Re-export data modules at the top level for compatibility
pub use config;
pub use database;
pub use keys;
pub use vector_db;
// Model-related modules
// Re-export models modules at the top level for compatibility
pub use cache as models_cache;
pub use dump_metadata;
pub use metadata as model_metadata;
pub use unified_cache;
// Service modules
// Re-export service modules at the top level for compatibility
pub use mcp;
pub use proxy;
// MCP daemon module - Unix implementation with Windows stubs
// On Windows, all daemon functions return appropriate "unsupported" errors
pub use mcp_daemon;
pub use webchatproxy;
// Utility modules
// Re-export utility modules at the top level for compatibility
pub use audio as audio_utils;
pub use image as image_utils;
pub use input;
pub use template_processor;
pub use test as test_utils;
pub use token as token_utils;
// Analytics modules
// Re-export analytics modules at the top level for compatibility
pub use usage_stats;
// Standalone modules (not yet categorized)
// Global debug flag
use AtomicBool;
pub static DEBUG_MODE: AtomicBool = new;
// Debug logging macro
// Re-export commonly used types for easier access in tests
pub use ;
pub use ;