refactor: rename program plugin to command
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use log::debug;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
pub mod program;
|
||||
pub mod command;
|
||||
pub mod digest;
|
||||
pub mod magic;
|
||||
pub mod binary;
|
||||
@@ -15,7 +15,7 @@ pub mod shell;
|
||||
pub mod shell_pid;
|
||||
pub mod keep_pid;
|
||||
|
||||
use crate::meta_plugin::program::MetaPluginProgram;
|
||||
use crate::meta_plugin::command::MetaPluginCommand;
|
||||
use crate::meta_plugin::digest::DigestMetaPlugin;
|
||||
use crate::meta_plugin::read_time::ReadTimeMetaPlugin;
|
||||
use crate::meta_plugin::read_rate::ReadRateMetaPlugin;
|
||||
@@ -132,7 +132,7 @@ pub enum MetaPluginType {
|
||||
ReadTime,
|
||||
ReadRate,
|
||||
Hostname,
|
||||
Program,
|
||||
Command,
|
||||
}
|
||||
|
||||
/// Central function to handle metadata output with name mapping
|
||||
@@ -290,11 +290,11 @@ pub fn get_meta_plugin(
|
||||
MetaPluginType::ReadTime => Box::new(ReadTimeMetaPlugin::new(options, outputs)),
|
||||
MetaPluginType::ReadRate => Box::new(ReadRateMetaPlugin::new(options, outputs)),
|
||||
MetaPluginType::Hostname => Box::new(HostnameMetaPlugin::new(options, outputs)),
|
||||
MetaPluginType::Program => {
|
||||
// For program type, we need to parse the command from options
|
||||
MetaPluginType::Command => {
|
||||
// For command type, we need to parse the command from options
|
||||
let mut program_name = String::new();
|
||||
let mut args = Vec::new();
|
||||
let mut meta_name = "program".to_string();
|
||||
let mut meta_name = "command".to_string();
|
||||
let mut split_whitespace = true;
|
||||
|
||||
if let Some(opts) = &options {
|
||||
@@ -320,7 +320,7 @@ pub fn get_meta_plugin(
|
||||
}
|
||||
}
|
||||
|
||||
Box::new(MetaPluginProgram::new(&program_name,
|
||||
Box::new(MetaPluginCommand::new(&program_name,
|
||||
args.iter().map(|s| s.as_str()).collect(),
|
||||
meta_name,
|
||||
split_whitespace,
|
||||
|
||||
Reference in New Issue
Block a user