Skip to content

Commit 6a78a0f

Browse files
committed
feat: add skill directories and disabled skills to session request and config
1 parent 8ca33be commit 6a78a0f

3 files changed

Lines changed: 72 additions & 0 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,8 @@ public CompletableFuture<CopilotSession> resumeSession(String sessionId, ResumeS
488488
request.setStreaming(config.isStreaming() ? true : null);
489489
request.setMcpServers(config.getMcpServers());
490490
request.setCustomAgents(config.getCustomAgents());
491+
request.setSkillDirectories(config.getSkillDirectories());
492+
request.setDisabledSkills(config.getDisabledSkills());
491493
}
492494

493495
return connection.rpc.invoke("session.resume", request, ResumeSessionResponse.class).thenApply(response -> {

src/main/java/com/github/copilot/sdk/json/ResumeSessionConfig.java

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public class ResumeSessionConfig {
3737
private boolean streaming;
3838
private Map<String, Object> mcpServers;
3939
private List<CustomAgentConfig> customAgents;
40+
private List<String> skillDirectories;
41+
private List<String> disabledSkills;
4042

4143
/**
4244
* Gets the custom tools for this session.
@@ -167,4 +169,46 @@ public ResumeSessionConfig setCustomAgents(List<CustomAgentConfig> customAgents)
167169
this.customAgents = customAgents;
168170
return this;
169171
}
172+
173+
/**
174+
* Gets the skill directories.
175+
*
176+
* @return the list of skill directory paths
177+
*/
178+
public List<String> getSkillDirectories() {
179+
return skillDirectories;
180+
}
181+
182+
/**
183+
* Sets directories containing skill definitions.
184+
*
185+
* @param skillDirectories
186+
* the list of skill directory paths
187+
* @return this config for method chaining
188+
*/
189+
public ResumeSessionConfig setSkillDirectories(List<String> skillDirectories) {
190+
this.skillDirectories = skillDirectories;
191+
return this;
192+
}
193+
194+
/**
195+
* Gets the disabled skills.
196+
*
197+
* @return the list of disabled skill names
198+
*/
199+
public List<String> getDisabledSkills() {
200+
return disabledSkills;
201+
}
202+
203+
/**
204+
* Sets skills that should be disabled for this session.
205+
*
206+
* @param disabledSkills
207+
* the list of skill names to disable
208+
* @return this config for method chaining
209+
*/
210+
public ResumeSessionConfig setDisabledSkills(List<String> disabledSkills) {
211+
this.disabledSkills = disabledSkills;
212+
return this;
213+
}
170214
}

src/main/java/com/github/copilot/sdk/json/ResumeSessionRequest.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ public final class ResumeSessionRequest {
4646
@JsonProperty("customAgents")
4747
private List<CustomAgentConfig> customAgents;
4848

49+
@JsonProperty("skillDirectories")
50+
private List<String> skillDirectories;
51+
52+
@JsonProperty("disabledSkills")
53+
private List<String> disabledSkills;
54+
4955
/** Gets the session ID. @return the session ID */
5056
public String getSessionId() {
5157
return sessionId;
@@ -115,4 +121,24 @@ public List<CustomAgentConfig> getCustomAgents() {
115121
public void setCustomAgents(List<CustomAgentConfig> customAgents) {
116122
this.customAgents = customAgents;
117123
}
124+
125+
/** Gets skill directories. @return the directories */
126+
public List<String> getSkillDirectories() {
127+
return skillDirectories;
128+
}
129+
130+
/** Sets skill directories. @param skillDirectories the directories */
131+
public void setSkillDirectories(List<String> skillDirectories) {
132+
this.skillDirectories = skillDirectories;
133+
}
134+
135+
/** Gets disabled skills. @return the disabled skill names */
136+
public List<String> getDisabledSkills() {
137+
return disabledSkills;
138+
}
139+
140+
/** Sets disabled skills. @param disabledSkills the skill names to disable */
141+
public void setDisabledSkills(List<String> disabledSkills) {
142+
this.disabledSkills = disabledSkills;
143+
}
118144
}

0 commit comments

Comments
 (0)