fix: enable xAI (Grok) by default and improve provider visibility in dashboard
- Set Grok to enabled: true by default. - Updated AppState to include raw AppConfig. - Refactored dashboard to show all supported providers, including their configuration and initialization status (online, disabled, or error).
This commit is contained in:
@@ -4,12 +4,13 @@ use tokio::sync::broadcast;
|
||||
use crate::{
|
||||
client::ClientManager, database::DbPool, providers::ProviderManager,
|
||||
rate_limiting::RateLimitManager, logging::RequestLogger,
|
||||
models::registry::ModelRegistry,
|
||||
models::registry::ModelRegistry, config::AppConfig,
|
||||
};
|
||||
|
||||
/// Shared application state
|
||||
#[derive(Clone)]
|
||||
pub struct AppState {
|
||||
pub config: Arc<AppConfig>,
|
||||
pub provider_manager: ProviderManager,
|
||||
pub db_pool: DbPool,
|
||||
pub rate_limit_manager: Arc<RateLimitManager>,
|
||||
@@ -22,6 +23,7 @@ pub struct AppState {
|
||||
|
||||
impl AppState {
|
||||
pub fn new(
|
||||
config: Arc<AppConfig>,
|
||||
provider_manager: ProviderManager,
|
||||
db_pool: DbPool,
|
||||
rate_limit_manager: RateLimitManager,
|
||||
@@ -33,6 +35,7 @@ impl AppState {
|
||||
let request_logger = Arc::new(RequestLogger::new(db_pool.clone(), dashboard_tx.clone()));
|
||||
|
||||
Self {
|
||||
config,
|
||||
provider_manager,
|
||||
db_pool,
|
||||
rate_limit_manager: Arc::new(rate_limit_manager),
|
||||
|
||||
Reference in New Issue
Block a user