fixed recipe schedule jobs (#3880)

This commit is contained in:
Lifei Zhou
2025-08-07 11:18:39 +10:00
committed by GitHub
parent a646c7a0f5
commit 67e63624ab
4 changed files with 25 additions and 7 deletions
+2 -2
View File
@@ -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()),
+11
View File
@@ -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 {