Use frontend workflow from graphToPrompt

This commit is contained in:
Peyton DeNiro
2026-03-28 13:49:35 -05:00
parent 1fa2db89e1
commit 68ae24ceac
+2 -1
View File
@@ -29,10 +29,11 @@ const extension = {
}
app.graphToPrompt().then(async (p) => {
const frontendWorkflow = p.workflow ?? app.graph.serialize();
const json = JSON.stringify({
name: filename + ".json",
workflow: JSON.stringify(p.output, null, 2),
frontend_workflow: JSON.stringify(app.graph.serialize(), null, 2),
frontend_workflow: JSON.stringify(frontendWorkflow, null, 2),
}, null, 2); // convert the data to a JSON string
var response = await api.fetchApi(`/saveasscript`, { method: "POST", body: json });
if(response.status == 200) {