| 6406 | } |
| 6407 | |
| 6408 | int cbm_remove_gemini_session_hooks(const char *settings_path) { |
| 6409 | static const char *const matchers[] = {"startup", "resume", "clear"}; |
| 6410 | int rc = CLI_OK; |
| 6411 | for (size_t i = 0U; i < sizeof(matchers) / sizeof(matchers[0]); i++) { |
| 6412 | const char *const *old_matchers = i == 0U ? cmm_gemini_session_old_matchers : NULL; |
| 6413 | if (remove_hooks_json((hooks_remove_args_t){ |
| 6414 | .settings_path = settings_path, |
| 6415 | .hook_event = "SessionStart", |
| 6416 | .matcher_str = matchers[i], |
| 6417 | .old_matchers = old_matchers, |
| 6418 | .old_commands = cmm_gemini_released_session_commands, |
| 6419 | .match_command_exact = GEMINI_SESSION_COMMAND, |
| 6420 | }) != CLI_OK) { |
| 6421 | rc = CLI_ERR; |
| 6422 | } |
| 6423 | } |
| 6424 | return rc; |
| 6425 | } |
| 6426 | |
| 6427 | static int cbm_upsert_paired_lifecycle_hooks_json(const char *settings_path, const char *command, |
| 6428 | const char *command_windows, const char *shell, |
no test coverage detected