Skip to content

Commit 3913b50

Browse files
authored
Update @github/copilot to version 1.0.24 in package.json and package-lock.json (#309257)
* Update Copilot SDK to version 1.0.24 * Updates * Fix tets * Fixes
1 parent 0c1e100 commit 3913b50

File tree

6 files changed

+47
-43
lines changed

6 files changed

+47
-43
lines changed

extensions/copilot/package-lock.json

Lines changed: 28 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

extensions/copilot/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6351,7 +6351,7 @@
63516351
"@anthropic-ai/claude-agent-sdk": "0.2.98",
63526352
"@anthropic-ai/sdk": "^0.82.0",
63536353
"@github/blackbird-external-ingest-utils": "^0.3.0",
6354-
"@github/copilot": "^1.0.21",
6354+
"@github/copilot": "^1.0.24",
63556355
"@google/genai": "^1.22.0",
63566356
"@humanwhocodes/gitignore-to-minimatch": "1.0.2",
63576357
"@microsoft/tiktokenizer": "^1.0.10",

extensions/copilot/script/postinstall.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ async function copyCopilotCliDefinitionFiles() {
8787
}
8888

8989
async function copyCopilotCliSkillsFiles() {
90-
const sourceDir = path.join(REPO_ROOT, 'node_modules', '@github', 'copilot', 'builtin-skills', 'customizing-copilot-cloud-agents-environment');
91-
const targetDir = path.join(REPO_ROOT, 'node_modules', '@github', 'copilot', 'sdk', 'builtin-skills', 'customizing-copilot-cloud-agents-environment');
90+
const sourceDir = path.join(REPO_ROOT, 'node_modules', '@github', 'copilot', 'builtin-skills');
91+
const targetDir = path.join(REPO_ROOT, 'node_modules', '@github', 'copilot', 'sdk', 'builtin-skills');
9292

9393
await copyCopilotCLIFolders(sourceDir, targetDir);
9494
}

extensions/copilot/src/extension/chatSessions/copilotcli/node/copilotcliSessionService.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export class CopilotCLISessionService extends Disposable implements ICopilotCLIS
173173
this.monitorSessionFiles();
174174
this._sessionManager = new Lazy<Promise<internal.LocalSessionManager>>(async () => {
175175
try {
176-
const { internal } = await this.getSDKPackage();
176+
const { internal, createLocalFeatureFlagService, noopTelemetryBinder } = await this.getSDKPackage();
177177
// Always enable SDK OTel so the debug panel receives native spans via the bridge.
178178
// When user OTel is disabled, we force file exporter to /dev/null so the SDK
179179
// creates OtelSessionTracker (for debug panel) but doesn't export to any collector.
@@ -202,7 +202,11 @@ export class CopilotCLISessionService extends Disposable implements ICopilotCLIS
202202
process.env['COPILOT_OTEL_EXPORTER_TYPE'] = 'file';
203203
process.env['COPILOT_OTEL_FILE_EXPORTER_PATH'] = devNull;
204204
}
205-
return new internal.LocalSessionManager({ telemetryService: new internal.NoopTelemetryService(), telemetryBinder: undefined, flushDebounceMs: undefined, settings: undefined, version: undefined });
205+
return new internal.LocalSessionManager({
206+
featureFlagService: createLocalFeatureFlagService(),
207+
telemetryService: new internal.NoopTelemetryService(),
208+
telemetryBinder: noopTelemetryBinder
209+
}, { flushDebounceMs: undefined, settings: undefined, version: undefined });
206210
}
207211
catch (error) {
208212
this.logService.error(`Failed to initialize Copilot CLI Session Manager: ${error}`);
@@ -213,8 +217,8 @@ export class CopilotCLISessionService extends Disposable implements ICopilotCLIS
213217
}
214218

215219
private async getSDKPackage() {
216-
const { internal, LocalSession } = await this.copilotCLISDK.getPackage();
217-
return { internal, LocalSession };
220+
const { internal, LocalSession, createLocalFeatureFlagService, noopTelemetryBinder } = await this.copilotCLISDK.getPackage();
221+
return { internal, LocalSession, createLocalFeatureFlagService, noopTelemetryBinder };
218222
}
219223

220224
getSessionWorkingDirectory(sessionId: string): Uri | undefined {

extensions/copilot/src/extension/chatSessions/copilotcli/node/test/copilotCliSessionService.spec.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ describe('CopilotCLISessionService', () => {
107107
beforeEach(async () => {
108108
vi.useRealTimers();
109109
const sdk = {
110-
getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession })),
110+
getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession, createLocalFeatureFlagService: () => ({}), noopTelemetryBinder: {} })),
111111
getRequestId: vi.fn(() => undefined),
112112
} as unknown as ICopilotCLISDK;
113113

@@ -340,7 +340,7 @@ describe('CopilotCLISessionService', () => {
340340
const sessionDir = URI.file(getCopilotCLISessionDir(sessionId));
341341
const fileSystem = new MockFileSystemService();
342342
const sdk = {
343-
getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession }))
343+
getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession, createLocalFeatureFlagService: () => ({}), noopTelemetryBinder: {} }))
344344
} as unknown as ICopilotCLISDK;
345345
const services = createExtensionUnitTestingServices();
346346
disposables.add(services);
@@ -379,7 +379,7 @@ describe('CopilotCLISessionService', () => {
379379
const sessionDir = URI.file(getCopilotCLISessionDir(sessionId));
380380
const fileSystem = new MockFileSystemService();
381381
const sdk = {
382-
getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession }))
382+
getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession, createLocalFeatureFlagService: () => ({}), noopTelemetryBinder: {} }))
383383
} as unknown as ICopilotCLISDK;
384384
const services = createExtensionUnitTestingServices();
385385
disposables.add(services);
@@ -444,7 +444,7 @@ describe('CopilotCLISessionService', () => {
444444
const sessionDir = URI.file(getCopilotCLISessionDir(sessionId));
445445
const fileSystem = new MockFileSystemService();
446446
const sdk = {
447-
getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession }))
447+
getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession, createLocalFeatureFlagService: () => ({}), noopTelemetryBinder: {} }))
448448
} as unknown as ICopilotCLISDK;
449449
const services = createExtensionUnitTestingServices();
450450
disposables.add(services);
@@ -490,7 +490,7 @@ describe('CopilotCLISessionService', () => {
490490
const sessionDir = URI.file(getCopilotCLISessionDir(sessionId));
491491
const fileSystem = new MockFileSystemService();
492492
const sdk = {
493-
getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession }))
493+
getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession, createLocalFeatureFlagService: () => ({}), noopTelemetryBinder: {} }))
494494
} as unknown as ICopilotCLISDK;
495495
const services = createExtensionUnitTestingServices();
496496
disposables.add(services);
@@ -742,7 +742,7 @@ describe('CopilotCLISessionService', () => {
742742
const storeMetadataSpy = vi.spyOn(metadataStore, 'storeForkedSessionMetadata');
743743

744744
const sdk = {
745-
getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession })),
745+
getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession, createLocalFeatureFlagService: () => ({}), noopTelemetryBinder: {} })),
746746
getRequestId: vi.fn(() => undefined),
747747
} as unknown as ICopilotCLISDK;
748748
const services = disposables.add(createExtensionUnitTestingServices());
@@ -783,7 +783,7 @@ describe('CopilotCLISessionService', () => {
783783
manager.sessions.set(sourceId, sdkSession);
784784

785785
const sdk = {
786-
getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession })),
786+
getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession, createLocalFeatureFlagService: () => ({}), noopTelemetryBinder: {} })),
787787
getRequestId: vi.fn(() => ({ vscodeRequestId: 'vsc-req-1', copilotRequestId: 'sdk-event-1' })),
788788
} as unknown as ICopilotCLISDK;
789789
const services = disposables.add(createExtensionUnitTestingServices());

extensions/copilot/src/extension/chatSessions/vscode-node/test/copilotCLIChatSessionParticipant.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ describe('CopilotCLIChatSessionParticipant.handleRequest', () => {
328328
}
329329
});
330330
sdk = {
331-
getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } } })),
331+
getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, createLocalFeatureFlagService: () => ({}), noopTelemetryBinder: {} })),
332332
getAuthInfo: vi.fn(async () => ({ type: 'token' as const, token: 'valid-token', host: 'https://github.com' })),
333333
} as unknown as ICopilotCLISDK;
334334
const services = disposables.add(createExtensionUnitTestingServices());

0 commit comments

Comments
 (0)