(&self, ctx: &InstallContext)
| 31 | } |
| 32 | |
| 33 | fn install(&self, ctx: &InstallContext) -> Result<()> { |
| 34 | let vscode_settings_path = super::vscode_data_dir(&ctx.home).join("User/settings.json"); |
| 35 | let cli_settings_path = super::copilot_cli_dir(&ctx.home).join("mcp-config.json"); |
| 36 | |
| 37 | install_vscode_mcp_server(&vscode_settings_path, &ctx.tracedecay_bin)?; |
| 38 | let insiders_settings_path = |
| 39 | super::vscode_insiders_data_dir(&ctx.home).join("User/settings.json"); |
| 40 | if insiders_settings_path |
| 41 | .parent() |
| 42 | .is_some_and(std::path::Path::exists) |
| 43 | { |
| 44 | install_vscode_mcp_server(&insiders_settings_path, &ctx.tracedecay_bin)?; |
| 45 | } |
| 46 | install_cli_mcp_server(&cli_settings_path, &ctx.tracedecay_bin)?; |
| 47 | |
| 48 | // Install prompt rules |
| 49 | let vscode_instructions = |
| 50 | super::vscode_data_dir(&ctx.home).join("User/prompts/copilot-instructions.md"); |
| 51 | install_prompt_rules(&vscode_instructions)?; |
| 52 | super::install_managed_skill_prompt_index( |
| 53 | &ctx.home, |
| 54 | &vscode_instructions, |
| 55 | crate::automation::skill_targets::SkillInstallTarget::Agents, |
| 56 | )?; |
| 57 | let insiders_instructions = |
| 58 | super::vscode_insiders_data_dir(&ctx.home).join("User/prompts/copilot-instructions.md"); |
| 59 | if super::vscode_insiders_data_dir(&ctx.home) |
| 60 | .join("User") |
| 61 | .exists() |
| 62 | { |
| 63 | install_prompt_rules(&insiders_instructions)?; |
| 64 | super::install_managed_skill_prompt_index( |
| 65 | &ctx.home, |
| 66 | &insiders_instructions, |
| 67 | crate::automation::skill_targets::SkillInstallTarget::Agents, |
| 68 | )?; |
| 69 | } |
| 70 | let cli_instructions = super::copilot_cli_dir(&ctx.home).join("copilot-instructions.md"); |
| 71 | install_prompt_rules(&cli_instructions)?; |
| 72 | super::install_managed_skill_prompt_index( |
| 73 | &ctx.home, |
| 74 | &cli_instructions, |
| 75 | crate::automation::skill_targets::SkillInstallTarget::Agents, |
| 76 | )?; |
| 77 | |
| 78 | eprintln!(); |
| 79 | eprintln!("Setup complete. Next steps:"); |
| 80 | eprintln!(" 1. cd into your project and run: tracedecay init"); |
| 81 | eprintln!(" 2. Restart VS Code and/or start a new Copilot CLI session"); |
| 82 | eprintln!(" tracedecay tools are now available in GitHub Copilot"); |
| 83 | Ok(()) |
| 84 | } |
| 85 | |
| 86 | fn supports_local_install(&self) -> bool { |
| 87 | true |
nothing calls this directly
no test coverage detected