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

Function skillForCommand

app/src/AI/Conversation.cpp:720–752  ·  view source on GitHub ↗

* @brief Returns the skill id whose body documents @a commandName, or empty. */

Source from the content-addressed store, hash-verified

718 * @brief Returns the skill id whose body documents @a commandName, or empty.
719 */
720static QString skillForCommand(const QString& commandName)
721{
722 if (commandName.startsWith(QStringLiteral("project.workspace."))
723 || commandName == QStringLiteral("project.dataset.setOption")
724 || commandName == QStringLiteral("project.dataset.setOptions"))
725 return QStringLiteral("dashboard_layout");
726
727 if (commandName.startsWith(QStringLiteral("project.frameParser.")))
728 return QStringLiteral("frame_parsers");
729
730 if (commandName.startsWith(QStringLiteral("project.painter.")))
731 return QStringLiteral("painter");
732
733 if (commandName.startsWith(QStringLiteral("project.outputWidget.")))
734 return QStringLiteral("output_widgets");
735
736 if (commandName == QStringLiteral("project.dataset.setTransformCode")
737 || commandName == QStringLiteral("project.dataset.transform.dryRun")
738 || commandName.startsWith(QStringLiteral("project.dataTable.")))
739 return QStringLiteral("transforms");
740
741 if (commandName.startsWith(QStringLiteral("project.mqtt.")))
742 return QStringLiteral("mqtt");
743
744 if (commandName.startsWith(QStringLiteral("io.canbus."))
745 || commandName.startsWith(QStringLiteral("io.modbus.")))
746 return QStringLiteral("can_modbus");
747
748 if (commandName.startsWith(QStringLiteral("project.")))
749 return QStringLiteral("project_basics");
750
751 return QString();
752}
753
754/**
755 * @brief meta.describeCommand handler: returns command schema or not_found.

Callers 1

runMetaDescribeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected