Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions crates/goose-cli/src/session/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ use super::CliSession;
use console::style;
use goose::agents::types::{RetryConfig, SessionConfig};
use goose::agents::Agent;
use goose::config::paths::Paths;
use goose::config::{
extensions::get_extension_by_name, get_all_extensions, get_enabled_extensions, Config,
ExtensionConfig,
};
use goose::providers::create;
use goose::recipe::{Response, SubRecipe};
use goose::scheduler::Scheduler;

use goose::agents::extension::PlatformExtensionContext;
use goose::session::session_manager::SessionType;
Expand Down Expand Up @@ -301,6 +303,16 @@ pub async fn build_session(session_config: SessionBuilderConfig) -> CliSession {

let agent: Agent = Agent::new();

let schedule_file_path = Paths::data_dir().join("schedule.json");
match Scheduler::new(schedule_file_path).await {
Ok(scheduler) => {
agent.set_scheduler(scheduler).await;
}
Err(e) => {
tracing::warn!("Failed to initialize scheduler: {}", e);
}
}

agent
.apply_recipe_components(
session_config.sub_recipes,
Expand Down
Loading