fix(shell): cursor visibility when using interactive mode (#14095)

Co-authored-by: Gal Zahavi <38544478+galz10@users.noreply.github.com>
This commit is contained in:
Aswin Ashok
2025-12-04 22:28:03 +05:30
committed by GitHub
parent 1040c246f5
commit 84f521b1c6
4 changed files with 76 additions and 23 deletions
@@ -486,24 +486,14 @@ export class ShellExecutionService {
if (shellExecutionConfig.showColor) {
newOutput = serializeTerminalToObject(headlessTerminal);
} else {
const lines: AnsiOutput = [];
for (let y = 0; y < headlessTerminal.rows; y++) {
const line = buffer.getLine(buffer.viewportY + y);
const lineContent = line ? line.translateToString(true) : '';
lines.push([
{
text: lineContent,
bold: false,
italic: false,
underline: false,
dim: false,
inverse: false,
fg: '',
bg: '',
},
]);
}
newOutput = lines;
newOutput = (serializeTerminalToObject(headlessTerminal) || []).map(
(line) =>
line.map((token) => {
token.fg = '';
token.bg = '';
return token;
}),
);
}
let lastNonEmptyLine = -1;