MCPcopy Create free account
hub / github.com/InfinitiBit/graphbit / js_scope_to_core

Function js_scope_to_core

javascript/src/lib.rs:107–116  ·  view source on GitHub ↗
(scope: Option<JsScope>)

Source from the content-addressed store, hash-verified

105}
106
107fn js_scope_to_core(scope: Option<JsScope>) -> graphbit_core::memory::MemoryScope {
108 match scope {
109 Some(s) => graphbit_core::memory::MemoryScope {
110 user_id: s.user_id,
111 agent_id: s.agent_id,
112 run_id: s.run_id,
113 },
114 None => graphbit_core::memory::MemoryScope::default(),
115 }
116}
117
118fn to_napi_error(e: impl std::fmt::Display) -> napi::Error {
119 napi::Error::from_reason(e.to_string())

Callers 4

addMethod · 0.85
searchMethod · 0.85
get_allMethod · 0.85
delete_allMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected