Skip to content

Commit a6fc500

Browse files
committed
feat: Update workflow execution message structure
- Modify workflow execution message to include optional parameters - Update offscreen message listener to handle new message format - Pass additional options during workflow execution
1 parent bae9e0b commit a6fc500

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/background/BackgroundWorkflowUtils.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,10 @@ class BackgroundWorkflowUtils {
130130
return;
131131
}
132132

133-
await BackgroundOffscreen.instance.sendMessage(
134-
'workflow:execute',
135-
workflowData
136-
);
133+
await BackgroundOffscreen.instance.sendMessage('workflow:execute', {
134+
workflow: workflowData,
135+
options,
136+
});
137137
}
138138
}
139139

src/offscreen/message-listener.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import Browser from 'webextension-polyfill';
66
const messageListener = new MessageListener('offscreen');
77
Browser.runtime.onMessage.addListener(messageListener.listener);
88

9-
messageListener.on('workflow:execute', (data) => {
10-
WorkflowManager.instance.execute(data);
9+
messageListener.on('workflow:execute', ({ workflow, options }) => {
10+
WorkflowManager.instance.execute(workflow, options);
1111
});
1212

1313
messageListener.on('workflow:stop', (stateId) => {

0 commit comments

Comments
 (0)