summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGitHub Action <[email protected]>2026-01-18 16:46:02 +0000
committerGitHub Action <[email protected]>2026-01-18 16:46:02 +0000
commit5009f10406c15c4b69c04fa626756ee7bf81b300 (patch)
tree12cf5ead8b7140d3c9cb0575b96a9c8f23e7dcb8
parent095a64291d8713f7a9b6b2931d28911dc5df9059 (diff)
downloadopencode-5009f10406c15c4b69c04fa626756ee7bf81b300.tar.gz
opencode-5009f10406c15c4b69c04fa626756ee7bf81b300.zip
chore: generate
-rw-r--r--packages/opencode/src/acp/agent.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/opencode/src/acp/agent.ts b/packages/opencode/src/acp/agent.ts
index 469b33b02..6330fae97 100644
--- a/packages/opencode/src/acp/agent.ts
+++ b/packages/opencode/src/acp/agent.ts
@@ -707,7 +707,7 @@ export namespace ACP {
// Replay file attachments as appropriate ACP content blocks.
// OpenCode stores files internally as { type: "file", url, filename, mime }.
// We convert these back to ACP blocks based on the URL scheme and MIME type:
- // - file:// URLs → resource_link
+ // - file:// URLs → resource_link
// - data: URLs with image/* → image block
// - data: URLs with text/* or application/json → resource with text
// - data: URLs with other types → resource with blob
@@ -759,7 +759,11 @@ export namespace ACP {
// Non-image: text types get decoded, binary types stay as blob
const isText = effectiveMime.startsWith("text/") || effectiveMime === "application/json"
const resource = isText
- ? { uri: `file://${filename}`, mimeType: effectiveMime, text: Buffer.from(base64Data, "base64").toString("utf-8") }
+ ? {
+ uri: `file://${filename}`,
+ mimeType: effectiveMime,
+ text: Buffer.from(base64Data, "base64").toString("utf-8"),
+ }
: { uri: `file://${filename}`, mimeType: effectiveMime, blob: base64Data }
await this.connection