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

Method with_environment

atomic-agent/src/hook_log.rs:45–53  ·  view source on GitHub ↗
(mut self)

Source from the content-addressed store, hash-verified

43 }
44
45 fn with_environment(mut self) -> Self {
46 self.session_id = self
47 .session_id
48 .or_else(|| usable(std::env::var("ATOMIC_SESSION_ID").ok().as_deref()));
49 self.parent_session_id = self
50 .parent_session_id
51 .or_else(|| usable(std::env::var("ATOMIC_PARENT_SESSION_ID").ok().as_deref()));
52 self
53 }
54
55 fn from_json(value: Option<&serde_json::Value>) -> Self {
56 fn field(value: Option<&serde_json::Value>, names: &[&str]) -> Option<String> {

Callers 2

from_inputMethod · 0.80
from_eventMethod · 0.80

Calls 2

usableFunction · 0.85
okMethod · 0.45

Tested by

no test coverage detected