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:5625–5648  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5623}
5624
5625static int cbm_remove_qwen_lifecycle_hooks(const char *settings_path, const char *binary_path,
5626 bool windows) {
5627 char command[CLI_BUF_8K];
5628 char released_command[CLI_BUF_8K];
5629 char shell[CLI_BUF_32];
5630 if (cbm_build_qwen_hook_command(binary_path, windows, command, sizeof(command), shell,
5631 sizeof(shell)) != CLI_OK ||
5632 (windows ? cbm_build_augment_command_windows(binary_path, released_command,
5633 sizeof(released_command))
5634 : cbm_build_augment_command(binary_path, released_command,
5635 sizeof(released_command))) != CLI_OK) {
5636 return CLI_ERR;
5637 }
5638 int lifecycle_result = cbm_remove_paired_lifecycle_hooks_json(settings_path, command);
5639 int legacy_result = cbm_remove_paired_lifecycle_hooks_json(settings_path, released_command);
5640 int read_result = remove_hooks_json((hooks_remove_args_t){
5641 .settings_path = settings_path,
5642 .hook_event = "PostToolUse",
5643 .matcher_str = "ReadFile",
5644 .match_command_exact = command,
5645 });
5646 return lifecycle_result == CLI_OK && legacy_result == CLI_OK && read_result == CLI_OK ? CLI_OK
5647 : CLI_ERR;
5648}
5649
5650static int cbm_upsert_factory_hooks(const char *settings_path, const char *binary_path) {
5651 char command[CLI_BUF_8K];

Callers 1

Tested by

no test coverage detected