Skip to content

Improve Lite Terminal shell integration #1505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/commands/webSocketTerminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ class WebSocketTerminal implements vscode.Pseudoterminal {
this._closeEmitter.fire();
return;
}
// Set terminal properties
this._hideCursorWrite("\x1b]633;P;IsWindows=False\x07");
Comment on lines +223 to +224
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is redundant fwiw as false is the default

Copy link

@Tyriar Tyriar Mar 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the comments @Tyriar! I must have missed the HasRichCommandDetecton PR, I will adopt that sequence. While I have you attention, is there any chance that microsoft/vscode#179913 can be looked at again?

// Print the opening message
this._hideCursorWrite(
`\x1b[32mConnected to \x1b[0m\x1b[4m${this._api.config.host}:${this._api.config.port}${this._api.config.pathPrefix}\x1b[0m\x1b[32m as \x1b[0m\x1b[3m${this._api.config.username}\x1b[0m\r\n\r\n`
Expand Down Expand Up @@ -364,7 +366,7 @@ class WebSocketTerminal implements vscode.Pseudoterminal {
// Send the input to the server for processing
this._socket.send(JSON.stringify({ type: this._state, input: this._input }));
if (this._state == "prompt") {
this._hideCursorWrite(`\x1b]633;C\x07\x1b]633;E;${this._inputEscaped()}\x07\r\n`);
this._hideCursorWrite(`\x1b]633;E;${this._inputEscaped()}\x07\x1b]633;C\x07\r\n`);
if (this._input == "") {
this._promptExitCode = "";
}
Expand Down Expand Up @@ -676,7 +678,7 @@ class WebSocketTerminal implements vscode.Pseudoterminal {
// Send the input to the server for processing
this._socket.send(JSON.stringify({ type: this._state, input: this._input }));
if (this._state == "prompt") {
this._hideCursorWrite(`\x1b]633;C\x07\x1b]633;E;${this._inputEscaped()}\x07\r\n`);
this._hideCursorWrite(`\x1b]633;E;${this._inputEscaped()}\x07\x1b]633;C\x07\r\n`);
if (this._input == "") {
this._promptExitCode = "";
}
Expand Down