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

Function uninstall_copilot_durable_context

src/cli/cli.c:9899–9924  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9897}
9898
9899static void uninstall_copilot_durable_context(const char *home, bool dry_run) {
9900 char config_dir[CLI_BUF_1K];
9901 char hook_path[CLI_BUF_1K];
9902 char skills_dir[CLI_BUF_1K];
9903 char agent_path[CLI_BUF_1K];
9904 char binary_path[CLI_BUF_1K];
9905 cbm_copilot_config_dir(home, config_dir, sizeof(config_dir));
9906 snprintf(hook_path, sizeof(hook_path), "%s/hooks/codebase-memory-mcp.json", config_dir);
9907 snprintf(skills_dir, sizeof(skills_dir), "%s/skills", config_dir);
9908 snprintf(agent_path, sizeof(agent_path), "%s/agents/codebase-memory.agent.md", config_dir);
9909 cbm_agent_installed_binary_path(home, binary_path, sizeof(binary_path));
9910 if (!dry_run && cbm_remove_copilot_hooks(hook_path, binary_path) != CLI_OK) {
9911 record_agent_config_error(true, "Copilot", "lifecycle_hook_uninstall", hook_path);
9912 }
9913 uninstall_agent_skill("Copilot", skills_dir, dry_run);
9914 uninstall_tiered_agent_profiles(
9915 (cbm_tiered_profile_set_t){
9916 .label = "Copilot",
9917 .verify_path = agent_path,
9918 .binary_path = binary_path,
9919 .legacy_verify_content = legacy_copilot_verify_agent_content,
9920 .dialect = CBM_GRAPH_DIALECT_COPILOT,
9921 },
9922 dry_run);
9923 printf(" removed SessionStart + SubagentStart hooks\n");
9924}
9925
9926static int cbm_remove_managed_instructions(const char *instructions_path) {
9927 if (cbm_remove_instructions(instructions_path) != CLI_OK) {

Callers 1

Calls 6

cbm_copilot_config_dirFunction · 0.85
cbm_remove_copilot_hooksFunction · 0.85
uninstall_agent_skillFunction · 0.85

Tested by

no test coverage detected