feat: support multiple skill flags to load multiple skills at CLI startup

This commit is contained in:
2026-06-01 14:27:40 -06:00
parent d927a9b99f
commit c63eb0a9f9
2 changed files with 24 additions and 8 deletions
+10 -4
View File
@@ -197,13 +197,19 @@ async fn run(
println!("{skills}");
return Ok(());
}
if let Some(name) = &cli.skill
&& !paths::has_skill(name)
{
if cli.skill.len() == 1 && !paths::has_skill(&cli.skill[0]) {
let name = &cli.skill[0];
let app = Arc::clone(&ctx.app.config);
ctx.upsert_skill(app.as_ref(), name)?;
return Ok(());
}
if cli.skill.len() > 1 {
for name in &cli.skill {
if !paths::has_skill(name) {
bail!("Skill '{name}' is not installed");
}
}
}
if cli.dry_run {
update_app_config(&mut ctx, |app| app.dry_run = true);
@@ -317,7 +323,7 @@ async fn run(
.await?;
}
if let Some(name) = &cli.skill {
for name in &cli.skill {
ctx.load_skill_repl(name, abort_signal.clone()).await?;
}