Repository navigation
Conversation
eitsupi
marked this pull request as ready for review
October 12, 2026 03:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#1868 and #1870 provide managed sess preparation, connection references, and explicit terminal binding, but manual attachment still has a gap. When an external terminal has no live session binding, the status-bar attach action can send the native command to vscode-R's global endpoint. In vscode-R-console, that bypasses SessProxy and replaces the proxy-backed transport. PID discovery can also wait indefinitely on an extension-owned pseudoterminal before its frontend gets a chance to recover.
This adds
session.registerTerminalIntegration(terminal, { attach(token) })so the frontend can restore its own transport and bind the accepted connection using the existing APIs:Consumers can prepare through their proxy, observe the matching connection, and call
activate(sessionId, { terminal, connectionId, select: false })before returningtrue. vscode-R then verifies the binding and selects/focuses the terminal. Consumers retain responsibility for prompt readiness, submission queues, failure explanations, and R code already submitted when cancellation occurs.This completes the third part of the external session API for the intended 3.2.0 release alongside #1868 and #1870, so consumers can adopt managed sess with a supported manual recovery path. This change is on the TypeScript side and does not change the bundled sess revision or introduce another reinstall/restart transition. External frontends must adopt the hook; pasting a copied native attach command remains outside this API and can still bypass a proxy.