Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
baxen committed Jan 17, 2025
1 parent 43e74e7 commit e90f66d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions crates/goose-cli/src/commands/configure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ pub fn toggle_systems_dialog() -> Result<(), Box<dyn Error>> {
// Let user toggle systems
let selected =
cliclack::multiselect("enable systems: (use \"space\" to toggle and \"enter\" to submit)")
.required(false)
.items(
&system_status
.iter()
Expand Down
10 changes: 9 additions & 1 deletion crates/goose-cli/src/commands/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,17 @@ pub async fn build_session<'a>(
);
}

let config = Config::load().unwrap_or_else(|_| {
let config_path = Config::config_path().expect("should identify default config path");

if !config_path.exists() {
println!("No configuration found. Please run 'goose configure' first.");
process::exit(1);
}

let config = Config::load().unwrap_or_else(|_| {
println!("The loaded configuration from {} was invalid", config_path.display());
println!(" please edit the file to make it valid or consider deleting and recreating it via `goose configure`");
process::exit(1);
});

let (provider_name, model_name) = get_provider_and_model(provider, model, &config);
Expand Down

0 comments on commit e90f66d

Please sign in to comment.