Skip to content

Commit 7f9faa7

Browse files
stephentoubCopilot
andcommitted
Fix CI failures from 1.0.64-0 schema regeneration
- Go: Rename Type field to Discriminator in SessionBinaryAssetData to avoid conflict with the Type() SessionEventType interface method. Update codegen to handle this pattern automatically. - Java: Add null for new maxInlineBinaryBytes param in SessionOptionsUpdateParams constructor call. - Rust: Add exclude_host_skills field to SkillsDiscoverRequest test instantiations. - Python: Add backwards-compat alias SessionFSReaddirWithTypesEntryType in copilot.rpc (generated name changed casing to SessionFs...). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 45b29bc commit 7f9faa7

5 files changed

Lines changed: 10 additions & 2 deletions

File tree

go/rpc/zsession_events.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -872,6 +872,7 @@ CompletableFuture<Void> updateSessionOptionsForMode(CopilotSession session, Bool
872872
null, // skillDirectories
873873
null, // disabledSkills
874874
null, // enableOnDemandInstructionDiscovery
875+
null, // maxInlineBinaryBytes
875876
patchPlugins, // installedPlugins
876877
patchAgents, // customAgentsLocalOnly
877878
null, // suppressCustomAgentPrompt

python/copilot/rpc.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88

99
from .generated.rpc import * # noqa: F401, F403
1010
from .generated.rpc import __all__ # noqa: F401
11+
from .generated.rpc import SessionFsReaddirWithTypesEntryType as SessionFSReaddirWithTypesEntryType # noqa: F401

rust/tests/e2e/rpc_server.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ async fn should_discover_server_mcp_and_skills() {
165165
.rpc()
166166
.skills()
167167
.discover(SkillsDiscoverRequest {
168+
exclude_host_skills: None,
168169
project_paths: None,
169170
skill_directories: Some(vec![
170171
skill_directory.to_string_lossy().to_string(),
@@ -191,6 +192,7 @@ async fn should_discover_server_mcp_and_skills() {
191192
.rpc()
192193
.skills()
193194
.discover(SkillsDiscoverRequest {
195+
exclude_host_skills: None,
194196
project_paths: None,
195197
skill_directories: Some(vec![
196198
skill_directory.to_string_lossy().to_string(),

scripts/codegen/go.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3174,7 +3174,11 @@ export function generateGoSessionEventsCode(
31743174
if (typeof propSchema !== "object") continue;
31753175
const prop = propSchema as JSONSchema7;
31763176
const isReq = required.has(propName);
3177-
const goName = toGoFieldName(propName);
3177+
let goName = toGoFieldName(propName);
3178+
// Avoid conflict with the Type() SessionEventType interface method
3179+
if (goName === "Type") {
3180+
goName = "Discriminator";
3181+
}
31783182
const goType = resolveGoPropertyType(prop, variant.dataClassName, propName, isReq, ctx);
31793183

31803184
if (prop.description) {

0 commit comments

Comments
 (0)