MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / write_workflow_manifest

Function write_workflow_manifest

app/workflow/workflow.cpp:1151–1167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1149 const std::string prefix = id + ".";
1150 for (const auto & [key, value] : context.values) {
1151 if (key.rfind(prefix, 0) == 0) {
1152 output_item[key.substr(prefix.size())] = value;
1153 }
1154 }
1155 output_items.push_back(std::move(output_item));
1156 }
1157
1158 context.values = base_values;
1159 context.values[id + ".count"] = std::to_string(output_items.size());
1160 context.batches[id] = std::move(output_items);
1161 std::cout << "workflow_step=" << id << "\n";
1162 std::cout << "batch_items=" << context.values[id + ".count"] << "\n";
1163}
1164
1165void write_workflow_manifest(const WorkflowContext & context) {
1166 const auto path = context.output_dir / "workflow_manifest.json";
1167 std::filesystem::create_directories(context.output_dir);
1168 std::ofstream out(path);
1169 out << "{";
1170 bool first = true;

Callers 1

run_json_workflowFunction · 0.85

Calls 1

stringify_stringFunction · 0.85

Tested by

no test coverage detected