Fix CloudShell terminal hanging for Mongo and Cassandra shells due to missing updateTerminalData method (#2199)

This commit is contained in:
BChoudhury-ms
2025-08-14 01:32:27 +05:30
committed by GitHub
parent 3afd74a957
commit 012d043c78
5 changed files with 52 additions and 16 deletions

View File

@@ -135,7 +135,11 @@ export class AttachAddon implements ITerminalAddon {
}
if (this._allowTerminalWrite) {
const updatedData = this._shellHandler?.updateTerminalData(data) ?? data;
const updatedData =
typeof this._shellHandler?.updateTerminalData === "function"
? this._shellHandler.updateTerminalData(data)
: data;
const suppressedData = this._shellHandler?.getTerminalSuppressedData();
const shouldNotWrite = suppressedData.filter(Boolean).some((item) => updatedData.includes(item));