Skip to content

Use jsoncreator for AgentMode ctor, per review comments.#1465

Merged
edburns merged 2 commits into
mainfrom
edburns/copilot-review-agentmode-jsoncreator
May 27, 2026
Merged

Use jsoncreator for AgentMode ctor, per review comments.#1465
edburns merged 2 commits into
mainfrom
edburns/copilot-review-agentmode-jsoncreator

Conversation

@edburns
Copy link
Copy Markdown
Collaborator

@edburns edburns commented May 27, 2026

No description provided.

@edburns edburns requested a review from a team as a code owner May 27, 2026 18:48
Copilot AI review requested due to automatic review settings May 27, 2026 18:48
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Java AgentMode RPC type to support Jackson deserialization via @JsonCreator, aligning it with the generated enum patterns used elsewhere in the SDK.

Changes:

  • Added @JsonCreator-annotated AgentMode.fromValue(String) to deserialize JSON string values into the enum.
  • Updated the @since tag on AgentMode (now 1.1.0).
Show a summary per file
File Description
java/src/main/java/com/github/copilot/rpc/AgentMode.java Adds Jackson @JsonCreator deserialization and updates Javadoc metadata for the enum.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 3

Comment thread java/src/main/java/com/github/copilot/rpc/AgentMode.java Outdated
Comment thread java/src/main/java/com/github/copilot/rpc/AgentMode.java
Comment thread java/src/main/java/com/github/copilot/rpc/AgentMode.java Outdated
- Revert @SInCE tag from 1.1.0 to 1.0.0 for consistency with
  SendMessageRequest which already references AgentMode
- Fix error message format to 'Unknown AgentMode value: ...' matching
  the convention used by generated enum fromValue methods
- Add AgentModeTest covering serialization, deserialization, round-trip,
  null handling, and unknown-value error behavior

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@edburns edburns marked this pull request as ready for review May 27, 2026 20:01
Copy link
Copy Markdown
Collaborator Author

@edburns edburns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Human review of copilot authored changes. LGTM.

@edburns edburns merged commit 102cd3e into main May 27, 2026
25 checks passed
@edburns edburns deleted the edburns/copilot-review-agentmode-jsoncreator branch May 27, 2026 20:29
edburns added a commit to github/copilot-sdk-java that referenced this pull request May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants