mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-01 07:24:38 -07:00
feat: Update client metadata for consistency (#12947)
This commit is contained in:
@@ -103,10 +103,16 @@ describe('client_metadata', () => {
|
|||||||
expect(getReleaseChannel).toHaveBeenCalledTimes(1);
|
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 { getClientMetadata } = await import('./client_metadata.js');
|
||||||
const metadata = await getClientMetadata();
|
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');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -45,7 +45,8 @@ function getPlatform(): ClientMetadataPlatform {
|
|||||||
export async function getClientMetadata(): Promise<ClientMetadata> {
|
export async function getClientMetadata(): Promise<ClientMetadata> {
|
||||||
if (!clientMetadataPromise) {
|
if (!clientMetadataPromise) {
|
||||||
clientMetadataPromise = (async () => ({
|
clientMetadataPromise = (async () => ({
|
||||||
ideName: 'GEMINI_CLI',
|
ideName: 'IDE_UNSPECIFIED',
|
||||||
|
pluginType: 'GEMINI',
|
||||||
ideVersion: process.env['CLI_VERSION'] || process.version,
|
ideVersion: process.env['CLI_VERSION'] || process.version,
|
||||||
platform: getPlatform(),
|
platform: getPlatform(),
|
||||||
updateChannel: await getReleaseChannel(__dirname),
|
updateChannel: await getReleaseChannel(__dirname),
|
||||||
|
|||||||
Reference in New Issue
Block a user