Restore recipe parameters functionality (#3530)
This commit is contained in:
@@ -163,6 +163,7 @@ pub enum ExtensionConfig {
|
||||
/// The name used to identify this extension
|
||||
name: String,
|
||||
display_name: Option<String>, // needed for the UI
|
||||
description: Option<String>,
|
||||
timeout: Option<u64>,
|
||||
/// Whether this extension is bundled with Goose
|
||||
#[serde(default)]
|
||||
@@ -208,6 +209,7 @@ impl Default for ExtensionConfig {
|
||||
Self::Builtin {
|
||||
name: config::DEFAULT_EXTENSION.to_string(),
|
||||
display_name: Some(config::DEFAULT_DISPLAY_NAME.to_string()),
|
||||
description: None,
|
||||
timeout: Some(config::DEFAULT_EXTENSION_TIMEOUT),
|
||||
bundled: Some(true),
|
||||
}
|
||||
|
||||
@@ -242,6 +242,7 @@ impl ExtensionManager {
|
||||
ExtensionConfig::Builtin {
|
||||
name,
|
||||
display_name: _,
|
||||
description: _,
|
||||
timeout,
|
||||
bundled: _,
|
||||
} => {
|
||||
|
||||
@@ -46,6 +46,7 @@ impl ExtensionConfigManager {
|
||||
display_name: Some(DEFAULT_DISPLAY_NAME.to_string()),
|
||||
timeout: Some(DEFAULT_EXTENSION_TIMEOUT),
|
||||
bundled: Some(true),
|
||||
description: Some(DEFAULT_EXTENSION_DESCRIPTION.to_string()),
|
||||
},
|
||||
},
|
||||
)]);
|
||||
|
||||
@@ -151,6 +151,8 @@ pub struct SubRecipe {
|
||||
pub values: Option<HashMap<String, String>>,
|
||||
#[serde(default)]
|
||||
pub sequential_when_repeated: bool,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<String>,
|
||||
}
|
||||
|
||||
fn deserialize_value_map_as_string<'de, D>(
|
||||
@@ -204,6 +206,7 @@ pub enum RecipeParameterInputType {
|
||||
Boolean,
|
||||
Date,
|
||||
File,
|
||||
Select,
|
||||
}
|
||||
|
||||
impl fmt::Display for RecipeParameterInputType {
|
||||
@@ -224,6 +227,8 @@ pub struct RecipeParameter {
|
||||
pub description: String,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub default: Option<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub options: Option<Vec<String>>,
|
||||
}
|
||||
|
||||
/// Builder for creating Recipe instances
|
||||
|
||||
Reference in New Issue
Block a user