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

Function codex_project_root_from_event

src/hooks/codex.rs:405–408  ·  view source on GitHub ↗

Resolves the tracedecay project root for a Codex event from its `cwd`.

(event_json: &str)

Source from the content-addressed store, hash-verified

403
404/// Resolves the tracedecay project root for a Codex event from its `cwd`.
405pub fn codex_project_root_from_event(event_json: &str) -> Option<PathBuf> {
406 let parsed: Value = serde_json::from_str(event_json).ok()?;
407 codex_project_root_from_parsed_event(&parsed)
408}
409
410pub(super) fn codex_project_root_from_parsed_event(parsed: &Value) -> Option<PathBuf> {
411 let cwd = event_cwd_from_parsed(parsed)?;

Callers 15

hook_codex_session_startFunction · 0.85
hook_codex_post_tool_useFunction · 0.85
hook_codex_post_compactFunction · 0.85
codex_post_compactFunction · 0.85
deduped_codex_hintFunction · 0.85
codex_prompt_hintFunction · 0.85
hook_kiro_pre_tool_useFunction · 0.85
hook_kiro_prompt_submitFunction · 0.85

Tested by

no test coverage detected