Check if a function name is in the allowed tools list.
| 43 | |
| 44 | static std::string generate_call_id() { |
| 45 | static std::mutex rng_mu; |
| 46 | static std::mt19937_64 rng(std::random_device{}()); |
| 47 | static const char hex[] = "0123456789abcdef"; |
| 48 | std::string id = "call_"; |
| 49 | std::lock_guard<std::mutex> lk(rng_mu); |
| 50 | for (int i = 0; i < 24; i++) { |
| 51 | id += hex[rng() % 16]; |
| 52 | } |
| 53 | return id; |
| 54 | } |
| 55 |
no test coverage detected