From fde0b39b7c97dacb78cb55f3d963aa54f61650ea Mon Sep 17 00:00:00 2001 From: "Khang Ha (Kelvin)" Date: Sat, 7 Feb 2026 05:16:56 +0700 Subject: fix: properly encode file URLs with special characters (#12424) --- script/duplicate-pr.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'script') diff --git a/script/duplicate-pr.ts b/script/duplicate-pr.ts index aba078cec..b77737c1d 100755 --- a/script/duplicate-pr.ts +++ b/script/duplicate-pr.ts @@ -1,6 +1,7 @@ #!/usr/bin/env bun import path from "path" +import { pathToFileURL } from "bun" import { createOpencode } from "@opencode-ai/sdk" import { parseArgs } from "util" @@ -49,7 +50,7 @@ Examples: } parts.push({ type: "file", - url: `file://${resolved}`, + url: pathToFileURL(resolved).href, filename: path.basename(resolved), mime: "text/plain", }) -- cgit v1.2.3