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

Function value_at

atomic-agent/src/hooks/hermes.rs:183–189  ·  view source on GitHub ↗
(raw: &Value, path: &[&str])

Source from the content-addressed store, hash-verified

181}
182
183fn value_at(raw: &Value, path: &[&str]) -> Option<String> {
184 let mut current = raw;
185 for key in path {
186 current = current.get(*key)?;
187 }
188 current.as_str().map(ToOwned::to_owned)
189}
190
191fn with_hermes_provider(mut raw: Value) -> Value {
192 if let Value::Object(ref mut map) = raw {

Callers 5

extract_session_idMethod · 0.85
extract_promptMethod · 0.85
extract_tool_nameMethod · 0.85
extract_tool_use_idMethod · 0.85

Calls 2

getMethod · 0.65
as_strMethod · 0.45

Tested by

no test coverage detected