Codex `UserPromptSubmit` hook handler. Resets the local counter and injects steering context for the new turn.
()
| 73 | /// |
| 74 | /// Resets the local counter and injects steering context for the new turn. |
| 75 | pub async fn hook_codex_user_prompt_submit() -> i32 { |
| 76 | let event = read_hook_event!(); |
| 77 | let root = codex_project_root_from_event(&event); |
| 78 | record_hook_invoked( |
| 79 | root.as_deref(), |
| 80 | HintAgent::Codex, |
| 81 | "UserPromptSubmit", |
| 82 | &event, |
| 83 | ); |
| 84 | reset_counter_for_codex_event(&event).await; |
| 85 | let context = codex_user_prompt_submit_context_for_event(&event).await; |
| 86 | println!( |
| 87 | "{}", |
| 88 | codex_additional_context_json("UserPromptSubmit", &context) |
| 89 | ); |
| 90 | 0 |
| 91 | } |
| 92 | |
| 93 | pub async fn codex_user_prompt_submit_context_for_event(event: &str) -> String { |
| 94 | let (mut context, status) = codex_session_context_for_event(event).await; |
no test coverage detected