Parse the common base fields and build a TurnEvent with the session ID and transcript path populated.
(
&self,
hook_type: HookType,
conversation_id: Option<String>,
transcript_path: Option<String>,
)
| 731 | /// Parse the common base fields and build a TurnEvent with the session |
| 732 | /// ID and transcript path populated. |
| 733 | fn base_event( |
| 734 | &self, |
| 735 | hook_type: HookType, |
| 736 | conversation_id: Option<String>, |
| 737 | transcript_path: Option<String>, |
| 738 | ) -> TurnEvent { |
| 739 | let session_id = conversation_id |
| 740 | .filter(|s| !s.is_empty()) |
| 741 | .unwrap_or_else(|| "unknown".to_string()); |
| 742 | |
| 743 | let mut event = TurnEvent::new(&session_id, hook_type); |
| 744 | if let Some(path) = transcript_path { |
| 745 | event = event.with_transcript_path(path); |
| 746 | } |
| 747 | event |
| 748 | } |
| 749 | |
| 750 | /// Remove the Atomic hook group from a legacy project-level |
| 751 | /// `.agents/hooks.json`, if one exists from an older Atomic release. |
no test coverage detected