feat: Update client metadata for consistency (#12947)

This commit is contained in:
Shreya Keshive
2025-11-12 08:11:48 -08:00
committed by GitHub
parent 1c8fe92d0f
commit 570ccc7da0
2 changed files with 10 additions and 3 deletions

View File

@@ -103,10 +103,16 @@ describe('client_metadata', () => {
expect(getReleaseChannel).toHaveBeenCalledTimes(1);
});
it('should always return the IDE name as GEMINI_CLI', async () => {
it('should always return the IDE name as IDE_UNSPECIFIED', async () => {
const { getClientMetadata } = await import('./client_metadata.js');
const metadata = await getClientMetadata();
expect(metadata.ideName).toBe('GEMINI_CLI');
expect(metadata.ideName).toBe('IDE_UNSPECIFIED');
});
it('should always return the pluginType as GEMINI', async () => {
const { getClientMetadata } = await import('./client_metadata.js');
const metadata = await getClientMetadata();
expect(metadata.pluginType).toBe('GEMINI');
});
});
});

View File

@@ -45,7 +45,8 @@ function getPlatform(): ClientMetadataPlatform {
export async function getClientMetadata(): Promise<ClientMetadata> {
if (!clientMetadataPromise) {
clientMetadataPromise = (async () => ({
ideName: 'GEMINI_CLI',
ideName: 'IDE_UNSPECIFIED',
pluginType: 'GEMINI',
ideVersion: process.env['CLI_VERSION'] || process.version,
platform: getPlatform(),
updateChannel: await getReleaseChannel(__dirname),