mirror of
https://github.com/cline/cline.git
synced 2026-09-21 13:21:23 +08:00
* fix(llms): update AI SDK deps to fix streamed tool calls with non-zero indexes
LiteLLM's Anthropic passthrough emits chat-completions tool_call deltas
whose index mirrors the Anthropic content-block index (1 when a text
block precedes the tool call; see BerriAI/litellm#11580).
@ai-sdk/provider-utils 5.0.18 stored streamed tool calls in a sparse
array keyed by that index and crashed at stream flush with
"Cannot read properties of undefined (reading 'hasFinished')",
aborting the agent turn. Upstream fixed this in provider-utils 5.0.21
("Fix streamed tool calls with non-zero, non-contiguous, reused, or
missing indexes.").
Update the ai / @ai-sdk packages so every chat-completions streaming
path resolves @ai-sdk/provider-utils 5.0.25, and drop the root
">=4.0.0" override on @ai-sdk/provider-utils: with intersect semantics
it pinned the workspace to the already-locked 5.0.18 even after parents
began requiring 5.0.25, and it force-upgraded dify-ai-provider two
majors past its declared ^3 range. Each package now resolves the
version line it declares.
Fixes #13119
* test(llms): pin non-zero streamed tool_call index regression (#13119)
Wire-level regression test: an openai-compatible SSE stream whose only
tool_call delta carries index 1 (Anthropic content-block numbering via
LiteLLM) must complete and emit the tool-call part instead of throwing
at flush.
* fix: address review findings from merge-conflict resolution
- Restore apps/vscode/proto/cline/state.proto to main's version: the
merge commit's pre-commit hook regenerated it with a stale generator,
deleting auto_approve_all_toggled = 174 and moving a reserved line,
creating drift against the checked-in descriptor. The deletion was
never intended.
- Restore FeatureSettingsSection.tsx to main's version (the same hook
reformatted main's file during the merge).
- Regenerate bun.lock narrowly from main's lockfile without --force so
the diff contains only the @ai-sdk family and its direct transitives;
drop the spurious webview-ui-scoped @radix-ui duplicate entries the
previous install introduced (hoisted resolutions still satisfy
webview-ui's unchanged ranges; verified with --frozen-lockfile).
- Align @ai-sdk/provider to ^4.0.7 in @cline/llms to match the rest of
the AI SDK family and avoid parallel provider resolutions.
Revalidated: wire repro streams to finishReason=tool-calls, @cline/llms
suite passes incl. the index-1 regression test, all workspaces
typecheck, SDK builds clean.
* fix: restore FeatureSettingsSection.tsx to main's formatting
The branch's pre-commit biome hook (--semicolons=as-needed, --write
--staged) strips a blank line from this file whenever it is staged,
which is how the unintended diff appeared in the merge commit. Commit
with --no-verify to keep the file byte-identical to main; this PR does
not touch the VS Code webview.
97 lines
4.2 KiB
JSON
97 lines
4.2 KiB
JSON
{
|
|
"name": "@cline/packages",
|
|
"private": true,
|
|
"workspaces": [
|
|
"sdk/packages/*",
|
|
"apps/*",
|
|
"apps/vscode/webview-ui",
|
|
"apps/vscode/testing-platform",
|
|
"apps/cline-hub/src/webview",
|
|
"apps/examples/*",
|
|
"apps/examples/vscode/src/webview",
|
|
"sdk/examples",
|
|
"sdk/examples/plugins/*"
|
|
],
|
|
"scripts": {
|
|
"prepare": "husky",
|
|
"build": "bun run clean && bun install && bun run build:sdk && bun -F @cline/cli build",
|
|
"build:sdk": "bun --production -F './sdk/packages/*' build",
|
|
"build:apps": "bun -F './apps/**' --production build",
|
|
"build:models": "bun -F @cline/llms generate:models && bun format --write",
|
|
"dev": "bun --conditions=development run build:sdk && bun run cli && bun run cli hub stop",
|
|
"cli": "bun --conditions=development --cwd apps/cli dev",
|
|
"code": "bun --conditions=development -F @cline/code dev",
|
|
"clean": "bun run sdk/scripts/clean.ts",
|
|
"types": "bun --parallel -F '*' typecheck",
|
|
"test": "bun --parallel -F './sdk/packages/**' -F @cline/cli -F @cline/cline-hub test",
|
|
"test:unit": "bash -lc 'set -euo pipefail; bun -F @cline/agents test & p1=$!; bun -F @cline/llms test & p2=$!; bun -F @cline/core test:unit & p3=$!; bun -F @cline/cli test:unit & p4=$!; bun -F @cline/cline-hub test & p5=$!; wait $p1; wait $p2; wait $p3; wait $p4; wait $p5'",
|
|
"test:e2e": "bun -F @cline/core test:e2e && bun -F @cline/cli test:e2e",
|
|
"test:e2e:interactive": "bun -F @cline/cli test:e2e:interactive",
|
|
"verify:routines": "zsh -lc 'cd sdk/packages/core && bunx vitest run src/cron/schedule-service.test.ts --config vitest.config.ts'",
|
|
"verify:workos-device-auth": "bun sdk/scripts/verify-workos-device-auth.ts",
|
|
"biome": "bunx --bun @biomejs/biome",
|
|
"format": "bun biome format sdk/ apps/cli/ apps/cline-hub/ apps/examples/",
|
|
"lint": "bun biome lint sdk/ apps/cli/ apps/cline-hub/ apps/examples/",
|
|
"fix": "bun biome check --write --unsafe --diagnostic-level=error sdk/ apps/cli/ apps/cline-hub/ apps/examples/",
|
|
"check": "bun biome check --diagnostic-level=error sdk/ apps/cli/ apps/cline-hub/ apps/examples/ && bun run build:sdk && bun run -F @cline/cli build && bun -F @cline/cline-hub build:webview && bun --parallel -F './sdk/packages/**' -F @cline/cli -F @cline/cline-hub typecheck && bun sdk/scripts/check-publish.ts",
|
|
"version": "bun run types && bun sdk/scripts/version.ts",
|
|
"release": "bun sdk/scripts/release.ts"
|
|
},
|
|
"lint-staged": {
|
|
"sdk/**": [
|
|
"sh -c 'bun run types'",
|
|
"bun biome check --no-errors-on-unmatched --files-ignore-unknown=true"
|
|
],
|
|
"apps/{cli,cline-hub,examples}/**": [
|
|
"sh -c 'bun run types'",
|
|
"bun biome check --no-errors-on-unmatched --files-ignore-unknown=true"
|
|
]
|
|
},
|
|
"module": "index.ts",
|
|
"type": "module",
|
|
"engines": {
|
|
"bun": "1.3.13",
|
|
"node": ">=22"
|
|
},
|
|
"devDependencies": {
|
|
"@biomejs/biome": "2.4.5",
|
|
"@types/bun": "^1.3.13",
|
|
"@types/node": "^25.3.5",
|
|
"husky": "^9.1.7",
|
|
"lint-staged": "^16.3.2",
|
|
"vitest": "^4.0.18"
|
|
},
|
|
"peerDependencies": {
|
|
"nanoid": "^5.1.7",
|
|
"typescript": "^5.9.3"
|
|
},
|
|
"overrides": {
|
|
"axios": "1.18.0",
|
|
"fast-uri": ">=3.1.4",
|
|
"undici@>=6.0.0 <7.0.0": "6.28.0",
|
|
"@opentui/core": "0.4.3",
|
|
"@opentui/react": "0.4.3",
|
|
"tar-fs": ">=3.1.1",
|
|
"tar": "^7.5.2",
|
|
"js-yaml": "^4.1.1",
|
|
"serialize-javascript": ">=7.0.3",
|
|
"protobufjs": "7.6.5",
|
|
"mermaid": "11.16.0",
|
|
"diff": "8.0.4",
|
|
"@sap-cloud-sdk/connectivity": "4.6.0",
|
|
"@sap-cloud-sdk/http-client": "4.6.0",
|
|
"@sap-cloud-sdk/openapi": "4.6.0",
|
|
"@sap-cloud-sdk/resilience": "4.6.0",
|
|
"@sap-cloud-sdk/util": "4.6.0"
|
|
},
|
|
"trustedDependencies": [
|
|
"better-sqlite3",
|
|
"grpc-tools"
|
|
],
|
|
"packageManager": "bun@1.3.13",
|
|
"patchedDependencies": {
|
|
"@opentui-ui/dialog@0.1.2": "patches/@opentui-ui%2Fdialog@0.1.2.patch",
|
|
"ollama-ai-provider-v2@4.0.1": "patches/ollama-ai-provider-v2@4.0.1.patch"
|
|
}
|
|
}
|