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:
@@ -340,34 +340,18 @@ fn build_meta_plugin_table(meta_plugin_info: &Vec<MetaPluginInfo>) -> Table {
|
||||
}
|
||||
|
||||
pub fn mode_status(
|
||||
_cmd: &mut Command,
|
||||
cmd: &mut Command,
|
||||
settings: &config::Settings,
|
||||
data_path: PathBuf,
|
||||
db_path: PathBuf,
|
||||
) -> Result<(), anyhow::Error> {
|
||||
debug!("STATUS: Starting mode_status function");
|
||||
|
||||
// Determine which meta plugins would be enabled for a save operation
|
||||
debug!("STATUS: Getting meta plugin types from settings");
|
||||
let mut meta_plugin_types: Vec<MetaPluginType> = crate::modes::common::settings_meta_plugin_types(_cmd, settings);
|
||||
debug!("STATUS: Got {} meta plugin types", meta_plugin_types.len());
|
||||
|
||||
// Always add the Digest plugin if not present
|
||||
if !meta_plugin_types.contains(&MetaPluginType::Digest) {
|
||||
meta_plugin_types.push(MetaPluginType::Digest);
|
||||
}
|
||||
|
||||
// Determine which compression type would be enabled for a save operation
|
||||
let enabled_compression_type = if let Some(compression_name) = &settings.compression() {
|
||||
CompressionType::from_str(compression_name).ok()
|
||||
} else {
|
||||
Some(crate::compression_engine::default_compression_type())
|
||||
};
|
||||
|
||||
let status_service = crate::services::status_service::StatusService::new();
|
||||
let output_format = crate::modes::common::settings_output_format(settings);
|
||||
debug!("STATUS: About to call generate_status_info");
|
||||
let status_info = generate_status_info(data_path, db_path, &meta_plugin_types, enabled_compression_type);
|
||||
debug!("STATUS: generate_status_info completed successfully");
|
||||
debug!("STATUS: About to generate status info");
|
||||
let status_info = status_service.generate_status(cmd, settings, data_path, db_path);
|
||||
debug!("STATUS: Status info generated successfully");
|
||||
|
||||
match output_format {
|
||||
OutputFormat::Table => {
|
||||
|
||||
Reference in New Issue
Block a user