Skip to content

Commit f6ba6b2

Browse files
committed
Run Project
1 parent 492a6cb commit f6ba6b2

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/defs/PyWebview.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export interface PyWebview {
1111
load_project_id: () => Promise<string | null>;
1212
backup_project: (content: string) => Promise<boolean>;
1313
restore_project: () => Promise<string>;
14-
run_project: () => Promise<void>;
14+
run_project: (script: string) => Promise<void>;
1515
}
1616
}
1717

src/utils/desktopTools.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ const setupDesktopTools = () => {
111111
return getApi()!.restore_project();
112112
}
113113

114-
const runProject = async (): Promise<void> => {
114+
const runProject = async (script: string): Promise<void> => {
115115
if (!isDesktop()) return;
116116
await waitForPWV();
117-
return getApi()!.run_project();
117+
return getApi()!.run_project(script);
118118
}
119119

120120
return {

src/utils/projectTools.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { Suggestion } from "@defs/UI";
66
import { isDesktop, loadProjectId, runProject } from "@utils/desktopTools";
77
import { loadData, wipeData } from "@utils/persistentTools";
88
import { generateId } from "@utils/generatorTools";
9-
import { downloadScript } from "@utils/compilerTools";
9+
import { downloadScript, generateScript } from "@utils/compilerTools";
1010
import {
1111
loadProject,
1212
saveProject,
@@ -89,7 +89,7 @@ const setupProjectTools = () => {
8989
{
9090
name: "Run Project",
9191
icon: "CirclePlay",
92-
action: () => runProject(),
92+
action: () => runProject(generateScript(nodeSystem, entries)),
9393
}
9494
] : []),
9595
];

0 commit comments

Comments
 (0)