Skip to content

Commit c5c38ca

Browse files
chore: generate
1 parent 9918f38 commit c5c38ca

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

packages/opencode/src/tool/read.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@ export const ReadTool = Tool.define(
7878
yield* lsp.touchFile(filepath, false).pipe(Effect.ignore, Effect.forkIn(scope))
7979
})
8080

81-
const readSample = Effect.fn("ReadTool.readSample")(function* (filepath: string, fileSize: number, sampleSize: number) {
81+
const readSample = Effect.fn("ReadTool.readSample")(function* (
82+
filepath: string,
83+
fileSize: number,
84+
sampleSize: number,
85+
) {
8286
if (fileSize === 0) return new Uint8Array()
8387

8488
return yield* Effect.scoped(

packages/opencode/src/util/media.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ export function sniffAttachmentMime(bytes: Uint8Array, fallback: string) {
1818
if (startsWith(bytes, [0x47, 0x49, 0x46, 0x38])) return "image/gif"
1919
if (startsWith(bytes, [0x42, 0x4d])) return "image/bmp"
2020
if (startsWith(bytes, [0x25, 0x50, 0x44, 0x46, 0x2d])) return "application/pdf"
21-
if (
22-
startsWith(bytes, [0x52, 0x49, 0x46, 0x46]) &&
23-
startsWith(bytes.subarray(8), [0x57, 0x45, 0x42, 0x50])
24-
) {
21+
if (startsWith(bytes, [0x52, 0x49, 0x46, 0x46]) && startsWith(bytes.subarray(8), [0x57, 0x45, 0x42, 0x50])) {
2522
return "image/webp"
2623
}
2724

0 commit comments

Comments
 (0)