* @brief Returns the metadata block for an assistant.* tool, or empty if none matches. */
| 645 | * @brief Returns the metadata block for an assistant.* tool, or empty if none matches. |
| 646 | */ |
| 647 | static QJsonObject assistantToolDescription(const QString& name) |
| 648 | { |
| 649 | for (const auto& def : assistantToolDefs()) { |
| 650 | if (def.name != name) |
| 651 | continue; |
| 652 | |
| 653 | QJsonObject desc; |
| 654 | desc[QStringLiteral("name")] = def.name; |
| 655 | desc[QStringLiteral("description")] = def.description; |
| 656 | desc[QStringLiteral("inputSchema")] = def.inputSchema; |
| 657 | return desc; |
| 658 | } |
| 659 | |
| 660 | return {}; |
| 661 | } |
| 662 | |
| 663 | /** |
| 664 | * @brief Executes an API command and wraps its response into an {ok,result|error} envelope. |
no test coverage detected