Skip to content

Commit d0bfddd

Browse files
committed
Add inputPayload to AIWorkerMessage and update related logic in flow execution
1 parent cffa8a6 commit d0bfddd

File tree

5 files changed

+448
-143
lines changed

5 files changed

+448
-143
lines changed

apps/vps-web/src/app/ai-flow-engine-worker/ai-flow-engine-worker-message.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export interface AIWorkerMessage {
99
flow?: Flow<BaseNodeInfo>;
1010
nodeId?: string;
1111
input?: any;
12+
inputPayload?: any;
1213
}
1314

1415
export interface AIWorkerMessageResponse {

apps/vps-web/src/app/ai-flow-engine-worker/ai-flow-engine-worker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ self.addEventListener('message', (event: MessageEvent<AIWorkerMessage>) => {
3838
undefined,
3939
undefined,
4040
undefined,
41-
undefined,
41+
data.inputPayload,
4242
undefined,
4343
undefined,
4444
(output, node) => {

apps/vps-web/src/main.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,9 @@ if (url.pathname === '/run-flow') {
192192
loopIndex?: number,
193193
connection?: IConnectionNodeComponent<NodeInfo>,
194194
scopeId?: string,
195-
runCounter?: RunCounter
195+
runCounter?: RunCounter,
196+
shouldResetConnectionSlider?: boolean,
197+
inputPayload?: any
196198
) => {
197199
if (flow) {
198200
console.log('run node and restart flow', node);
@@ -203,6 +205,7 @@ if (url.pathname === '/run-flow') {
203205
message: 'start-node',
204206
nodeId: node.id,
205207
input,
208+
inputPayload,
206209
});
207210
}
208211
},

0 commit comments

Comments
 (0)