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

Function cbm_remove_gemini_session_hooks

src/cli/cli.c:5515–5532  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5513}
5514
5515int cbm_remove_gemini_session_hooks(const char *settings_path) {
5516 static const char *const matchers[] = {"startup", "resume", "clear"};
5517 int rc = CLI_OK;
5518 for (size_t i = 0U; i < sizeof(matchers) / sizeof(matchers[0]); i++) {
5519 const char *const *old_matchers = i == 0U ? cmm_gemini_session_old_matchers : NULL;
5520 if (remove_hooks_json((hooks_remove_args_t){
5521 .settings_path = settings_path,
5522 .hook_event = "SessionStart",
5523 .matcher_str = matchers[i],
5524 .old_matchers = old_matchers,
5525 .old_commands = cmm_gemini_released_session_commands,
5526 .match_command_exact = GEMINI_SESSION_COMMAND,
5527 }) != CLI_OK) {
5528 rc = CLI_ERR;
5529 }
5530 }
5531 return rc;
5532}
5533
5534static int cbm_upsert_paired_lifecycle_hooks_json(const char *settings_path, const char *command,
5535 const char *command_windows, const char *shell,

Callers 4

uninstall_gemini_configFunction · 0.85
uninstall_cli_agentsFunction · 0.85
test_cli.cFile · 0.85

Calls 1

remove_hooks_jsonFunction · 0.85

Tested by

no test coverage detected