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

Function cbm_remove_qwen_lifecycle_hooks

src/cli/cli.c:5681–5704  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5679}
5680
5681static int cbm_remove_qwen_lifecycle_hooks(const char *settings_path, const char *binary_path,
5682 bool windows) {
5683 char command[CLI_BUF_8K];
5684 char released_command[CLI_BUF_8K];
5685 char shell[CLI_BUF_32];
5686 if (cbm_build_qwen_hook_command(binary_path, windows, command, sizeof(command), shell,
5687 sizeof(shell)) != CLI_OK ||
5688 (windows ? cbm_build_augment_command_windows(binary_path, released_command,
5689 sizeof(released_command))
5690 : cbm_build_augment_command(binary_path, released_command,
5691 sizeof(released_command))) != CLI_OK) {
5692 return CLI_ERR;
5693 }
5694 int lifecycle_result = cbm_remove_paired_lifecycle_hooks_json(settings_path, command);
5695 int legacy_result = cbm_remove_paired_lifecycle_hooks_json(settings_path, released_command);
5696 int read_result = remove_hooks_json((hooks_remove_args_t){
5697 .settings_path = settings_path,
5698 .hook_event = "PostToolUse",
5699 .matcher_str = "ReadFile",
5700 .match_command_exact = command,
5701 });
5702 return lifecycle_result == CLI_OK && legacy_result == CLI_OK && read_result == CLI_OK ? CLI_OK
5703 : CLI_ERR;
5704}
5705
5706static int cbm_upsert_factory_hooks(const char *settings_path, const char *binary_path) {
5707 char command[CLI_BUF_8K];

Callers 1

Tested by

no test coverage detected