Add isPty and fold TerminalComplete into ToolResultTerminalContent#352
Merged
Conversation
anthonykim1
marked this pull request as ready for review
July 21, 2026 22:23
anthonykim1
marked this pull request as draft
July 22, 2026 16:52
connor4312
reviewed
Jul 22, 2026
connor4312
reviewed
Jul 22, 2026
anthonykim1
commented
Jul 22, 2026
anthonykim1
marked this pull request as ready for review
July 22, 2026 18:11
anthonykim1
marked this pull request as draft
July 22, 2026 20:08
anthonykim1
marked this pull request as ready for review
July 22, 2026 20:59
connor4312
reviewed
Jul 22, 2026
anthonykim1
marked this pull request as draft
July 22, 2026 21:07
connor4312
approved these changes
Jul 22, 2026
This was referenced Jul 22, 2026
anthonykim1
marked this pull request as ready for review
July 23, 2026 07:05
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.
Resolves: #322, #323
Part of: microsoft/vscode#324825
isPtytoToolResultTerminalContentso a client knows whether a terminal is PTY-backed before subscribing or initializing an emulator.isPtytoTerminalStateso the channel is self-describing regardless of how a client discovered it;isPty: falsemeans plain-text output and clients do not need to parse VT sequences.exitCode,preview, andtruncatedin on the terminal block in the completed result, so clients that did not subscribe to the terminal still get the command outcome. This records the command's exit, not the terminal's — the terminal may keep running afterwards.ToolResultTerminalCompleteContent(breaking, riding the 0.7.0 window): its completion data now lives directly on the terminal block it previously correlated with, so clients no longer pair two content blocks per command.cwdoff the completion data deliberately — it can be added back additively if a client needs to display it at the top-level terminal part.resourceandtitlerequired. Per review discussion, non-pty shell runs will be exposed as resource-backed terminals (isPty: false) whose output streams over the terminal channel, so clients receive output only when they subscribe.030-terminal-content-isptyand031-terminal-content-completed, stageadded/removedchange fragments, and regenerate the JSON schemas and Go/Rust/Kotlin/Swift/TypeScript clients.Inspirations from:
ToolResultTerminalCompleteContent— sameexitCode/preview/truncatedshapes and doc intent, moved onto the terminal block.isPtycapability-flag placement onTerminalStatefollows the existingsupportsCommandDetectionpattern.terminal/dataappends intoTerminalState.content, so late subscribers reconstruct output from channel state.isShellTool— the protocol now labels terminal resources instead.