fix: remove unused imports and fix settings default error
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
@@ -112,15 +112,9 @@ pub fn generate_status_info(
|
|||||||
// Plugin initialized successfully
|
// Plugin initialized successfully
|
||||||
}
|
}
|
||||||
|
|
||||||
// Configure plugin with settings if available
|
// Note: In status mode we don't have access to actual settings,
|
||||||
// Create a dummy settings object to get plugin configs
|
// so we can't configure plugins with their settings here.
|
||||||
let dummy_settings = config::Settings::default();
|
// Plugin configuration happens during save operations.
|
||||||
if let Some(meta_plugin_configs) = &dummy_settings.meta_plugins {
|
|
||||||
if let Some(config) = meta_plugin_configs.iter().find(|c| c.name == meta_plugin.meta_name()) {
|
|
||||||
// Configure the plugin with options and outputs from config
|
|
||||||
let _ = meta_plugin.configure(&config.options, &config.outputs.iter().map(|(k, v)| (k.clone(), serde_yaml::Value::String(v.clone()))).collect());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let (binary_display, args_display) = if !is_supported {
|
let (binary_display, args_display) = if !is_supported {
|
||||||
("<NOT FOUND>".to_string(), "".to_string())
|
("<NOT FOUND>".to_string(), "".to_string())
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ pub trait MetaPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Configure plugin with options (excluding outputs)
|
// Configure plugin with options (excluding outputs)
|
||||||
fn configure_options(&mut self, options: &std::collections::HashMap<String, serde_yaml::Value>) -> Result<()> {
|
fn configure_options(&mut self, _options: &std::collections::HashMap<String, serde_yaml::Value>) -> Result<()> {
|
||||||
// Default implementation does nothing - plugins can override this
|
// Default implementation does nothing - plugins can override this
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ use anyhow::Result;
|
|||||||
use rusqlite::Connection;
|
use rusqlite::Connection;
|
||||||
|
|
||||||
use crate::common::is_binary::is_binary;
|
use crate::common::is_binary::is_binary;
|
||||||
use crate::meta_plugin::{MetaPlugin, output_metadata};
|
use crate::meta_plugin::MetaPlugin;
|
||||||
|
|
||||||
#[derive(Debug, Clone, Default)]
|
#[derive(Debug, Clone, Default)]
|
||||||
pub struct BinaryMetaPlugin {
|
pub struct BinaryMetaPlugin {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ use sha2::{Digest, Sha256};
|
|||||||
use std::time::Instant;
|
use std::time::Instant;
|
||||||
use rusqlite::Connection;
|
use rusqlite::Connection;
|
||||||
|
|
||||||
use crate::meta_plugin::{MetaPlugin, output_metadata};
|
use crate::meta_plugin::MetaPlugin;
|
||||||
|
|
||||||
#[derive(Debug, Clone, Default)]
|
#[derive(Debug, Clone, Default)]
|
||||||
pub struct DigestSha256MetaPlugin {
|
pub struct DigestSha256MetaPlugin {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ use magic::{Cookie, CookieFlags};
|
|||||||
use rusqlite::Connection;
|
use rusqlite::Connection;
|
||||||
use std::io;
|
use std::io;
|
||||||
|
|
||||||
use crate::meta_plugin::{MetaPlugin, output_metadata};
|
use crate::meta_plugin::MetaPlugin;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct MagicFileMetaPlugin {
|
pub struct MagicFileMetaPlugin {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ use std::process;
|
|||||||
use uzers::{get_current_uid, get_current_gid, get_current_username, get_current_groupname};
|
use uzers::{get_current_uid, get_current_gid, get_current_username, get_current_groupname};
|
||||||
use rusqlite::Connection;
|
use rusqlite::Connection;
|
||||||
|
|
||||||
use crate::meta_plugin::{MetaPlugin, output_metadata};
|
use crate::meta_plugin::MetaPlugin;
|
||||||
|
|
||||||
#[derive(Debug, Clone, Default)]
|
#[derive(Debug, Clone, Default)]
|
||||||
pub struct CwdMetaPlugin {
|
pub struct CwdMetaPlugin {
|
||||||
|
|||||||
Reference in New Issue
Block a user