Add AgentMode enum and plumb agentMode through message send#230
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR syncs the Java SDK with monorepo commit 9017d85ef3, adding support for specifying a per-message “agent UI mode” (plan/autopilot/etc.) and improving the standalone-vs-monorepo comparison script to report missing files in both directions.
Changes:
- Add
AgentModeand plumb it fromMessageOptions→SendMessageRequest→session.sendRPC call. - Enhance
compare-standalone-to-monorepo.shto diff file inventories both ways (only-in-standalone vs only-in-monorepo) and optionally print diffs for missing files.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/com/github/copilot/rpc/SendMessageRequest.java | Adds agentMode JSON-RPC field and accessors so the request can carry per-message UI mode. |
| src/main/java/com/github/copilot/rpc/MessageOptions.java | Exposes agentMode on the public message options API and includes it in cloning. |
| src/main/java/com/github/copilot/rpc/AgentMode.java | Introduces a public enum representing supported agent UI modes for a turn. |
| src/main/java/com/github/copilot/CopilotSession.java | Forwards MessageOptions.agentMode into the JSON-RPC send request. |
| scripts/compare-standalone-to-monorepo.sh | Improves comparison output and adds “missing in either direction” reporting + diff output for missing files. |
Copilot's findings
- Files reviewed: 5/5 changed files
- Comments generated: 2
…o 1.1.0 Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
Copilot
AI
changed the title
Sync with 9017d85ef3 of monorepo
Add AgentMode enum and plumb agentMode through message send
May 27, 2026
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.
Syncs the Java SDK with monorepo commit
9017d85ef3, adding support for specifying a per-message "agent UI mode" (plan/autopilot/etc.) and improving the standalone-vs-monorepo comparison script to report missing files in both directions.Before the change?
After the change?
AgentModeenum with@JsonValuefor serialization and@JsonCreator(fromValue) for deserialization round-trip support.agentModefromMessageOptions→SendMessageRequest→session.sendRPC call.compare-standalone-to-monorepo.shto diff file inventories both ways (only-in-standalone vs only-in-monorepo) and optionally print diffs for missing files.AgentModeuses@since 1.1.0to match the version where it is introduced.Pull request checklist
mvn spotless:applyhas been run to format the codemvn clean verifypasses locallyDoes this introduce a breaking change?