Repository navigation
refactor: align the stop option's Pty name and mode type with upstream - #897
Merged
Merged
Conversation
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.
Renames the background-service stop option to upstream's name. Nothing has shipped with the old names (they arrived after 1.1.0), so there is nothing to keep compatible.
Refs #842
The rename
OpenCodeServerStopOptions.PersistentPtys→OpenCodeServerStopOptions.PtyOpenCodeServerStopPersistentPtyMode→OpenCodeServerStopPtyMode. The membersClear = 0andHandoff = 1are unchanged.Upstream at the pin (
v2.3.0) has the same option asStopOptions.pty?: "clear" | "handoff"(packages/client/src/service.ts:37-43).Not renamed: the persistent-terminal family keeps its names. That is
OpenCodeClient.PersistentPtys,PersistentPtysClient, theOpenCode.Sdk.PersistentPtysnamespace, the generated files andPersistentPtyListResponse.PersistentPtys. The edit is symbol-aware, not a text replace.Reading
Ptycorrectly:OpenCodeClient.Ptysis the ordinary terminal family, so the new XML summary and the connection-modes options row both say thatPtygoverns persistent terminals (OpenCodeClient.PersistentPtys) only, and that ordinary terminals end with the service either way. Upstream'spty: "clear" | "handoff"mapping and the null/Clearbehaviour move into the remarks.What changes
OpenCodeServerStopPtyMode.cs, renamed withgit mv.OpenCodeServerStopOptions, and the refusal message inServiceStopper, which now namesOpenCodeServerStopOptions.Pty.OpenCodeServer.BackgroundService.cs.PublicApi.verified.txt: the two stop entries only.ServiceStopperTests:StopAsync_Should_Refuse_An_Undefined_Persistent_Pty_Mode_Before_Reading→StopAsync_Should_Refuse_An_Undefined_Pty_Mode_Before_Reading.client-runtime.md(two sentences) and the connection-modes guide (the stop sequence, the options row and the example).No behaviour changes, and there is no new suppression, baseline entry or clone.
Verification
The local check from
quality-gates.mdran on Linux (net10.0 and net11.0), onb8d5f838over master3fa64db5, with SDK11.0.100and Bun 1.4.4 at the pin:verify-clones: 0 new.--help, andgenerate --verify: current.OpenCode.Sdk.Tools.TestsexceptNativeAot: 2,819 passed.OpenCode.Sdk.Tests: 4,236 passed on each of net10.0 and net11.0.ServiceElectionpass: 9 passed on each.Total 11,309 passed, with none failed or skipped. net472 is this PR's CI Windows leg.