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

Function seedEndToEndDryArgs

app/src/AI/ToolDispatcher.cpp:1133–1149  ·  view source on GitHub ↗

* @brief Populates end-to-end dry-run inputs, copying optional source / sample / verbose keys. */

Source from the content-addressed store, hash-verified

1131 * @brief Populates end-to-end dry-run inputs, copying optional source / sample / verbose keys.
1132 */
1133static void seedEndToEndDryArgs(const QJsonObject& args, QJsonObject& dryArgs, int language)
1134{
1135 if (args.contains(Keys::SourceId))
1136 dryArgs[Keys::SourceId] = args.value(Keys::SourceId).toInt();
1137
1138 if (args.contains(QStringLiteral("language")))
1139 dryArgs[QStringLiteral("language")] = language;
1140
1141 if (args.contains(QStringLiteral("sampleFrames")))
1142 dryArgs[QStringLiteral("sampleFrames")] = args.value(QStringLiteral("sampleFrames")).toArray();
1143
1144 if (args.contains(QStringLiteral("sampleFrame")))
1145 dryArgs[QStringLiteral("sampleFrame")] = args.value(QStringLiteral("sampleFrame")).toString();
1146
1147 if (args.contains(QStringLiteral("verbose")))
1148 dryArgs[QStringLiteral("verbose")] = args.value(QStringLiteral("verbose")).toBool();
1149}
1150
1151/**
1152 * @brief Picks the dry-run command for a script kind and seeds its argument map.

Callers 1

dryRunCommandForKindFunction · 0.85

Calls 2

containsMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected