Unify subrecipe and subagent execution through shared recipe pipeline (#5082)
This commit is contained in:
@@ -53,9 +53,6 @@ pub struct Recipe {
|
||||
)]
|
||||
pub extensions: Option<Vec<ExtensionConfig>>, // a list of extensions to enable
|
||||
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub context: Option<Vec<String>>, // any additional context
|
||||
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub settings: Option<Settings>, // settings for the recipe
|
||||
|
||||
@@ -206,7 +203,6 @@ pub struct RecipeBuilder {
|
||||
// Optional fields
|
||||
prompt: Option<String>,
|
||||
extensions: Option<Vec<ExtensionConfig>>,
|
||||
context: Option<Vec<String>>,
|
||||
settings: Option<Settings>,
|
||||
activities: Option<Vec<String>>,
|
||||
author: Option<Author>,
|
||||
@@ -252,7 +248,6 @@ impl Recipe {
|
||||
instructions: None,
|
||||
prompt: None,
|
||||
extensions: None,
|
||||
context: None,
|
||||
settings: None,
|
||||
activities: None,
|
||||
author: None,
|
||||
@@ -327,11 +322,6 @@ impl RecipeBuilder {
|
||||
self
|
||||
}
|
||||
|
||||
pub fn context(mut self, context: Vec<String>) -> Self {
|
||||
self.context = Some(context);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn settings(mut self, settings: Settings) -> Self {
|
||||
self.settings = Some(settings);
|
||||
self
|
||||
@@ -382,7 +372,6 @@ impl RecipeBuilder {
|
||||
instructions: self.instructions,
|
||||
prompt: self.prompt,
|
||||
extensions: self.extensions,
|
||||
context: self.context,
|
||||
settings: self.settings,
|
||||
activities: self.activities,
|
||||
author: self.author,
|
||||
@@ -721,7 +710,6 @@ isGlobal: true"#;
|
||||
instructions: Some("clean instructions".to_string()),
|
||||
prompt: Some("clean prompt".to_string()),
|
||||
extensions: None,
|
||||
context: None,
|
||||
settings: None,
|
||||
activities: Some(vec!["clean activity 1".to_string()]),
|
||||
author: None,
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
use anyhow::{anyhow, Result};
|
||||
use std::fs;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct RecipeFile {
|
||||
pub content: String,
|
||||
pub parent_dir: PathBuf,
|
||||
|
||||
Reference in New Issue
Block a user