refactor: use is_internal function to determine plugin type instead of hardcoded list
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
@@ -274,20 +274,13 @@ async fn handle_status(
|
||||
let (binary_display, args_display) = if !is_supported {
|
||||
("<NOT FOUND>".to_string(), "".to_string())
|
||||
} else {
|
||||
match meta_plugin_type {
|
||||
MetaPluginType::DigestSha256 | MetaPluginType::ReadTime | MetaPluginType::ReadRate |
|
||||
MetaPluginType::Cwd | MetaPluginType::Uid | MetaPluginType::User |
|
||||
MetaPluginType::Gid | MetaPluginType::Group | MetaPluginType::Shell |
|
||||
MetaPluginType::ShellPid | MetaPluginType::KeepPid | MetaPluginType::Hostname |
|
||||
MetaPluginType::FullHostname => {
|
||||
("<INTERNAL>".to_string(), "".to_string())
|
||||
},
|
||||
_ => {
|
||||
if let Some((program, args)) = meta_plugin.program_info() {
|
||||
(program.to_string(), args.join(" "))
|
||||
} else {
|
||||
("<NOT FOUND>".to_string(), "".to_string())
|
||||
}
|
||||
if meta_plugin.is_internal() {
|
||||
("<INTERNAL>".to_string(), "".to_string())
|
||||
} else {
|
||||
if let Some((program, args)) = meta_plugin.program_info() {
|
||||
(program.to_string(), args.join(" "))
|
||||
} else {
|
||||
("<NOT FOUND>".to_string(), "".to_string())
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user