Port ExitPlanMode and AutoModeSwitch mode handler APIs from reference implementation#178
Draft
Port ExitPlanMode and AutoModeSwitch mode handler APIs from reference implementation#178
Conversation
…ementation Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
…shots Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
…om.xml CLI version, and update scripts/codegen @github/copilot version Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Sync reference implementation with 6 new commits
Port ExitPlanMode and AutoModeSwitch mode handler APIs from reference implementation
May 8, 2026
| if (response.getFeedback() != null) { | ||
| result.put("feedback", response.getFeedback()); | ||
| } | ||
| rpc.sendResponse(Long.parseLong(requestId), result); |
| }).exceptionally(ex -> { | ||
| LOG.log(Level.WARNING, "Exit plan mode handler exception", ex); | ||
| try { | ||
| rpc.sendResponse(Long.parseLong(requestId), Map.of("approved", true)); |
|
|
||
| session.handleAutoModeSwitchRequest(request).thenAccept(response -> { | ||
| try { | ||
| rpc.sendResponse(Long.parseLong(requestId), Map.of("response", response.getValue())); |
| }).exceptionally(ex -> { | ||
| LOG.log(Level.WARNING, "Auto mode switch handler exception", ex); | ||
| try { | ||
| rpc.sendResponse(Long.parseLong(requestId), |
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 #88
Before the change?
ExitPlanModeandAutoModeSwitchhandler APIs that were restored across other SDKs in reference impl commit671b50a..lastmergepointed to066a69c1, 6 commits behind reference implementation HEAD.After the change?
ExitPlanModeRequest,ExitPlanModeResult,ExitPlanModeInvocation,ExitPlanModeHandler,AutoModeSwitchRequest,AutoModeSwitchResponse(enum:YES/YES_ALWAYS/NO),AutoModeSwitchInvocation,AutoModeSwitchHandler.SessionConfig/ResumeSessionConfiggainonExitPlanMode/onAutoModeSwitchfields.SessionRequestBuilderwires handlers toCopilotSessionand setsrequestExitPlanMode/requestAutoModeSwitchcapability flags onCreate/ResumeSessionRequest.RpcHandlerDispatcherregistersexitPlanMode.requestandautoModeSwitch.requestmethods. Default behavior: approve exit (no handler) / decline mode switch (no handler).@Disabledpending snapshot availability after.lastmergeupdate).advanced.md..lastmerge→ce56eb81, copilot version →^1.0.44-2.Usage:
Commits not ported (not applicable to Java SDK):
ce56eb8(typo not present),299ea21/97f505c(CI-only),b0d1c8e(Rust-only),e759700(.NET generated code).Pull request checklist
mvn spotless:applyhas been run to format the codemvn clean verifypasses locallyDoes this introduce a breaking change?