Skip to content

Commit ec1c9f8

Browse files
committed
use production share url
1 parent a85b0a3 commit ec1c9f8

File tree

6 files changed

+15
-5
lines changed

6 files changed

+15
-5
lines changed

opencode.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"$schema": "https://opencode.ai/config.json",
3+
"keybinds": {},
34
"mcp": {}
45
}

packages/opencode/script/postinstall.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ function main() {
8080

8181
// Create symlink to the actual binary
8282
fs.symlinkSync(binaryPath, binScript)
83-
console.log(`OpenCode binary symlinked: ${binScript} -> ${binaryPath}`)
83+
console.log(`opencode binary symlinked: ${binScript} -> ${binaryPath}`)
8484
} catch (error) {
85-
console.error("Failed to create OpenCode binary symlink:", error.message)
85+
console.error("Failed to create opencode binary symlink:", error.message)
8686
process.exit(1)
8787
}
8888
}

packages/opencode/src/cli/cmd/run.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ const TOOL: Record<string, [string, string]> = {
2020
list: ["List", UI.Style.TEXT_INFO_BOLD],
2121
read: ["Read", UI.Style.TEXT_HIGHLIGHT_BOLD],
2222
write: ["Write", UI.Style.TEXT_SUCCESS_BOLD],
23+
websearch: ["Search", UI.Style.TEXT_MUTED_BOLD],
2324
}
2425

2526
export const RunCommand = cmd({
2627
command: "run [message..]",
27-
describe: "Run OpenCode with a message",
28+
describe: "Run opencode with a message",
2829
builder: (yargs: Argv) => {
2930
return yargs
3031
.positional("message", {

packages/opencode/src/installation/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ export namespace Installation {
4141
return VERSION.startsWith("0.0.0")
4242
}
4343

44+
export function isDev() {
45+
return VERSION === "dev"
46+
}
47+
4448
export async function method() {
4549
if (process.execPath.includes(path.join(".opencode", "bin"))) return "curl"
4650
const exec = process.execPath.toLowerCase()

packages/opencode/src/share/share.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { App } from "../app/app"
22
import { Bus } from "../bus"
3+
import { Installation } from "../installation"
34
import { Session } from "../session"
45
import { Storage } from "../storage/storage"
56
import { Log } from "../util/log"
@@ -56,7 +57,10 @@ export namespace Share {
5657
}
5758

5859
export const URL =
59-
process.env["OPENCODE_API"] ?? "https://api.dev.opencode.ai"
60+
process.env["OPENCODE_API"] ??
61+
(Installation.isSnapshot() || Installation.isDev()
62+
? "https://api.dev.opencode.ai"
63+
: "https://api.opencode.ai")
6064

6165
export async function create(sessionID: string) {
6266
return fetch(`${URL}/share_create`, {

packages/opencode/src/tool/websearch.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
- Allows OpenCode to search the web and use the results to inform responses
2+
- Allows opencode to search the web and use the results to inform responses
33
- Provides up-to-date information for current events and recent data
44
- Returns search result information formatted as search result blocks
55
- Use this tool for accessing information beyond Claude's knowledge cutoff

0 commit comments

Comments
 (0)