MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / uninstall_vscode_profile_configs

Function uninstall_vscode_profile_configs

src/cli/cli.c:8477–8503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8475}
8476
8477static void uninstall_vscode_profile_configs(const char *code_user, const char *binary_path,
8478 bool dry_run) {
8479 char profiles_dir[CLI_BUF_1K];
8480 snprintf(profiles_dir, sizeof(profiles_dir), "%s/profiles", code_user);
8481 cbm_dir_t *directory = cbm_opendir(profiles_dir);
8482 if (!directory) {
8483 return;
8484 }
8485 cbm_dirent_t *entry;
8486 while ((entry = cbm_readdir(directory)) != NULL) {
8487 if (strcmp(entry->name, ".") == 0 || strcmp(entry->name, "..") == 0) {
8488 continue;
8489 }
8490 char profile_dir[CLI_BUF_1K];
8491 snprintf(profile_dir, sizeof(profile_dir), "%s/%s", profiles_dir, entry->name);
8492 struct stat state;
8493 if (stat(profile_dir, &state) != 0 || !S_ISDIR(state.st_mode)) {
8494 continue;
8495 }
8496 char config_path[CLI_BUF_1K];
8497 snprintf(config_path, sizeof(config_path), "%s/mcp.json", profile_dir);
8498 if (!dry_run && cbm_remove_vscode_mcp_owned(binary_path, config_path) != CLI_OK) {
8499 record_agent_config_error(true, "VS Code", "profile_mcp_uninstall", config_path);
8500 }
8501 }
8502 cbm_closedir(directory);
8503}
8504
8505/* Install MCP configs for editor-based agents (Zed, KiloCode, VS Code, OpenClaw). */
8506static void install_editor_agent_configs(const cbm_detected_agents_t *agents, const char *home,

Callers 1

uninstall_editor_agentsFunction · 0.85

Calls 6

cbm_opendirFunction · 0.85
cbm_readdirFunction · 0.85
cbm_closedirFunction · 0.85
statClass · 0.70

Tested by

no test coverage detected