[PR #4652] [MERGED] Shim the Azure connection through a conhost to stop VT bleeding #25876

Open
opened 2026-01-31 09:12:21 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/4652
Author: @DHowett-MSFT
Created: 2/20/2020
Status: ✅ Merged
Merged: 2/21/2020
Merged by: @DHowett-MSFT

Base: master ← Head: dev/duhowett/azbridghe


📝 Commits (4)

  • f82565e Shim the Azure connection through a conhost to stop VT bleeding
  • 005897e Fix GH#ID and WRAP_AT_EOL
  • 1f42666 Apply suggestions from code review
  • 1441dde If we get a high/non or non/low, emit U+FFFD

📊 Changes

10 files changed (+361 additions, -2 deletions)

View changed files

📝 OpenConsole.sln (+17 -0)
📝 src/cascadia/CascadiaPackage/CascadiaPackage.wapproj (+1 -0)
📝 src/cascadia/TerminalApp/TerminalPage.cpp (+4 -2)
➕ src/cascadia/TerminalAzBridge/ConsoleInputReader.cpp (+87 -0)
➕ src/cascadia/TerminalAzBridge/ConsoleInputReader.h (+33 -0)
➕ src/cascadia/TerminalAzBridge/TerminalAzBridge.vcxproj (+71 -0)
➕ src/cascadia/TerminalAzBridge/main.cpp (+104 -0)
➕ src/cascadia/TerminalAzBridge/packages.config (+4 -0)
➕ src/cascadia/TerminalAzBridge/pch.cpp (+4 -0)
➕ src/cascadia/TerminalAzBridge/pch.h (+36 -0)

📄 Description

This commit introduces a small console-subsystem application whose sole
job is to consume TerminalConnection.dll and hook it up to something
other than Terminal. It is 99% of the way to a generic solution.

I've introduced a stopgap in TerminalPage that makes sure we launch
TerminalAzBridge using ConptyConnection instead of AzureConnection.

As a bonus, this commit includes a class whose sole job it is to make
reading VT input off a console handle not terrible. It returns you a
string and dispatches window size change callbacks.

Fixes #2267.
Fixes #4589.
Related to #2266 (since pwsh needs better VT).

NOTE: this application will only work if you put TerminalConnection.dll and resources.pri next to it. It is not yet intended for out-of-terminal-package use.

Validation Steps Performed

image


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/4652 **Author:** [@DHowett-MSFT](https://github.com/DHowett-MSFT) **Created:** 2/20/2020 **Status:** ✅ Merged **Merged:** 2/21/2020 **Merged by:** [@DHowett-MSFT](https://github.com/DHowett-MSFT) **Base:** `master` ← **Head:** `dev/duhowett/azbridghe` --- ### 📝 Commits (4) - [`f82565e`](https://github.com/microsoft/terminal/commit/f82565e9adc7cf96616cc28bdedfc6b86b139237) Shim the Azure connection through a conhost to stop VT bleeding - [`005897e`](https://github.com/microsoft/terminal/commit/005897eaf3d6144dff08766a2726fb3826d8bb79) Fix GH#ID and WRAP_AT_EOL - [`1f42666`](https://github.com/microsoft/terminal/commit/1f42666c30b4a7745e08b1fddf4009ff5afd2181) Apply suggestions from code review - [`1441dde`](https://github.com/microsoft/terminal/commit/1441dde7ec1e06850fefd97589f95d3245601ac4) If we get a high/non or non/low, emit U+FFFD ### 📊 Changes **10 files changed** (+361 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `OpenConsole.sln` (+17 -0) 📝 `src/cascadia/CascadiaPackage/CascadiaPackage.wapproj` (+1 -0) 📝 `src/cascadia/TerminalApp/TerminalPage.cpp` (+4 -2) ➕ `src/cascadia/TerminalAzBridge/ConsoleInputReader.cpp` (+87 -0) ➕ `src/cascadia/TerminalAzBridge/ConsoleInputReader.h` (+33 -0) ➕ `src/cascadia/TerminalAzBridge/TerminalAzBridge.vcxproj` (+71 -0) ➕ `src/cascadia/TerminalAzBridge/main.cpp` (+104 -0) ➕ `src/cascadia/TerminalAzBridge/packages.config` (+4 -0) ➕ `src/cascadia/TerminalAzBridge/pch.cpp` (+4 -0) ➕ `src/cascadia/TerminalAzBridge/pch.h` (+36 -0) </details> ### 📄 Description This commit introduces a small console-subsystem application whose sole job is to consume TerminalConnection.dll and hook it up to something other than Terminal. It is 99% of the way to a generic solution. I've introduced a stopgap in TerminalPage that makes sure we launch TerminalAzBridge using ConptyConnection instead of AzureConnection. As a bonus, this commit includes a class whose sole job it is to make reading VT input off a console handle not terrible. It returns you a string and dispatches window size change callbacks. Fixes #2267. Fixes #4589. Related to #2266 (since pwsh needs better VT). _NOTE: this application will only work if you put TerminalConnection.dll and resources.pri next to it. It is not yet intended for out-of-terminal-package use._ ## Validation Steps Performed ![image](https://user-images.githubusercontent.com/14316954/74894833-ebf7f980-5344-11ea-93ff-d96d36925c4c.png) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:12:21 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#25876