mirror of
https://github.com/cline/cline.git
synced 2026-10-30 18:12:49 +08:00
VS Code 1.123.0 bumped its bundled runtime from Node 22 to Node 24 (Electron 39 to 42). The Anthropic provider broke on the updated editor because the old SDK (<=0.41.x) shipped a legacy runtime built on node-fetch and an internal _shims layer that does not work under Node 24. 0.50.1 is the first SDK release rewritten on top of the platform's native fetch: it has zero runtime dependencies (no node-fetch, no _shims), which removes the incompatibility. This is the actual fix; the earlier 0.40.1 bump did not change the runtime architecture. The 0.50.1 type changes are minimal: - Usage gained a required server_tool_use field, so fabricated Usage objects in the gemini/o1/openai/vscode-lm transforms set it to null. - ContentBlockParam widened, so Anthropic.MessageParam is no longer structurally assignable to ClineStorageMessage. Handled by narrowing the two transform helpers that only ever receive Cline history (sanitizeAnthropicMessages, convertAnthropicMessageToGemini), typing getSavedApiConversationHistory as the Cline history it reads, and narrowing ContextManager's loosely-typed truncated output back to ClineStorageMessage at the two provider/hook boundaries.