New:Socket for Asana Is Now Available.Learn more
Get Started

@opencode-ai/ai

Package Overview
Dependencies
Maintainers
2
Versions
1103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opencode-ai/ai - npm Package Compare versions

Comparing version
0.0.0-dev-18702
to
0.0.0-dev-18703
+8
-2
dist/protocols/anthropic-messages.js

@@ -683,2 +683,4 @@ import { Buffer } from "node:buffer";

if (part.type === "text") {
if (part.text.trim().length === 0)
continue;
content.push({ type: "text", text: part.text, cache_control: cacheControl(breakpoints, part.cache) });

@@ -693,3 +695,4 @@ continue;

}
messages.push({ role: "user", content });
if (content.length > 0)
messages.push({ role: "user", content });
continue;

@@ -701,2 +704,4 @@ }

if (part.type === "text") {
if (part.text.trim().length === 0)
continue;
content.push({ type: "text", text: part.text, cache_control: cacheControl(breakpoints, part.cache) });

@@ -744,3 +749,4 @@ continue;

}
messages.push({ role: "assistant", content });
if (content.length > 0)
messages.push({ role: "assistant", content });
continue;

@@ -747,0 +753,0 @@ }

+3
-3
{
"$schema": "https://json.schemastore.org/package.json",
"version": "0.0.0-dev-18702",
"version": "0.0.0-dev-18703",
"name": "@opencode-ai/ai",

@@ -33,3 +33,3 @@ "type": "module",

"@effect/platform-node": "4.0.0-rc.112",
"@opencode-ai/http-recorder": "0.0.0-dev-18702",
"@opencode-ai/http-recorder": "0.0.0-dev-18703",
"@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-18702",
"@opencode-ai/schema": "0.0.0-dev-18703",
"aws4fetch": "1.0.20",

@@ -46,0 +46,0 @@ "effect": "4.0.0-rc.112",