mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-17 12:42:17 +00:00
chore: generate
This commit is contained in:
parent
981e00971a
commit
bfd707abc9
1 changed files with 7 additions and 9 deletions
|
|
@ -407,15 +407,13 @@ export const layer: Layer.Layer<
|
|||
)
|
||||
const normalized = yield* Effect.forEach(toolAttachments, (attachment) =>
|
||||
attachment.mime.startsWith("image/")
|
||||
? image
|
||||
.normalize(attachment)
|
||||
.pipe(
|
||||
Effect.catchIf(
|
||||
(error) => error instanceof Image.ResizerUnavailableError,
|
||||
() => Effect.succeed(attachment),
|
||||
),
|
||||
Effect.exit,
|
||||
)
|
||||
? image.normalize(attachment).pipe(
|
||||
Effect.catchIf(
|
||||
(error) => error instanceof Image.ResizerUnavailableError,
|
||||
() => Effect.succeed(attachment),
|
||||
),
|
||||
Effect.exit,
|
||||
)
|
||||
: Effect.succeed(Exit.succeed<MessageV2.FilePart>(attachment)),
|
||||
)
|
||||
const omitted = normalized.filter(Exit.isFailure).length
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue