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

Function uninstall_vscode_profile_configs

src/cli/cli.c:8840–8866  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8838}
8839
8840static void uninstall_vscode_profile_configs(const char *code_user, const char *binary_path,
8841 bool dry_run) {
8842 char profiles_dir[CLI_BUF_1K];
8843 snprintf(profiles_dir, sizeof(profiles_dir), "%s/profiles", code_user);
8844 cbm_dir_t *directory = cbm_opendir(profiles_dir);
8845 if (!directory) {
8846 return;
8847 }
8848 cbm_dirent_t *entry;
8849 while ((entry = cbm_readdir(directory)) != NULL) {
8850 if (strcmp(entry->name, ".") == 0 || strcmp(entry->name, "..") == 0) {
8851 continue;
8852 }
8853 char profile_dir[CLI_BUF_1K];
8854 snprintf(profile_dir, sizeof(profile_dir), "%s/%s", profiles_dir, entry->name);
8855 struct stat state;
8856 if (stat(profile_dir, &state) != 0 || !S_ISDIR(state.st_mode)) {
8857 continue;
8858 }
8859 char config_path[CLI_BUF_1K];
8860 snprintf(config_path, sizeof(config_path), "%s/mcp.json", profile_dir);
8861 if (!dry_run && cbm_remove_vscode_mcp_owned(binary_path, config_path) != CLI_OK) {
8862 record_agent_config_error(true, "VS Code", "profile_mcp_uninstall", config_path);
8863 }
8864 }
8865 cbm_closedir(directory);
8866}
8867
8868/* Install MCP configs for editor-based agents (Zed, KiloCode, VS Code, OpenClaw). */
8869static 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