Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
56 changes: 28 additions & 28 deletions extensions/copilot/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 extensions/copilot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6351,7 +6351,7 @@
"@anthropic-ai/claude-agent-sdk": "0.2.98",
"@anthropic-ai/sdk": "^0.82.0",
"@github/blackbird-external-ingest-utils": "^0.3.0",
"@github/copilot": "^1.0.21",
"@github/copilot": "^1.0.24",
"@google/genai": "^1.22.0",
"@humanwhocodes/gitignore-to-minimatch": "1.0.2",
"@microsoft/tiktokenizer": "^1.0.10",
Expand Down
4 changes: 2 additions & 2 deletions extensions/copilot/script/postinstall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ async function copyCopilotCliDefinitionFiles() {
}

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

await copyCopilotCLIFolders(sourceDir, targetDir);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export class CopilotCLISessionService extends Disposable implements ICopilotCLIS
this.monitorSessionFiles();
this._sessionManager = new Lazy<Promise<internal.LocalSessionManager>>(async () => {
try {
const { internal } = await this.getSDKPackage();
const { internal, createLocalFeatureFlagService, noopTelemetryBinder } = await this.getSDKPackage();
// Always enable SDK OTel so the debug panel receives native spans via the bridge.
// When user OTel is disabled, we force file exporter to /dev/null so the SDK
// creates OtelSessionTracker (for debug panel) but doesn't export to any collector.
Expand Down Expand Up @@ -202,7 +202,11 @@ export class CopilotCLISessionService extends Disposable implements ICopilotCLIS
process.env['COPILOT_OTEL_EXPORTER_TYPE'] = 'file';
process.env['COPILOT_OTEL_FILE_EXPORTER_PATH'] = devNull;
}
return new internal.LocalSessionManager({ telemetryService: new internal.NoopTelemetryService(), telemetryBinder: undefined, flushDebounceMs: undefined, settings: undefined, version: undefined });
return new internal.LocalSessionManager({
featureFlagService: createLocalFeatureFlagService(),
telemetryService: new internal.NoopTelemetryService(),
telemetryBinder: noopTelemetryBinder
}, { flushDebounceMs: undefined, settings: undefined, version: undefined });
}
catch (error) {
this.logService.error(`Failed to initialize Copilot CLI Session Manager: ${error}`);
Expand All @@ -213,8 +217,8 @@ export class CopilotCLISessionService extends Disposable implements ICopilotCLIS
}

private async getSDKPackage() {
const { internal, LocalSession } = await this.copilotCLISDK.getPackage();
return { internal, LocalSession };
const { internal, LocalSession, createLocalFeatureFlagService, noopTelemetryBinder } = await this.copilotCLISDK.getPackage();
return { internal, LocalSession, createLocalFeatureFlagService, noopTelemetryBinder };
}

getSessionWorkingDirectory(sessionId: string): Uri | undefined {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ describe('CopilotCLISessionService', () => {
beforeEach(async () => {
vi.useRealTimers();
const sdk = {
getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession })),
getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession, createLocalFeatureFlagService: () => ({}), noopTelemetryBinder: {} })),
getRequestId: vi.fn(() => undefined),
} as unknown as ICopilotCLISDK;

Expand Down Expand Up @@ -340,7 +340,7 @@ describe('CopilotCLISessionService', () => {
const sessionDir = URI.file(getCopilotCLISessionDir(sessionId));
const fileSystem = new MockFileSystemService();
const sdk = {
getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession }))
getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession, createLocalFeatureFlagService: () => ({}), noopTelemetryBinder: {} }))
} as unknown as ICopilotCLISDK;
const services = createExtensionUnitTestingServices();
disposables.add(services);
Expand Down Expand Up @@ -379,7 +379,7 @@ describe('CopilotCLISessionService', () => {
const sessionDir = URI.file(getCopilotCLISessionDir(sessionId));
const fileSystem = new MockFileSystemService();
const sdk = {
getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession }))
getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession, createLocalFeatureFlagService: () => ({}), noopTelemetryBinder: {} }))
} as unknown as ICopilotCLISDK;
const services = createExtensionUnitTestingServices();
disposables.add(services);
Expand Down Expand Up @@ -444,7 +444,7 @@ describe('CopilotCLISessionService', () => {
const sessionDir = URI.file(getCopilotCLISessionDir(sessionId));
const fileSystem = new MockFileSystemService();
const sdk = {
getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession }))
getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession, createLocalFeatureFlagService: () => ({}), noopTelemetryBinder: {} }))
} as unknown as ICopilotCLISDK;
const services = createExtensionUnitTestingServices();
disposables.add(services);
Expand Down Expand Up @@ -490,7 +490,7 @@ describe('CopilotCLISessionService', () => {
const sessionDir = URI.file(getCopilotCLISessionDir(sessionId));
const fileSystem = new MockFileSystemService();
const sdk = {
getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession }))
getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession, createLocalFeatureFlagService: () => ({}), noopTelemetryBinder: {} }))
} as unknown as ICopilotCLISDK;
const services = createExtensionUnitTestingServices();
disposables.add(services);
Expand Down Expand Up @@ -742,7 +742,7 @@ describe('CopilotCLISessionService', () => {
const storeMetadataSpy = vi.spyOn(metadataStore, 'storeForkedSessionMetadata');

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

const sdk = {
getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession })),
getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, LocalSession: MockLocalSession, createLocalFeatureFlagService: () => ({}), noopTelemetryBinder: {} })),
getRequestId: vi.fn(() => ({ vscodeRequestId: 'vsc-req-1', copilotRequestId: 'sdk-event-1' })),
} as unknown as ICopilotCLISDK;
const services = disposables.add(createExtensionUnitTestingServices());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ describe('CopilotCLIChatSessionParticipant.handleRequest', () => {
}
});
sdk = {
getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } } })),
getPackage: vi.fn(async () => ({ internal: { LocalSessionManager: MockCliSdkSessionManager, NoopTelemetryService: class { } }, createLocalFeatureFlagService: () => ({}), noopTelemetryBinder: {} })),
getAuthInfo: vi.fn(async () => ({ type: 'token' as const, token: 'valid-token', host: 'https://github.com' })),
} as unknown as ICopilotCLISDK;
const services = disposables.add(createExtensionUnitTestingServices());
Expand Down
Loading