feat: add options to meta plugins
Co-authored-by: aider (openai/andrew/openrouter/anthropic/claude-sonnet-4) <aider@aider.chat>
This commit is contained in:
@@ -14,6 +14,7 @@ pub struct CwdMetaPlugin {
|
||||
meta_name: String,
|
||||
is_saved: bool,
|
||||
outputs: std::collections::HashMap<String, serde_yaml::Value>,
|
||||
options: std::collections::HashMap<String, serde_yaml::Value>,
|
||||
}
|
||||
|
||||
impl CwdMetaPlugin {
|
||||
@@ -37,6 +38,7 @@ impl CwdMetaPlugin {
|
||||
meta_name: "cwd".to_string(),
|
||||
is_saved: false,
|
||||
outputs: final_outputs,
|
||||
options: final_options,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,6 +91,14 @@ impl MetaPlugin for CwdMetaPlugin {
|
||||
fn default_options(&self) -> std::collections::HashMap<String, serde_yaml::Value> {
|
||||
std::collections::HashMap::new()
|
||||
}
|
||||
|
||||
fn options(&self) -> &std::collections::HashMap<String, serde_yaml::Value> {
|
||||
&self.options
|
||||
}
|
||||
|
||||
fn options_mut(&mut self) -> &mut std::collections::HashMap<String, serde_yaml::Value> {
|
||||
&mut self.options
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Default)]
|
||||
@@ -96,6 +106,7 @@ pub struct UidMetaPlugin {
|
||||
meta_name: String,
|
||||
is_saved: bool,
|
||||
outputs: std::collections::HashMap<String, serde_yaml::Value>,
|
||||
options: std::collections::HashMap<String, serde_yaml::Value>,
|
||||
}
|
||||
|
||||
impl UidMetaPlugin {
|
||||
@@ -119,6 +130,7 @@ impl UidMetaPlugin {
|
||||
meta_name: "uid".to_string(),
|
||||
is_saved: false,
|
||||
outputs: final_outputs,
|
||||
options: final_options,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,6 +179,14 @@ impl MetaPlugin for UidMetaPlugin {
|
||||
fn default_options(&self) -> std::collections::HashMap<String, serde_yaml::Value> {
|
||||
std::collections::HashMap::new()
|
||||
}
|
||||
|
||||
fn options(&self) -> &std::collections::HashMap<String, serde_yaml::Value> {
|
||||
&self.options
|
||||
}
|
||||
|
||||
fn options_mut(&mut self) -> &mut std::collections::HashMap<String, serde_yaml::Value> {
|
||||
&mut self.options
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Default)]
|
||||
@@ -174,6 +194,7 @@ pub struct UserMetaPlugin {
|
||||
meta_name: String,
|
||||
is_saved: bool,
|
||||
outputs: std::collections::HashMap<String, serde_yaml::Value>,
|
||||
options: std::collections::HashMap<String, serde_yaml::Value>,
|
||||
}
|
||||
|
||||
impl UserMetaPlugin {
|
||||
@@ -197,6 +218,7 @@ impl UserMetaPlugin {
|
||||
meta_name: "user".to_string(),
|
||||
is_saved: false,
|
||||
outputs: final_outputs,
|
||||
options: final_options,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -248,6 +270,14 @@ impl MetaPlugin for UserMetaPlugin {
|
||||
fn default_options(&self) -> std::collections::HashMap<String, serde_yaml::Value> {
|
||||
std::collections::HashMap::new()
|
||||
}
|
||||
|
||||
fn options(&self) -> &std::collections::HashMap<String, serde_yaml::Value> {
|
||||
&self.options
|
||||
}
|
||||
|
||||
fn options_mut(&mut self) -> &mut std::collections::HashMap<String, serde_yaml::Value> {
|
||||
&mut self.options
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Default)]
|
||||
@@ -255,6 +285,7 @@ pub struct GidMetaPlugin {
|
||||
meta_name: String,
|
||||
is_saved: bool,
|
||||
outputs: std::collections::HashMap<String, serde_yaml::Value>,
|
||||
options: std::collections::HashMap<String, serde_yaml::Value>,
|
||||
}
|
||||
|
||||
impl GidMetaPlugin {
|
||||
@@ -278,6 +309,7 @@ impl GidMetaPlugin {
|
||||
meta_name: "gid".to_string(),
|
||||
is_saved: false,
|
||||
outputs: final_outputs,
|
||||
options: final_options,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -326,6 +358,14 @@ impl MetaPlugin for GidMetaPlugin {
|
||||
fn default_options(&self) -> std::collections::HashMap<String, serde_yaml::Value> {
|
||||
std::collections::HashMap::new()
|
||||
}
|
||||
|
||||
fn options(&self) -> &std::collections::HashMap<String, serde_yaml::Value> {
|
||||
&self.options
|
||||
}
|
||||
|
||||
fn options_mut(&mut self) -> &mut std::collections::HashMap<String, serde_yaml::Value> {
|
||||
&mut self.options
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Default)]
|
||||
@@ -333,6 +373,7 @@ pub struct GroupMetaPlugin {
|
||||
meta_name: String,
|
||||
is_saved: bool,
|
||||
outputs: std::collections::HashMap<String, serde_yaml::Value>,
|
||||
options: std::collections::HashMap<String, serde_yaml::Value>,
|
||||
}
|
||||
|
||||
impl GroupMetaPlugin {
|
||||
@@ -356,6 +397,7 @@ impl GroupMetaPlugin {
|
||||
meta_name: "group".to_string(),
|
||||
is_saved: false,
|
||||
outputs: final_outputs,
|
||||
options: final_options,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -407,6 +449,14 @@ impl MetaPlugin for GroupMetaPlugin {
|
||||
fn default_options(&self) -> std::collections::HashMap<String, serde_yaml::Value> {
|
||||
std::collections::HashMap::new()
|
||||
}
|
||||
|
||||
fn options(&self) -> &std::collections::HashMap<String, serde_yaml::Value> {
|
||||
&self.options
|
||||
}
|
||||
|
||||
fn options_mut(&mut self) -> &mut std::collections::HashMap<String, serde_yaml::Value> {
|
||||
&mut self.options
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Default)]
|
||||
@@ -414,6 +464,7 @@ pub struct ShellMetaPlugin {
|
||||
meta_name: String,
|
||||
is_saved: bool,
|
||||
outputs: std::collections::HashMap<String, serde_yaml::Value>,
|
||||
options: std::collections::HashMap<String, serde_yaml::Value>,
|
||||
}
|
||||
|
||||
impl ShellMetaPlugin {
|
||||
@@ -437,6 +488,7 @@ impl ShellMetaPlugin {
|
||||
meta_name: "shell".to_string(),
|
||||
is_saved: false,
|
||||
outputs: final_outputs,
|
||||
options: final_options,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -488,6 +540,14 @@ impl MetaPlugin for ShellMetaPlugin {
|
||||
fn default_options(&self) -> std::collections::HashMap<String, serde_yaml::Value> {
|
||||
std::collections::HashMap::new()
|
||||
}
|
||||
|
||||
fn options(&self) -> &std::collections::HashMap<String, serde_yaml::Value> {
|
||||
&self.options
|
||||
}
|
||||
|
||||
fn options_mut(&mut self) -> &mut std::collections::HashMap<String, serde_yaml::Value> {
|
||||
&mut self.options
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Default)]
|
||||
@@ -495,6 +555,7 @@ pub struct ShellPidMetaPlugin {
|
||||
meta_name: String,
|
||||
is_saved: bool,
|
||||
outputs: std::collections::HashMap<String, serde_yaml::Value>,
|
||||
options: std::collections::HashMap<String, serde_yaml::Value>,
|
||||
}
|
||||
|
||||
impl ShellPidMetaPlugin {
|
||||
@@ -518,6 +579,7 @@ impl ShellPidMetaPlugin {
|
||||
meta_name: "shell_pid".to_string(),
|
||||
is_saved: false,
|
||||
outputs: final_outputs,
|
||||
options: final_options,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -569,6 +631,14 @@ impl MetaPlugin for ShellPidMetaPlugin {
|
||||
fn default_options(&self) -> std::collections::HashMap<String, serde_yaml::Value> {
|
||||
std::collections::HashMap::new()
|
||||
}
|
||||
|
||||
fn options(&self) -> &std::collections::HashMap<String, serde_yaml::Value> {
|
||||
&self.options
|
||||
}
|
||||
|
||||
fn options_mut(&mut self) -> &mut std::collections::HashMap<String, serde_yaml::Value> {
|
||||
&mut self.options
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Default)]
|
||||
@@ -576,6 +646,7 @@ pub struct KeepPidMetaPlugin {
|
||||
meta_name: String,
|
||||
is_saved: bool,
|
||||
outputs: std::collections::HashMap<String, serde_yaml::Value>,
|
||||
options: std::collections::HashMap<String, serde_yaml::Value>,
|
||||
}
|
||||
|
||||
impl KeepPidMetaPlugin {
|
||||
@@ -599,6 +670,7 @@ impl KeepPidMetaPlugin {
|
||||
meta_name: "keep_pid".to_string(),
|
||||
is_saved: false,
|
||||
outputs: final_outputs,
|
||||
options: final_options,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -647,6 +719,14 @@ impl MetaPlugin for KeepPidMetaPlugin {
|
||||
fn default_options(&self) -> std::collections::HashMap<String, serde_yaml::Value> {
|
||||
std::collections::HashMap::new()
|
||||
}
|
||||
|
||||
fn options(&self) -> &std::collections::HashMap<String, serde_yaml::Value> {
|
||||
&self.options
|
||||
}
|
||||
|
||||
fn options_mut(&mut self) -> &mut std::collections::HashMap<String, serde_yaml::Value> {
|
||||
&mut self.options
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Default)]
|
||||
@@ -654,6 +734,7 @@ pub struct HostnameMetaPlugin {
|
||||
meta_name: String,
|
||||
is_saved: bool,
|
||||
outputs: std::collections::HashMap<String, serde_yaml::Value>,
|
||||
options: std::collections::HashMap<String, serde_yaml::Value>,
|
||||
}
|
||||
|
||||
impl HostnameMetaPlugin {
|
||||
@@ -677,6 +758,7 @@ impl HostnameMetaPlugin {
|
||||
meta_name: "hostname".to_string(),
|
||||
is_saved: false,
|
||||
outputs: final_outputs,
|
||||
options: final_options,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -728,6 +810,14 @@ impl MetaPlugin for HostnameMetaPlugin {
|
||||
fn default_options(&self) -> std::collections::HashMap<String, serde_yaml::Value> {
|
||||
std::collections::HashMap::new()
|
||||
}
|
||||
|
||||
fn options(&self) -> &std::collections::HashMap<String, serde_yaml::Value> {
|
||||
&self.options
|
||||
}
|
||||
|
||||
fn options_mut(&mut self) -> &mut std::collections::HashMap<String, serde_yaml::Value> {
|
||||
&mut self.options
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Default)]
|
||||
@@ -735,6 +825,7 @@ pub struct FullHostnameMetaPlugin {
|
||||
meta_name: String,
|
||||
is_saved: bool,
|
||||
outputs: std::collections::HashMap<String, serde_yaml::Value>,
|
||||
options: std::collections::HashMap<String, serde_yaml::Value>,
|
||||
}
|
||||
|
||||
impl FullHostnameMetaPlugin {
|
||||
@@ -758,6 +849,7 @@ impl FullHostnameMetaPlugin {
|
||||
meta_name: "full_hostname".to_string(),
|
||||
is_saved: false,
|
||||
outputs: final_outputs,
|
||||
options: final_options,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -827,4 +919,12 @@ impl MetaPlugin for FullHostnameMetaPlugin {
|
||||
fn default_options(&self) -> std::collections::HashMap<String, serde_yaml::Value> {
|
||||
std::collections::HashMap::new()
|
||||
}
|
||||
|
||||
fn options(&self) -> &std::collections::HashMap<String, serde_yaml::Value> {
|
||||
&self.options
|
||||
}
|
||||
|
||||
fn options_mut(&mut self) -> &mut std::collections::HashMap<String, serde_yaml::Value> {
|
||||
&mut self.options
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user