MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / scriptingDocsBlock

Method scriptingDocsBlock

app/src/AI/ContextBuilder.cpp:762–787  ·  view source on GitHub ↗

* @brief Returns the concatenation of all scripting reference docs. */

Source from the content-addressed store, hash-verified

760 * @brief Returns the concatenation of all scripting reference docs.
761 */
762QString 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.

Callers

nothing calls this directly

Calls 2

readResourceFunction · 0.85
isEmptyMethod · 0.80

Tested by

no test coverage detected