Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .lastmerge
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4a0437bb03a0b60a1867f14ae8e3faf053afa5aa
e20f5bef125860accb30c60d1b35109371a77f16
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
reference-impl-sync workflow and deal with the subsequent
PR.
-->
<readonly-copilot-sdk-ref-impl-version-from-lastmerge-file-updated-by-reference-impl-sync>^1.0.44-3</readonly-copilot-sdk-ref-impl-version-from-lastmerge-file-updated-by-reference-impl-sync>
<readonly-copilot-sdk-ref-impl-version-from-lastmerge-file-updated-by-reference-impl-sync>^1.0.48</readonly-copilot-sdk-ref-impl-version-from-lastmerge-file-updated-by-reference-impl-sync>

</properties>

Expand Down
56 changes: 28 additions & 28 deletions scripts/codegen/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion scripts/codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"generate:java": "tsx java.ts"
},
"dependencies": {
"@github/copilot": "^1.0.44-3",
"@github/copilot": "^1.0.48",
"json-schema": "^0.4.0",
"tsx": "^4.20.6"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ static CreateSessionRequest buildCreateRequest(SessionConfig config, String sess
request.setRequestAutoModeSwitch(true);
}
request.setGitHubToken(config.getGitHubToken());
request.setRemoteSession(config.getRemoteSession());

return request;
}
Expand Down Expand Up @@ -243,6 +244,7 @@ static ResumeSessionRequest buildResumeRequest(String sessionId, ResumeSessionCo
request.setRequestAutoModeSwitch(true);
}
request.setGitHubToken(config.getGitHubToken());
request.setRemoteSession(config.getRemoteSession());

return request;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ public final class CreateSessionRequest {
@JsonProperty("gitHubToken")
private String gitHubToken;

@JsonProperty("remoteSession")
private String remoteSession;

/** Gets the model name. @return the model */
public String getModel() {
return model;
Expand Down Expand Up @@ -528,4 +531,16 @@ public String getGitHubToken() {
public void setGitHubToken(String gitHubToken) {
this.gitHubToken = gitHubToken;
}

/** Gets the remote session mode. @return the remote session mode */
public String getRemoteSession() {
return remoteSession;
}

/**
* Sets the remote session mode. @param remoteSession the remote session mode
*/
public void setRemoteSession(String remoteSession) {
this.remoteSession = remoteSession;
}
}
30 changes: 30 additions & 0 deletions src/main/java/com/github/copilot/sdk/json/ResumeSessionConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public class ResumeSessionConfig {
private ExitPlanModeHandler onExitPlanMode;
private AutoModeSwitchHandler onAutoModeSwitch;
private String gitHubToken;
private String remoteSession;

/**
* Gets the AI model to use.
Expand Down Expand Up @@ -886,6 +887,34 @@ public ResumeSessionConfig setGitHubToken(String gitHubToken) {
return this;
}

/**
* Gets the per-session remote behavior control.
* <p>
* See {@link SessionConfig#getRemoteSession()} for details on possible values.
*
* @return the remote session mode, or {@code null} if not set
* @since 1.4.0
*/
public String getRemoteSession() {
return remoteSession;
}

/**
* Sets the per-session remote behavior control.
* <p>
* See {@link SessionConfig#setRemoteSession(String)} for details on possible
* values.
*
* @param remoteSession
* the remote session mode
* @return this config for method chaining
* @since 1.4.0
*/
public ResumeSessionConfig setRemoteSession(String remoteSession) {
this.remoteSession = remoteSession;
return this;
}

/**
* Creates a shallow clone of this {@code ResumeSessionConfig} instance.
* <p>
Expand Down Expand Up @@ -935,6 +964,7 @@ public ResumeSessionConfig clone() {
copy.onExitPlanMode = this.onExitPlanMode;
copy.onAutoModeSwitch = this.onAutoModeSwitch;
copy.gitHubToken = this.gitHubToken;
copy.remoteSession = this.remoteSession;
return copy;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ public final class ResumeSessionRequest {
@JsonProperty("gitHubToken")
private String gitHubToken;

@JsonProperty("remoteSession")
private String remoteSession;

/** Gets the session ID. @return the session ID */
public String getSessionId() {
return sessionId;
Expand Down Expand Up @@ -555,4 +558,16 @@ public String getGitHubToken() {
public void setGitHubToken(String gitHubToken) {
this.gitHubToken = gitHubToken;
}

/** Gets the remote session mode. @return the remote session mode */
public String getRemoteSession() {
return remoteSession;
}

/**
* Sets the remote session mode. @param remoteSession the remote session mode
*/
public void setRemoteSession(String remoteSession) {
this.remoteSession = remoteSession;
}
}
41 changes: 41 additions & 0 deletions src/main/java/com/github/copilot/sdk/json/SessionConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public class SessionConfig {
private ExitPlanModeHandler onExitPlanMode;
private AutoModeSwitchHandler onAutoModeSwitch;
private String gitHubToken;
private String remoteSession;

/**
* Gets the custom session ID.
Expand Down Expand Up @@ -939,6 +940,45 @@ public SessionConfig setGitHubToken(String gitHubToken) {
return this;
}

/**
* Gets the per-session remote behavior control.
* <p>
* Possible values:
* <ul>
* <li>{@code "off"} — local only, no remote export (default)</li>
* <li>{@code "export"} — export session events to GitHub without enabling
* remote steering</li>
* <li>{@code "on"} — export to GitHub AND enable remote steering</li>
* </ul>
*
* @return the remote session mode, or {@code null} if not set
* @since 1.4.0
*/
public String getRemoteSession() {
return remoteSession;
}

/**
* Sets the per-session remote behavior control.
* <p>
* Possible values:
* <ul>
* <li>{@code "off"} — local only, no remote export (default)</li>
* <li>{@code "export"} — export session events to GitHub without enabling
* remote steering</li>
* <li>{@code "on"} — export to GitHub AND enable remote steering</li>
* </ul>
*
* @param remoteSession
* the remote session mode
* @return this config instance for method chaining
* @since 1.4.0
*/
public SessionConfig setRemoteSession(String remoteSession) {
this.remoteSession = remoteSession;
return this;
}

/**
* Creates a shallow clone of this {@code SessionConfig} instance.
* <p>
Expand Down Expand Up @@ -988,6 +1028,7 @@ public SessionConfig clone() {
copy.onExitPlanMode = this.onExitPlanMode;
copy.onAutoModeSwitch = this.onAutoModeSwitch;
copy.gitHubToken = this.gitHubToken;
copy.remoteSession = this.remoteSession;
return copy;
}
}
Loading