From c5c38cad9c444070fa3b18d569fa75eb2ab40407 Mon Sep 17 00:00:00 2001 From: "opencode-agent[bot]" Date: Sat, 18 Apr 2026 16:00:01 +0000 Subject: [PATCH] chore: generate --- packages/opencode/src/tool/read.ts | 6 +++++- packages/opencode/src/util/media.ts | 5 +---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/opencode/src/tool/read.ts b/packages/opencode/src/tool/read.ts index 29d36692c6..c9b3048626 100644 --- a/packages/opencode/src/tool/read.ts +++ b/packages/opencode/src/tool/read.ts @@ -78,7 +78,11 @@ export const ReadTool = Tool.define( yield* lsp.touchFile(filepath, false).pipe(Effect.ignore, Effect.forkIn(scope)) }) - const readSample = Effect.fn("ReadTool.readSample")(function* (filepath: string, fileSize: number, sampleSize: number) { + const readSample = Effect.fn("ReadTool.readSample")(function* ( + filepath: string, + fileSize: number, + sampleSize: number, + ) { if (fileSize === 0) return new Uint8Array() return yield* Effect.scoped( diff --git a/packages/opencode/src/util/media.ts b/packages/opencode/src/util/media.ts index 0e98f53a52..566ac843a6 100644 --- a/packages/opencode/src/util/media.ts +++ b/packages/opencode/src/util/media.ts @@ -18,10 +18,7 @@ export function sniffAttachmentMime(bytes: Uint8Array, fallback: string) { if (startsWith(bytes, [0x47, 0x49, 0x46, 0x38])) return "image/gif" if (startsWith(bytes, [0x42, 0x4d])) return "image/bmp" if (startsWith(bytes, [0x25, 0x50, 0x44, 0x46, 0x2d])) return "application/pdf" - if ( - startsWith(bytes, [0x52, 0x49, 0x46, 0x46]) && - startsWith(bytes.subarray(8), [0x57, 0x45, 0x42, 0x50]) - ) { + if (startsWith(bytes, [0x52, 0x49, 0x46, 0x46]) && startsWith(bytes.subarray(8), [0x57, 0x45, 0x42, 0x50])) { return "image/webp" }