@opencode-ai/ai
Advanced tools
@@ -288,2 +288,9 @@ import { Effect, Schema } from "effect"; | ||
| } | ||
| if (signature === undefined || signature.trim().length === 0) { | ||
| // Interrupted streams and model switches can leave unsigned reasoning. | ||
| // Preserve readable history as text rather than replay invalid reasoningContent. | ||
| if (part.text.trim().length > 0) | ||
| content.push(...textWithCache(breakpoints, part.text, part.cache)); | ||
| continue; | ||
| } | ||
| content.push({ reasoningContent: { reasoningText: { text: part.text, signature } } }); | ||
@@ -297,3 +304,4 @@ continue; | ||
| } | ||
| messages.push({ role: "assistant", content }); | ||
| if (content.length > 0) | ||
| messages.push({ role: "assistant", content }); | ||
| continue; | ||
@@ -300,0 +308,0 @@ } |
+3
-3
| { | ||
| "$schema": "https://json.schemastore.org/package.json", | ||
| "version": "0.0.0-dev-18438", | ||
| "version": "0.0.0-dev-18447", | ||
| "name": "@opencode-ai/ai", | ||
@@ -33,3 +33,3 @@ "type": "module", | ||
| "@effect/platform-node": "4.0.0-rc.111", | ||
| "@opencode-ai/http-recorder": "0.0.0-dev-18438", | ||
| "@opencode-ai/http-recorder": "0.0.0-dev-18447", | ||
| "@tsconfig/bun": "1.0.9", | ||
@@ -43,3 +43,3 @@ "@types/bun": "1.3.13", | ||
| "@smithy/util-utf8": "4.2.2", | ||
| "@opencode-ai/schema": "0.0.0-dev-18438", | ||
| "@opencode-ai/schema": "0.0.0-dev-18447", | ||
| "aws4fetch": "1.0.20", | ||
@@ -46,0 +46,0 @@ "effect": "4.0.0-rc.111", |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
1367363
0.04%31412
0.03%+ Added
- Removed