Codex `PostCompact` hook handler. Replaces temporary compaction summaries from visible LCM source messages.
()
| 189 | /// |
| 190 | /// Replaces temporary compaction summaries from visible LCM source messages. |
| 191 | pub async fn hook_codex_post_compact() -> i32 { |
| 192 | let event = read_hook_event!(); |
| 193 | let root = codex_project_root_from_event(&event); |
| 194 | record_hook_invoked(root.as_deref(), HintAgent::Codex, "PostCompact", &event); |
| 195 | if std::env::var_os(crate::sessions::codex_app_server::CODEX_SUMMARY_CHILD_ENV).is_none() { |
| 196 | codex_post_compact(&event).await; |
| 197 | } |
| 198 | println!("{}", serde_json::json!({})); |
| 199 | 0 |
| 200 | } |
| 201 | |
| 202 | /// Builds a Codex hook stdout payload with `additionalContext`. |
| 203 | pub fn codex_additional_context_json(event_name: &str, additional_context: &str) -> String { |
no test coverage detected