Remove editor agent configs (Zed, KiloCode, VS Code, OpenClaw). */
| 4015 | |
| 4016 | /* Remove editor agent configs (Zed, KiloCode, VS Code, OpenClaw). */ |
| 4017 | static void uninstall_editor_agents(const cbm_detected_agents_t *agents, const char *home, |
| 4018 | bool dry_run) { |
| 4019 | if (agents->zed) { |
| 4020 | char cp[CLI_BUF_1K]; |
| 4021 | #ifdef __APPLE__ |
| 4022 | snprintf(cp, sizeof(cp), "%s/Library/Application Support/Zed/settings.json", home); |
| 4023 | #elif defined(_WIN32) |
| 4024 | snprintf(cp, sizeof(cp), "%s/Zed/settings.json", cbm_app_local_dir()); |
| 4025 | #else |
| 4026 | snprintf(cp, sizeof(cp), "%s/zed/settings.json", cbm_app_config_dir()); |
| 4027 | #endif |
| 4028 | uninstall_agent_mcp_instr((mcp_uninstall_args_t){"Zed", cp, NULL}, dry_run, |
| 4029 | cbm_remove_zed_mcp); |
| 4030 | } |
| 4031 | if (agents->kilocode) { |
| 4032 | char cp[CLI_BUF_1K]; |
| 4033 | char ip[CLI_BUF_1K]; |
| 4034 | #ifdef __APPLE__ |
| 4035 | snprintf(cp, sizeof(cp), |
| 4036 | "%s/Library/Application Support/Code/User/globalStorage/" |
| 4037 | "kilocode.kilo-code/settings/mcp_settings.json", |
| 4038 | home); |
| 4039 | #else |
| 4040 | snprintf(cp, sizeof(cp), |
| 4041 | "%s/Code/User/globalStorage/kilocode.kilo-code/settings/mcp_settings.json", |
| 4042 | cbm_app_config_dir()); |
| 4043 | #endif |
| 4044 | snprintf(ip, sizeof(ip), "%s/.kilocode/rules/codebase-memory-mcp.md", home); |
| 4045 | uninstall_agent_mcp_instr((mcp_uninstall_args_t){"KiloCode", cp, ip}, dry_run, |
| 4046 | cbm_remove_editor_mcp); |
| 4047 | } |
| 4048 | if (agents->vscode) { |
| 4049 | char cp[CLI_BUF_1K]; |
| 4050 | #ifdef __APPLE__ |
| 4051 | snprintf(cp, sizeof(cp), "%s/Library/Application Support/Code/User/mcp.json", home); |
| 4052 | #else |
| 4053 | snprintf(cp, sizeof(cp), "%s/Code/User/mcp.json", cbm_app_config_dir()); |
| 4054 | #endif |
| 4055 | uninstall_agent_mcp_instr((mcp_uninstall_args_t){"VS Code", cp, NULL}, dry_run, |
| 4056 | cbm_remove_vscode_mcp); |
| 4057 | } |
| 4058 | if (agents->cursor) { |
| 4059 | char cp[CLI_BUF_1K]; |
| 4060 | snprintf(cp, sizeof(cp), "%s/.cursor/mcp.json", home); |
| 4061 | uninstall_agent_mcp_instr((mcp_uninstall_args_t){"Cursor", cp, NULL}, dry_run, |
| 4062 | cbm_remove_editor_mcp); |
| 4063 | } |
| 4064 | if (agents->openclaw) { |
| 4065 | char cp[CLI_BUF_1K]; |
| 4066 | snprintf(cp, sizeof(cp), "%s/.openclaw/openclaw.json", home); |
| 4067 | uninstall_agent_mcp_instr((mcp_uninstall_args_t){"OpenClaw", cp, NULL}, dry_run, |
| 4068 | cbm_remove_openclaw_mcp); |
| 4069 | } |
| 4070 | if (agents->kiro) { |
| 4071 | char cp[CLI_BUF_1K]; |
| 4072 | snprintf(cp, sizeof(cp), "%s/.kiro/settings/mcp.json", home); |
| 4073 | uninstall_agent_mcp_instr((mcp_uninstall_args_t){"Kiro", cp, NULL}, dry_run, |
| 4074 | cbm_remove_editor_mcp); |
no test coverage detected