| 24 | const ::agenui::FunctionCallContext&, const std::string&)>; |
| 25 | |
| 26 | ::agenui::FunctionCallResult callSync( |
| 27 | const ::agenui::FunctionCallContext& context, |
| 28 | const std::string& params) override { |
| 29 | { |
| 30 | std::lock_guard<std::mutex> lock(mutex_); |
| 31 | calls_.push_back({context, params}); |
| 32 | } |
| 33 | ++callCount_; |
| 34 | if (handler_) { |
| 35 | return handler_(context, params); |
| 36 | } |
| 37 | ::agenui::FunctionCallResult res; |
| 38 | res.status = ::agenui::FunctionCallStatus::Success; |
| 39 | res.data = "{}"; |
| 40 | return res; |
| 41 | } |
| 42 | |
| 43 | void setHandler(CallSyncHandler handler) { |
| 44 | std::lock_guard<std::mutex> lock(mutex_); |
nothing calls this directly
no outgoing calls
no test coverage detected