Skip to content

Commit afe68ba

Browse files
executeCommandRunUnitlInterrupt and executeCommandRunUntilError merged
1 parent e80d898 commit afe68ba

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

src/modules/terminal.ts

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -56,27 +56,7 @@ const cbterminal = {
5656
});
5757
},
5858

59-
/**
60-
* Executes a given command and keeps running until interrupted.
61-
* Listens for messages from the WebSocket and resolves the promise when an interruption signal is received.
62-
*
63-
* @param {string} command - The command to be executed.
64-
* @returns {Promise<any>} A promise that resolves when an interruption signal is received during command execution.
65-
*/
66-
executeCommandRunUnitlInterrupt: async (command: string): Promise<any> => {
67-
return new Promise((resolve, reject) => {
68-
cbws.getWebsocket.send(JSON.stringify({
69-
"type": "executeCommandRunUnitlInterrupt",
70-
"message": command,
71-
}));
72-
cbws.getWebsocket.on('message', (data: string) => {
73-
const response = JSON.parse(data);
74-
if (response.type === "terminalInterruptResponse") {
75-
resolve(response);
76-
}
77-
});
78-
});
79-
},
59+
8060
/**
8161
* Sends a manual interrupt signal to the terminal.
8262
*

0 commit comments

Comments
 (0)