MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / new

Method new

atomic-agent/src/event.rs:337–348  ·  view source on GitHub ↗

Create a new `TurnEvent` with the required fields. The timestamp is set to `Utc::now()`. Use [`with_timestamp`](Self::with_timestamp) to override.

(session_id: impl Into<String>, event_type: HookType)

Source from the content-addressed store, hash-verified

335 /// The timestamp is set to `Utc::now()`. Use [`with_timestamp`](Self::with_timestamp)
336 /// to override.
337 pub fn new(session_id: impl Into<String>, event_type: HookType) -> Self {
338 Self {
339 session_id: session_id.into(),
340 event_type,
341 transcript_path: None,
342 prompt: None,
343 tool_name: None,
344 tool_use_id: None,
345 timestamp: Utc::now(),
346 raw_json: None,
347 }
348 }
349
350 /// Set the transcript path.
351 #[must_use]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected