* @brief Returns the concatenation of all scripting reference docs. */
| 760 | * @brief Returns the concatenation of all scripting reference docs. |
| 761 | */ |
| 762 | QString AI::ContextBuilder::scriptingDocsBlock() |
| 763 | { |
| 764 | static const QStringList kKinds = { |
| 765 | QStringLiteral("frame_parser_js"), |
| 766 | QStringLiteral("frame_parser_lua"), |
| 767 | QStringLiteral("transform_js"), |
| 768 | QStringLiteral("transform_lua"), |
| 769 | QStringLiteral("output_widget_js"), |
| 770 | QStringLiteral("painter_js"), |
| 771 | }; |
| 772 | |
| 773 | QString out; |
| 774 | out.reserve(48 * 1024); |
| 775 | out += QStringLiteral("# Scripting reference\n\n"); |
| 776 | for (const auto& kind : kKinds) { |
| 777 | const auto path = QStringLiteral(":/ai/docs/%1.md").arg(kind); |
| 778 | const auto body = readResource(path); |
| 779 | if (body.isEmpty()) |
| 780 | continue; |
| 781 | |
| 782 | out += QStringLiteral("\n---\n"); |
| 783 | out += body; |
| 784 | out += QStringLiteral("\n"); |
| 785 | } |
| 786 | return out; |
| 787 | } |
| 788 | |
| 789 | /** |
| 790 | * @brief Returns the current project state assembled from safe list commands. |
nothing calls this directly
no test coverage detected