| 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; |
| 95 | if !matches!(status, HookWorkspaceStatus::Generic) { |
| 96 | if let Some(hint) = codex_prompt_hint(event) { |
| 97 | append_tool_hint(&mut context, &hint); |
| 98 | } |
| 99 | if let Some(recall) = codex_prompt_memory_recall(event).await { |
| 100 | append_context_block(&mut context, &recall); |
| 101 | } |
| 102 | } |
| 103 | context |
| 104 | } |
| 105 | |
| 106 | async fn codex_prompt_memory_recall(event_json: &str) -> Option<String> { |
| 107 | let parsed = serde_json::from_str::<Value>(event_json).ok()?; |