From f4975ef32a38fc4b605db7d1a87cd85045b4d958 Mon Sep 17 00:00:00 2001 From: Frank Date: Tue, 7 Apr 2026 00:16:32 -0400 Subject: [PATCH 1/4] go: add mimo --- .../console/app/src/routes/workspace/[id]/go/lite-section.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/console/app/src/routes/workspace/[id]/go/lite-section.tsx b/packages/console/app/src/routes/workspace/[id]/go/lite-section.tsx index 2f8ad8aba4..20042ca718 100644 --- a/packages/console/app/src/routes/workspace/[id]/go/lite-section.tsx +++ b/packages/console/app/src/routes/workspace/[id]/go/lite-section.tsx @@ -287,6 +287,8 @@ export function LiteSection() { From 885df8eb54e268e7720242406228e2de54bf62c6 Mon Sep 17 00:00:00 2001 From: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Date: Mon, 6 Apr 2026 23:30:05 -0500 Subject: [PATCH 2/4] feat: add --dangerously-skip-permissions flag to opencode run (#21266) --- packages/opencode/src/cli/cmd/run.ts | 31 ++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/packages/opencode/src/cli/cmd/run.ts b/packages/opencode/src/cli/cmd/run.ts index 92b6156ca7..05fb3a5798 100644 --- a/packages/opencode/src/cli/cmd/run.ts +++ b/packages/opencode/src/cli/cmd/run.ts @@ -302,6 +302,11 @@ export const RunCommand = cmd({ describe: "show thinking blocks", default: false, }) + .option("dangerously-skip-permissions", { + type: "boolean", + describe: "auto-approve permissions that are not explicitly denied (dangerous!)", + default: false, + }) }, handler: async (args) => { let message = [...args.message, ...(args["--"] || [])] @@ -544,15 +549,23 @@ export const RunCommand = cmd({ if (event.type === "permission.asked") { const permission = event.properties if (permission.sessionID !== sessionID) continue - UI.println( - UI.Style.TEXT_WARNING_BOLD + "!", - UI.Style.TEXT_NORMAL + - `permission requested: ${permission.permission} (${permission.patterns.join(", ")}); auto-rejecting`, - ) - await sdk.permission.reply({ - requestID: permission.id, - reply: "reject", - }) + + if (args["dangerously-skip-permissions"]) { + await sdk.permission.reply({ + requestID: permission.id, + reply: "once", + }) + } else { + UI.println( + UI.Style.TEXT_WARNING_BOLD + "!", + UI.Style.TEXT_NORMAL + + `permission requested: ${permission.permission} (${permission.patterns.join(", ")}); auto-rejecting`, + ) + await sdk.permission.reply({ + requestID: permission.id, + reply: "reject", + }) + } } } } From 3ea641340761818f1ed0394635681bd0e20cc3a5 Mon Sep 17 00:00:00 2001 From: "opencode-agent[bot]" Date: Tue, 7 Apr 2026 04:38:49 +0000 Subject: [PATCH 3/4] chore: update nix node_modules hashes --- nix/hashes.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nix/hashes.json b/nix/hashes.json index 3aca064e94..0b8e34e786 100644 --- a/nix/hashes.json +++ b/nix/hashes.json @@ -1,8 +1,8 @@ { "nodeModules": { - "x86_64-linux": "sha256-N9VjIpWT7/9mKHGlhVP72tiXeogSrwzcCnEw4fRO7jk=", - "aarch64-linux": "sha256-F3+fg/yifj92BjiCSMhgOZnzNLQIDIKjyG3NghHe8CI=", - "aarch64-darwin": "sha256-/Rtpblyh6xg+lY608scgJDuCwY52HB87l9RVtQv9w8U=", - "x86_64-darwin": "sha256-JU9vVRmWOIJYxihktlNQ4RAopDSfjW8yZipLGK1cyx0=" + "x86_64-linux": "sha256-r1+AehuOGIOaaxfXkQGracT/6OdFRn5Ub8s7H+MeKFY=", + "aarch64-linux": "sha256-WkMSRF/ZJLyzxNBjpiMR459C9G0NVOEw31tm8roPneA=", + "aarch64-darwin": "sha256-Z127cxFpTl8Ml7PB3CG9TcCU08oYCPuk0FECK2MQ2CI=", + "x86_64-darwin": "sha256-pkRoFtnVjyl+5fm+rrFyRnEwvptxylnFxPAcEv4ZOCg=" } } From 3c96bf84688fa5e56977a1ff95a0b920f1749983 Mon Sep 17 00:00:00 2001 From: gitpush-gitpaid <149759805+gitpush-gitpaid@users.noreply.github.com> Date: Tue, 7 Apr 2026 00:39:59 -0400 Subject: [PATCH 4/4] feat(opencode): Add PDF attachment Drag and Drop (#16926) Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Co-authored-by: Aiden Cline --- .../cli/cmd/tui/component/prompt/index.tsx | 36 +++++++++++++------ .../tui/feature-plugins/home/tips-view.tsx | 2 +- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx index 087742a979..2fef184f57 100644 --- a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx @@ -2,6 +2,7 @@ import { BoxRenderable, TextareaRenderable, MouseEvent, PasteEvent, decodePasteB import { createEffect, createMemo, onMount, createSignal, onCleanup, on, Show, Switch, Match } from "solid-js" import "opentui-spinner/solid" import path from "path" +import { fileURLToPath } from "url" import { Filesystem } from "@/util/filesystem" import { useLocal } from "@tui/context/local" import { useTheme } from "@tui/context/theme" @@ -248,7 +249,7 @@ export function Prompt(props: PromptProps) { onSelect: async () => { const content = await Clipboard.read() if (content?.mime.startsWith("image/")) { - await pasteImage({ + await pasteAttachment({ filename: "clipboard", mime: content.mime, content: content.data, @@ -771,11 +772,16 @@ export function Prompt(props: PromptProps) { ) } - async function pasteImage(file: { filename?: string; content: string; mime: string }) { + async function pasteAttachment(file: { filename?: string; filepath?: string; content: string; mime: string }) { const currentOffset = input.visualCursor.offset const extmarkStart = currentOffset - const count = store.prompt.parts.filter((x) => x.type === "file" && x.mime.startsWith("image/")).length - const virtualText = `[Image ${count + 1}]` + const pdf = file.mime === "application/pdf" + const count = store.prompt.parts.filter((x) => { + if (x.type !== "file") return false + if (pdf) return x.mime === "application/pdf" + return x.mime.startsWith("image/") + }).length + const virtualText = pdf ? `[PDF ${count + 1}]` : `[Image ${count + 1}]` const extmarkEnd = extmarkStart + virtualText.length const textToInsert = virtualText + " " @@ -796,7 +802,7 @@ export function Prompt(props: PromptProps) { url: `data:${file.mime};base64,${file.content}`, source: { type: "file", - path: file.filename ?? "", + path: file.filepath ?? file.filename ?? "", text: { start: extmarkStart, end: extmarkEnd, @@ -926,7 +932,7 @@ export function Prompt(props: PromptProps) { const content = await Clipboard.read() if (content?.mime.startsWith("image/")) { e.preventDefault() - await pasteImage({ + await pasteAttachment({ filename: "clipboard", mime: content.mime, content: content.data, @@ -1012,9 +1018,16 @@ export function Prompt(props: PromptProps) { return } - // trim ' from the beginning and end of the pasted content. just - // ' and nothing else - const filepath = pastedContent.replace(/^'+|'+$/g, "").replace(/\\ /g, " ") + const filepath = iife(() => { + const raw = pastedContent.replace(/^['"]+|['"]+$/g, "") + if (raw.startsWith("file://")) { + try { + return fileURLToPath(raw) + } catch {} + } + if (process.platform === "win32") return raw + return raw.replace(/\\(.)/g, "$1") + }) const isUrl = /^(https?):\/\//.test(filepath) if (!isUrl) { try { @@ -1029,14 +1042,15 @@ export function Prompt(props: PromptProps) { return } } - if (mime.startsWith("image/")) { + if (mime.startsWith("image/") || mime === "application/pdf") { event.preventDefault() const content = await Filesystem.readArrayBuffer(filepath) .then((buffer) => Buffer.from(buffer).toString("base64")) .catch(() => {}) if (content) { - await pasteImage({ + await pasteAttachment({ filename, + filepath, mime, content, }) diff --git a/packages/opencode/src/cli/cmd/tui/feature-plugins/home/tips-view.tsx b/packages/opencode/src/cli/cmd/tui/feature-plugins/home/tips-view.tsx index a87e4ed2b7..1a9d907bb9 100644 --- a/packages/opencode/src/cli/cmd/tui/feature-plugins/home/tips-view.tsx +++ b/packages/opencode/src/cli/cmd/tui/feature-plugins/home/tips-view.tsx @@ -55,7 +55,7 @@ const TIPS = [ "Use {highlight}/undo{/highlight} to revert the last message and file changes", "Use {highlight}/redo{/highlight} to restore previously undone messages and file changes", "Run {highlight}/share{/highlight} to create a public link to your conversation at opencode.ai", - "Drag and drop images into the terminal to add them as context", + "Drag and drop images or PDFs into the terminal to add them as context", "Press {highlight}Ctrl+V{/highlight} to paste images from your clipboard into the prompt", "Press {highlight}Ctrl+X E{/highlight} or {highlight}/editor{/highlight} to compose messages in your external editor", "Run {highlight}/init{/highlight} to auto-generate project rules based on your codebase",