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

Function uninstall_tiered_profile_prompts

src/cli/cli.c:7723–7755  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7721}
7722
7723static void uninstall_tiered_profile_prompts(const char *label, const char *verify_path,
7724 cbm_graph_profile_dialect_t dialect,
7725 const char *legacy_verify_content, bool dry_run) {
7726 cbm_graph_access_t access = cbm_tiered_profile_access(dialect);
7727 for (int value = 0; value < (int)CBM_GRAPH_TIER_COUNT; value++) {
7728 cbm_graph_tier_t tier = (cbm_graph_tier_t)value;
7729 char path[CLI_BUF_1K];
7730 if (cbm_tiered_profile_path(verify_path, tier, path, sizeof(path)) != CLI_OK) {
7731 record_agent_config_error(true, label, "prompt_path", verify_path);
7732 continue;
7733 }
7734 if (dry_run) {
7735 printf(" %s prompt: would remove owned profile %s\n", label, path);
7736 continue;
7737 }
7738 char *current = cbm_render_graph_prompt(tier, access);
7739 if (!current) {
7740 record_agent_config_error(true, label, "prompt_render", path);
7741 continue;
7742 }
7743 const char *released[] = {legacy_verify_content};
7744 size_t released_count = tier == CBM_GRAPH_TIER_VERIFY && legacy_verify_content ? 1U : 0U;
7745 int result = cbm_text_remove_owned_document_any(path, current, released, released_count);
7746 free(current);
7747 if (result < CLI_OK) {
7748 record_agent_config_error(true, label, "prompt_uninstall", path);
7749 } else if (result > CLI_OK) {
7750 printf(" %s prompt: preserved modified profile %s\n", label, path);
7751 } else {
7752 printf(" %s prompt: removed owned profile %s\n", label, path);
7753 }
7754 }
7755}
7756
7757static void install_copilot_durable_context(const char *home, const char *binary_path, bool force,
7758 bool dry_run) {

Callers 1

Calls 5

cbm_tiered_profile_pathFunction · 0.85
cbm_render_graph_promptFunction · 0.85

Tested by

no test coverage detected