|
|
@@ -422,9 +422,7 @@ const lowerMedia = Effect.fn("AnthropicMessages.lowerMedia")(function* (part: Me
|
|
|
|
|
|
// Tool results may carry structured text, images, and documents. Keep media as provider-native
|
|
|
// content instead of JSON-stringifying base64 into a prompt string.
|
|
|
-const lowerToolResultContentItem = Effect.fnUntraced(function* (
|
|
|
- item: Tool.Content,
|
|
|
-) {
|
|
|
+const lowerToolResultContentItem = Effect.fnUntraced(function* (item: Tool.Content) {
|
|
|
if (item.type === "text") return { type: "text" as const, text: item.text } satisfies AnthropicTextBlock
|
|
|
return yield* lowerMedia({ type: "media", mediaType: item.mime, data: item.uri, filename: item.name })
|
|
|
})
|