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

Function cbm_upsert_gemini_session_hooks

src/cli/cli.c:5500–5519  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5498};
5499
5500int cbm_upsert_gemini_session_hooks(const char *settings_path) {
5501 static const char *const matchers[] = {"startup", "resume", "clear"};
5502 int rc = CLI_OK;
5503 for (size_t i = 0U; i < sizeof(matchers) / sizeof(matchers[0]); i++) {
5504 const char *const *old_matchers = i == 0U ? cmm_gemini_session_old_matchers : NULL;
5505 if (upsert_hooks_json((hooks_upsert_args_t){
5506 .settings_path = settings_path,
5507 .hook_event = "SessionStart",
5508 .matcher_str = matchers[i],
5509 .command_str = GEMINI_SESSION_COMMAND,
5510 .old_matchers = old_matchers,
5511 .old_commands = cmm_gemini_released_session_commands,
5512 .timeout_value = GEMINI_HOOK_TIMEOUT_MS,
5513 .match_command_exact = GEMINI_SESSION_COMMAND,
5514 }) != CLI_OK) {
5515 rc = CLI_ERR;
5516 }
5517 }
5518 return rc;
5519}
5520
5521int cbm_remove_gemini_session_hooks(const char *settings_path) {
5522 static const char *const matchers[] = {"startup", "resume", "clear"};

Callers 2

install_gemini_configFunction · 0.85
test_cli.cFile · 0.85

Calls 1

upsert_hooks_jsonFunction · 0.85

Tested by

no test coverage detected