Skip to content

Commit 720cc87

Browse files
Copilotedburns
andauthored
Fix compilation errors: PermissionRequestResultKind valueOf/name to constructor/getValue
Co-authored-by: edburns <75821+edburns@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/copilot-sdk-java/sessions/bd5aed59-ed6b-446f-b070-7f09633c74cd
1 parent 2edf741 commit 720cc87

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/com/github/copilot/sdk/CopilotSession.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ private void executePermissionAndRespondAsync(String requestId, PermissionReques
710710
invocation.setSessionId(sessionId);
711711
handler.handle(permissionRequest, invocation).thenAccept(result -> {
712712
try {
713-
PermissionRequestResultKind kind = PermissionRequestResultKind.valueOf(result.getKind());
713+
PermissionRequestResultKind kind = new PermissionRequestResultKind(result.getKind());
714714
if (PermissionRequestResultKind.NO_RESULT.equals(kind)) {
715715
// Handler explicitly abstains — leave the request unanswered
716716
// so another client can handle it.

src/main/java/com/github/copilot/sdk/RpcHandlerDispatcher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ private void handlePermissionRequest(JsonRpcClient rpc, String requestId, JsonNo
193193

194194
session.handlePermissionRequest(permissionRequest).thenAccept(result -> {
195195
try {
196-
if (PermissionRequestResultKind.NO_RESULT.name().equals(result.getKind())) {
196+
if (PermissionRequestResultKind.NO_RESULT.getValue().equalsIgnoreCase(result.getKind())) {
197197
// Handler explicitly abstains — do not send a response,
198198
// allowing another client to handle the request.
199199
return;

0 commit comments

Comments
 (0)