mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-13 05:12:55 -07:00
fix(core): use dynamic CLI version for IDE client instead of hardcoded '1.0.0' (#24414)
Co-authored-by: cynthialong0-0 <82900738+cynthialong0-0@users.noreply.github.com>
This commit is contained in:
@@ -31,6 +31,7 @@ import {
|
|||||||
createProxyAwareFetch,
|
createProxyAwareFetch,
|
||||||
type StdioConfig,
|
type StdioConfig,
|
||||||
} from './ide-connection-utils.js';
|
} from './ide-connection-utils.js';
|
||||||
|
import { getVersion } from '../utils/version.js';
|
||||||
|
|
||||||
const logger = {
|
const logger = {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
@@ -588,8 +589,7 @@ export class IdeClient {
|
|||||||
logger.debug(`Server URL: ${serverUrl}`);
|
logger.debug(`Server URL: ${serverUrl}`);
|
||||||
this.client = new Client({
|
this.client = new Client({
|
||||||
name: 'streamable-http-client',
|
name: 'streamable-http-client',
|
||||||
// TODO(#3487): use the CLI version here.
|
version: await getVersion(),
|
||||||
version: '1.0.0',
|
|
||||||
});
|
});
|
||||||
transport = new StreamableHTTPClientTransport(new URL(serverUrl), {
|
transport = new StreamableHTTPClientTransport(new URL(serverUrl), {
|
||||||
fetch: await createProxyAwareFetch(ideServerHost),
|
fetch: await createProxyAwareFetch(ideServerHost),
|
||||||
@@ -623,8 +623,7 @@ export class IdeClient {
|
|||||||
logger.debug('Attempting to connect to IDE via stdio');
|
logger.debug('Attempting to connect to IDE via stdio');
|
||||||
this.client = new Client({
|
this.client = new Client({
|
||||||
name: 'stdio-client',
|
name: 'stdio-client',
|
||||||
// TODO(#3487): use the CLI version here.
|
version: await getVersion(),
|
||||||
version: '1.0.0',
|
|
||||||
});
|
});
|
||||||
|
|
||||||
transport = new StdioClientTransport({
|
transport = new StdioClientTransport({
|
||||||
|
|||||||
Reference in New Issue
Block a user