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

Function uninstall_tiered_profile_prompts

src/cli/cli.c:8025–8057  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8023}
8024
8025static void uninstall_tiered_profile_prompts(const char *label, const char *verify_path,
8026 cbm_graph_profile_dialect_t dialect,
8027 const char *legacy_verify_content, bool dry_run) {
8028 cbm_graph_access_t access = cbm_tiered_profile_access(dialect);
8029 for (int value = 0; value < (int)CBM_GRAPH_TIER_COUNT; value++) {
8030 cbm_graph_tier_t tier = (cbm_graph_tier_t)value;
8031 char path[CLI_BUF_1K];
8032 if (cbm_tiered_profile_path(verify_path, tier, path, sizeof(path)) != CLI_OK) {
8033 record_agent_config_error(true, label, "prompt_path", verify_path);
8034 continue;
8035 }
8036 if (dry_run) {
8037 printf(" %s prompt: would remove owned profile %s\n", label, path);
8038 continue;
8039 }
8040 char *current = cbm_render_graph_prompt(tier, access);
8041 if (!current) {
8042 record_agent_config_error(true, label, "prompt_render", path);
8043 continue;
8044 }
8045 const char *released[] = {legacy_verify_content};
8046 size_t released_count = tier == CBM_GRAPH_TIER_VERIFY && legacy_verify_content ? 1U : 0U;
8047 int result = cbm_text_remove_owned_document_any(path, current, released, released_count);
8048 free(current);
8049 if (result < CLI_OK) {
8050 record_agent_config_error(true, label, "prompt_uninstall", path);
8051 } else if (result > CLI_OK) {
8052 printf(" %s prompt: preserved modified profile %s\n", label, path);
8053 } else {
8054 printf(" %s prompt: removed owned profile %s\n", label, path);
8055 }
8056 }
8057}
8058
8059static void install_copilot_durable_context(const char *home, const char *binary_path, bool force,
8060 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