fixed recipe schedule jobs (#3880)
This commit is contained in:
@@ -1139,8 +1139,8 @@ impl Agent {
|
||||
let mode = session.and_then(|s| s.execution_mode.as_deref());
|
||||
|
||||
match mode {
|
||||
Some("foreground") => "auto".to_string(),
|
||||
Some("background") => "chat".to_string(),
|
||||
Some("foreground") => "chat".to_string(),
|
||||
Some("background") => "auto".to_string(),
|
||||
_ => config
|
||||
.get_param("GOOSE_MODE")
|
||||
.unwrap_or_else(|_| "auto".to_string()),
|
||||
|
||||
@@ -1154,6 +1154,17 @@ async fn run_scheduled_job_internal(
|
||||
),
|
||||
})?;
|
||||
}
|
||||
if let Some(recipe_extensions) = recipe.extensions {
|
||||
for extension in recipe_extensions {
|
||||
agent
|
||||
.add_extension(extension.clone())
|
||||
.await
|
||||
.map_err(|e| JobExecutionError {
|
||||
job_id: job.id.clone(),
|
||||
error: format!("Failed to add extension '{}': {}", extension.name(), e),
|
||||
})?;
|
||||
}
|
||||
}
|
||||
|
||||
if let Err(e) = agent.update_provider(agent_provider).await {
|
||||
return Err(JobExecutionError {
|
||||
|
||||
Reference in New Issue
Block a user