From 69c0bf5873334c25d691b8db4a995b86125a6799 Mon Sep 17 00:00:00 2001 From: Anirban Kar Date: Tue, 17 Dec 2024 14:57:16 +0530 Subject: [PATCH 1/2] fix: added wait till terminal prompt for bolt shell execution --- app/commit.json | 2 +- app/utils/shell.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/commit.json b/app/commit.json index 832678f..2d7a657 100644 --- a/app/commit.json +++ b/app/commit.json @@ -1 +1 @@ -{ "commit": "1e72d52278730f7d22448be9d5cf2daf12559486", "version": "0.0.2" } +{ "commit": "0ee373629789f01fb9f54f6747735b51a94a5562" } diff --git a/app/utils/shell.ts b/app/utils/shell.ts index 53b450f..3aad5b3 100644 --- a/app/utils/shell.ts +++ b/app/utils/shell.ts @@ -105,6 +105,7 @@ export class BoltShell { * this.#shellInputStream?.write('\x03'); */ this.terminal.input('\x03'); + await this.waitTillOscCode('prompt'); if (state && state.executionPrms) { await state.executionPrms; @@ -145,6 +146,10 @@ export class BoltShell { terminalOutput.pipeTo( new WritableStream({ write(data) { + /* + * const [, osc] = data.match(/\x1b\]654;([^\x07]+)\x07/) || []; + * console.log('terminal onData', { data,osc }); + */ if (!isInteractive) { const [, osc] = data.match(/\x1b\]654;([^\x07]+)\x07/) || []; From e9e785767528e1ca78b9b09c8ba0b73c37ef368b Mon Sep 17 00:00:00 2001 From: Anirban Kar Date: Tue, 17 Dec 2024 15:01:00 +0530 Subject: [PATCH 2/2] removed logs --- app/commit.json | 2 +- app/utils/shell.ts | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/app/commit.json b/app/commit.json index 2d7a657..85591f4 100644 --- a/app/commit.json +++ b/app/commit.json @@ -1 +1 @@ -{ "commit": "0ee373629789f01fb9f54f6747735b51a94a5562" } +{ "commit": "69c0bf5873334c25d691b8db4a995b86125a6799" } diff --git a/app/utils/shell.ts b/app/utils/shell.ts index 3aad5b3..0ffea42 100644 --- a/app/utils/shell.ts +++ b/app/utils/shell.ts @@ -146,10 +146,6 @@ export class BoltShell { terminalOutput.pipeTo( new WritableStream({ write(data) { - /* - * const [, osc] = data.match(/\x1b\]654;([^\x07]+)\x07/) || []; - * console.log('terminal onData', { data,osc }); - */ if (!isInteractive) { const [, osc] = data.match(/\x1b\]654;([^\x07]+)\x07/) || [];