mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-09 06:55:03 +00:00
This reverts commit a305b41c93.
This commit is contained in:
@@ -224,7 +224,7 @@ export const connectWS = async (item, collection, environment, runtimeVariables,
|
||||
});
|
||||
};
|
||||
|
||||
export const sendWsRequest = async (item, collection, environment, runtimeVariables, selectedMessageIndex = 0) => {
|
||||
export const sendWsRequest = async (item, collection, environment, runtimeVariables) => {
|
||||
const ensureConnection = async () => {
|
||||
const connectionStatus = await isWsConnectionActive(item.uid);
|
||||
if (!connectionStatus.isActive) {
|
||||
@@ -234,8 +234,8 @@ export const sendWsRequest = async (item, collection, environment, runtimeVariab
|
||||
|
||||
await ensureConnection();
|
||||
|
||||
// Send only the selected message by index
|
||||
const result = await queueWsMessage(item, collection, environment, runtimeVariables, selectedMessageIndex);
|
||||
// Use queueWsMessage helper to queue all messages with proper variable interpolation
|
||||
const result = await queueWsMessage(item, collection, environment, runtimeVariables, null);
|
||||
|
||||
if (result.success) {
|
||||
return {};
|
||||
@@ -250,10 +250,10 @@ export const sendWsRequest = async (item, collection, environment, runtimeVariab
|
||||
* @param {Object} collection - The collection object
|
||||
* @param {Object} environment - The environment variables
|
||||
* @param {Object} runtimeVariables - The runtime variables
|
||||
* @param {number} selectedMessageIndex - Index of the message to queue
|
||||
* @param {string} messageContent - The message content to queue (or null to queue all messages)
|
||||
* @returns {Promise<Object>} - The result of the queue operation
|
||||
*/
|
||||
export const queueWsMessage = async (item, collection, environment, runtimeVariables, selectedMessageIndex) => {
|
||||
export const queueWsMessage = async (item, collection, environment, runtimeVariables, messageContent) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const { ipcRenderer } = window;
|
||||
ipcRenderer.invoke('renderer:ws:queue-message', {
|
||||
@@ -261,7 +261,7 @@ export const queueWsMessage = async (item, collection, environment, runtimeVaria
|
||||
collection,
|
||||
environment,
|
||||
runtimeVariables,
|
||||
selectedMessageIndex
|
||||
messageContent
|
||||
}).then(resolve).catch(reject);
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user