summaryrefslogtreecommitdiffhomepage
path: root/packages
diff options
context:
space:
mode:
authoropencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>2026-04-18 16:00:01 +0000
committeropencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>2026-04-18 16:00:01 +0000
commitc5c38cad9c444070fa3b18d569fa75eb2ab40407 (patch)
treef784903354f94238aef6cac7f793e8f052744b20 /packages
parent9918f389e7ffe0b5b6e6327045ecd6559775f7c6 (diff)
downloadopencode-c5c38cad9c444070fa3b18d569fa75eb2ab40407.tar.gz
opencode-c5c38cad9c444070fa3b18d569fa75eb2ab40407.zip
chore: generate
Diffstat (limited to 'packages')
-rw-r--r--packages/opencode/src/tool/read.ts6
-rw-r--r--packages/opencode/src/util/media.ts5
2 files changed, 6 insertions, 5 deletions
diff --git a/packages/opencode/src/tool/read.ts b/packages/opencode/src/tool/read.ts
index 29d36692c..c9b304862 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 0e98f53a5..566ac843a 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"
}