The open source coding agent.
TypeScript
use production share url
Dax Raadec1c9f8cd14e
diff --git a/opencode.json b/opencode.jsonindex 8f9b80710eb..d69947d23bf 100644--- a/opencode.json+++ b/opencode.json@@ -1,4 +1,5 @@{"$schema": "https://opencode.ai/config.json",+ "keybinds": {},"mcp": {}}diff --git a/packages/opencode/script/postinstall.mjs b/packages/opencode/script/postinstall.mjsindex 7bf119269cf..650aa66a207 100644--- a/packages/opencode/script/postinstall.mjs+++ b/packages/opencode/script/postinstall.mjs@@ -80,9 +80,9 @@ function main() {// Create symlink to the actual binaryfs.symlinkSync(binaryPath, binScript)- console.log(`OpenCode binary symlinked: ${binScript} -> ${binaryPath}`)+ console.log(`opencode binary symlinked: ${binScript} -> ${binaryPath}`)} catch (error) {- console.error("Failed to create OpenCode binary symlink:", error.message)+ console.error("Failed to create opencode binary symlink:", error.message)process.exit(1)}}diff --git a/packages/opencode/src/cli/cmd/run.ts b/packages/opencode/src/cli/cmd/run.tsindex 24b51852c03..cf3937ce72d 100644--- a/packages/opencode/src/cli/cmd/run.ts+++ b/packages/opencode/src/cli/cmd/run.ts@@ -20,11 +20,12 @@ const TOOL: Record<string, [string, string]> = {list: ["List", UI.Style.TEXT_INFO_BOLD],read: ["Read", UI.Style.TEXT_HIGHLIGHT_BOLD],write: ["Write", UI.Style.TEXT_SUCCESS_BOLD],+ websearch: ["Search", UI.Style.TEXT_MUTED_BOLD],}export const RunCommand = cmd({command: "run [message..]",- describe: "Run OpenCode with a message",+ describe: "Run opencode with a message",builder: (yargs: Argv) => {return yargs.positional("message", {diff --git a/packages/opencode/src/installation/index.ts b/packages/opencode/src/installation/index.tsindex e7528bcdf81..bb2626eec8c 100644--- a/packages/opencode/src/installation/index.ts+++ b/packages/opencode/src/installation/index.ts@@ -41,6 +41,10 @@ export namespace Installation {return VERSION.startsWith("0.0.0")}+ export function isDev() {+ return VERSION === "dev"+ }+export async function method() {if (process.execPath.includes(path.join(".opencode", "bin"))) return "curl"const exec = process.execPath.toLowerCase()diff --git a/packages/opencode/src/share/share.ts b/packages/opencode/src/share/share.tsindex 8605644c3ba..d47abd885bf 100644--- a/packages/opencode/src/share/share.ts+++ b/packages/opencode/src/share/share.ts@@ -1,5 +1,6 @@import { App } from "../app/app"import { Bus } from "../bus"+import { Installation } from "../installation"import { Session } from "../session"import { Storage } from "../storage/storage"import { Log } from "../util/log"@@ -56,7 +57,10 @@ export namespace Share {}export const URL =- process.env["OPENCODE_API"] ?? "https://api.dev.opencode.ai"+ process.env["OPENCODE_API"] ??+ (Installation.isSnapshot() || Installation.isDev()+ ? "https://api.dev.opencode.ai"+ : "https://api.opencode.ai")export async function create(sessionID: string) {return fetch(`${URL}/share_create`, {diff --git a/packages/opencode/src/tool/websearch.txt b/packages/opencode/src/tool/websearch.txtindex ce119d28f1f..09d2eaa2601 100644--- a/packages/opencode/src/tool/websearch.txt+++ b/packages/opencode/src/tool/websearch.txt@@ -1,5 +1,5 @@-- Allows OpenCode to search the web and use the results to inform responses+- Allows opencode to search the web and use the results to inform responses- Provides up-to-date information for current events and recent data- Returns search result information formatted as search result blocks- Use this tool for accessing information beyond Claude's knowledge cutoff