mirror of
https://github.com/cline/cline.git
synced 2026-09-21 05:10:09 +08:00
* fix(sdk): set versioned Cline client-identity headers for Cline provider * address feedback * feat: add platform metadata to client context Include platform, platformVersion, and isMultiRoot in extension client context for CLI, ACP, and VS Code sessions. This provides downstream core/session logic with richer runtime information and distinguishes ACP clients from the standard CLI client. * lint * clean up * fix: resolve client host identity via HostProvider for standalone compatibility cline-session-factory.ts is also bundled into the standalone cline-core (JetBrains), where the 'vscode' module resolves to the generated Proxy-stub module: vscode.env.appName and vscode.version return Proxy objects, which would flow into X-PLATFORM/X-PLATFORM-VERSION header values and fail at request serialization. Resolve the identity through HostProvider.env.getHostVersion() instead — the VS Code hostbridge returns the identical values (vscode.env.appName, vscode.version, ClineClient.VSCode, extension version), and JetBrains' hostbridge returns its real host values, so the standalone stops reporting itself as the VS Code extension as a bonus. Multi-root detection goes through HostProvider.workspace.getWorkspacePaths() for the same reason. Both resolvers degrade gracefully (undefined/false) if the host bridge is unavailable, in which case the header builder falls back to source-derived values. * Add unit test as proof --------- Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
The file is empty.