fix(cli): respect config default_temperature

Fixes #452 - CLI now respects config.default_temperature

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Argenis 2026-02-16 20:08:00 -05:00 committed by GitHub
parent e8553a800a
commit b2facc7526
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -136,9 +136,9 @@ enum Commands {
#[arg(long)] #[arg(long)]
model: Option<String>, model: Option<String>,
/// Temperature (0.0 - 2.0) /// Temperature (0.0 - 2.0); defaults to config default_temperature
#[arg(short, long, default_value = "0.7")] #[arg(short, long)]
temperature: f64, temperature: Option<f64>,
/// Attach a peripheral (board:path, e.g. nucleo-f401re:/dev/ttyACM0) /// Attach a peripheral (board:path, e.g. nucleo-f401re:/dev/ttyACM0)
#[arg(long)] #[arg(long)]
@ -400,7 +400,10 @@ async fn main() -> Result<()> {
model, model,
temperature, temperature,
peripheral, peripheral,
} => agent::run(config, message, provider, model, temperature, peripheral).await, } => {
let temp = temperature.unwrap_or(config.default_temperature);
agent::run(config, message, provider, model, temp, peripheral).await
}
Commands::Gateway { port, host } => { Commands::Gateway { port, host } => {
if port == 0 { if port == 0 {