diff --git a/proto/host/env.proto b/proto/host/env.proto index cb596bdcf4..b6ecd56fe8 100644 --- a/proto/host/env.proto +++ b/proto/host/env.proto @@ -16,4 +16,13 @@ service EnvService { // Returns a stable machine identifier for telemetry distinctId purposes. rpc getMachineId(cline.EmptyRequest) returns (cline.String); + + rpc getHostVersion(cline.EmptyRequest) returns (GetHostVersionResponse); +} + +message GetHostVersionResponse { + // The name of the host platform, e.g VSCode + optional string platform = 1; + // The version of the host platform, e.g. 1.103.0 + optional string version = 2; } diff --git a/src/core/task/ToolExecutor.ts b/src/core/task/ToolExecutor.ts index c4e3a78d0b..e7f5f8c5c4 100644 --- a/src/core/task/ToolExecutor.ts +++ b/src/core/task/ToolExecutor.ts @@ -56,6 +56,7 @@ import { AutoApprove } from "./tools/autoApprove" import { showNotificationForApprovalIfAutoApprovalEnabled } from "./utils" import { Mode } from "@shared/storage/types" import { continuationPrompt } from "../prompts/contextManagement" +import { HostProvider } from "@/hosts/host-provider" export class ToolExecutor { private autoApprover: AutoApprove @@ -1897,7 +1898,8 @@ export class ToolExecutor { const operatingSystem = os.platform() + " " + os.release() const clineVersion = vscode.extensions.getExtension("saoudrizwan.claude-dev")?.packageJSON.version || "Unknown" - const systemInfo = `VSCode: ${vscode.version}, Node.js: ${process.version}, Architecture: ${os.arch()}` + const host = await HostProvider.env.getHostVersion({}) + const systemInfo = `${host.platform}: ${host.version}, Node.js: ${process.version}, Architecture: ${os.arch()}` const currentMode = this.mode const apiConfig = this.cacheService.getApiConfiguration() const apiProvider = currentMode === "plan" ? apiConfig.planModeApiProvider : apiConfig.actModeApiProvider diff --git a/src/hosts/vscode/hostbridge/env/getHostVersion.ts b/src/hosts/vscode/hostbridge/env/getHostVersion.ts new file mode 100644 index 0000000000..55d0f7d70a --- /dev/null +++ b/src/hosts/vscode/hostbridge/env/getHostVersion.ts @@ -0,0 +1,7 @@ +import { GetHostVersionResponse } from "@/shared/proto/index.host" +import { EmptyRequest, String } from "@shared/proto/cline/common" +import * as vscode from "vscode" + +export async function getHostVersion(_: EmptyRequest): Promise { + return { platform: "VSCode", version: vscode.version } +}