feat: Created a new .install command to install bundled assets on-demand

This commit is contained in:
2026-05-18 14:59:02 -06:00
parent 5bd0766a60
commit a3d67bfbf7
8 changed files with 222 additions and 18 deletions
+2 -2
View File
@@ -45,7 +45,7 @@ pub struct Agent {
}
impl Agent {
pub fn install_builtin_agents() -> Result<()> {
pub fn install_builtin_agents(force: bool) -> Result<()> {
info!(
"Installing built-in agents in {}",
paths::agents_data_dir().display()
@@ -65,7 +65,7 @@ impl Agent {
#[cfg_attr(not(unix), expect(unused))]
let is_script = matches!(file_extension.as_deref(), Some("sh") | Some("py"));
if file_path.exists() {
if file_path.exists() && !force {
debug!(
"Agent file already exists, skipping: {}",
file_path.display()