feat: add unified status service implementation
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -33,22 +33,11 @@ pub async fn handle_status(
|
||||
// Get database path
|
||||
let db_path = state.db.lock().await.path().unwrap_or("unknown").to_string();
|
||||
|
||||
// Get all meta plugin types that are supported
|
||||
let supported_meta_plugins: Vec<MetaPluginType> = MetaPluginType::iter()
|
||||
.filter(|mpt| {
|
||||
let plugin = crate::meta_plugin::get_meta_plugin((*mpt).clone(), None, None);
|
||||
plugin.is_supported()
|
||||
})
|
||||
.collect();
|
||||
|
||||
// Default to LZ4 compression for the API status endpoint
|
||||
let enabled_compression_type = Some(CompressionType::LZ4);
|
||||
|
||||
let status_info = generate_status_info(
|
||||
// Use the status service to generate status info showing all supported plugins
|
||||
let status_service = crate::services::status_service::StatusService::new();
|
||||
let status_info = status_service.generate_supported_status(
|
||||
state.data_dir.clone(),
|
||||
db_path.into(),
|
||||
&supported_meta_plugins,
|
||||
enabled_compression_type,
|
||||
);
|
||||
|
||||
let response = ApiResponse {
|
||||
|
||||
Reference in New Issue
Block a user