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