@opencode-ai/ai
Advanced tools
@@ -327,3 +327,8 @@ import { Effect, Encoding, Schema } from "effect"; | ||
| // optionally a positional `cachePoint` marker. | ||
| const lowerSystem = (breakpoints, system) => system.flatMap((part) => textWithCache(breakpoints, part.text, part.cache)); | ||
| const lowerSystem = (breakpoints, system) => { | ||
| const content = system | ||
| .filter((part) => part.text.length > 0) | ||
| .flatMap((part) => textWithCache(breakpoints, part.text, part.cache)); | ||
| return content.length === 0 ? undefined : content; | ||
| }; | ||
| const fromRequest = Effect.fn("BedrockConverse.fromRequest")(function* (request) { | ||
@@ -345,3 +350,3 @@ const toolChoice = request.toolChoice ? yield* lowerToolChoice(request.toolChoice) : undefined; | ||
| })(); | ||
| const system = request.system.length === 0 ? undefined : lowerSystem(breakpoints, request.system); | ||
| const system = lowerSystem(breakpoints, request.system); | ||
| const messages = yield* lowerMessages(request, breakpoints); | ||
@@ -348,0 +353,0 @@ if (breakpoints.dropped > 0) { |
+3
-3
| { | ||
| "$schema": "https://json.schemastore.org/package.json", | ||
| "version": "0.0.0-dev-18701", | ||
| "version": "0.0.0-dev-18702", | ||
| "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-18701", | ||
| "@opencode-ai/http-recorder": "0.0.0-dev-18702", | ||
| "@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-18701", | ||
| "@opencode-ai/schema": "0.0.0-dev-18702", | ||
| "aws4fetch": "1.0.20", | ||
@@ -46,0 +46,0 @@ "effect": "4.0.0-rc.112", |
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.
1545992
0.01%35649
0.01%+ Added
- Removed