(scope: Option<JsScope>)
| 105 | } |
| 106 | |
| 107 | fn 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 | |
| 118 | fn to_napi_error(e: impl std::fmt::Display) -> napi::Error { |
| 119 | napi::Error::from_reason(e.to_string()) |
no outgoing calls
no test coverage detected