(home: &Path, tracedecay_bin: &str)
| 223 | } |
| 224 | |
| 225 | fn install_cursor_plugin(home: &Path, tracedecay_bin: &str) -> Result<()> { |
| 226 | let install_dir = cursor_plugin_install_dir(home); |
| 227 | if let Some(parent) = install_dir.parent() { |
| 228 | std::fs::create_dir_all(parent).map_err(|e| TraceDecayError::Config { |
| 229 | message: format!("failed to create {}: {e}", parent.display()), |
| 230 | })?; |
| 231 | } |
| 232 | remove_cursor_plugin_install(&install_dir)?; |
| 233 | |
| 234 | write_embedded_plugin(&install_dir, tracedecay_bin)?; |
| 235 | install_cursor_managed_skill_overlay(home, &install_dir)?; |
| 236 | eprintln!( |
| 237 | "\x1b[32m✔\x1b[0m Installed Cursor plugin at {}", |
| 238 | install_dir.display() |
| 239 | ); |
| 240 | Ok(()) |
| 241 | } |
| 242 | |
| 243 | fn install_cursor_managed_skill_overlay(home: &Path, install_dir: &Path) -> Result<()> { |
| 244 | let profile_root = crate::automation::skill_targets::profile_root_for_agent_home(home); |
no test coverage detected