MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / hook_codex_user_prompt_submit

Function hook_codex_user_prompt_submit

src/hooks/codex.rs:75–91  ·  view source on GitHub ↗

Codex `UserPromptSubmit` hook handler. Resets the local counter and injects steering context for the new turn.

()

Source from the content-addressed store, hash-verified

73///
74/// Resets the local counter and injects steering context for the new turn.
75pub 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
93pub async fn codex_user_prompt_submit_context_for_event(event: &str) -> String {
94 let (mut context, status) = codex_session_context_for_event(event).await;

Callers 1

handle_hook_commandFunction · 0.85

Tested by

no test coverage detected