feat: show recipe explanation (#2530)
Co-authored-by: Michael Neale <michael.neale@gmail.com>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
use std::fmt;
|
||||
|
||||
use crate::agents::extension::ExtensionConfig;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
@@ -102,15 +104,36 @@ pub enum RecipeParameterRequirement {
|
||||
UserPrompt,
|
||||
}
|
||||
|
||||
impl fmt::Display for RecipeParameterRequirement {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(
|
||||
f,
|
||||
"{}",
|
||||
serde_json::to_string(self).unwrap().trim_matches('"')
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum RecipeParameterInputType {
|
||||
String,
|
||||
Number,
|
||||
Boolean,
|
||||
Date,
|
||||
File,
|
||||
}
|
||||
|
||||
impl fmt::Display for RecipeParameterInputType {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(
|
||||
f,
|
||||
"{}",
|
||||
serde_json::to_string(self).unwrap().trim_matches('"')
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct RecipeParameter {
|
||||
pub key: String,
|
||||
|
||||
Reference in New Issue
Block a user