diff --git a/.github/workflows/opencode.yml b/.github/workflows/opencode.yml index 44c8d4a58..4c75ad2e0 100644 --- a/.github/workflows/opencode.yml +++ b/.github/workflows/opencode.yml @@ -29,5 +29,6 @@ jobs: uses: sst/opencode/github@latest env: OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} + OPENCODE_PERMISSION: '{"bash": "deny"}' with: model: opencode/claude-haiku-4-5 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index eea0e21ae..14078661c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -55,7 +55,7 @@ jobs: - name: Install OpenCode if: inputs.bump || inputs.version - run: curl -fsSL https://opencode.ai/install | bash + run: bun i -g opencode-ai@1.0.143 - name: Login to GitHub Container Registry uses: docker/login-action@v3 diff --git a/.opencode/opencode.jsonc b/.opencode/opencode.jsonc index dc0bee7c3..fe70e35fa 100644 --- a/.opencode/opencode.jsonc +++ b/.opencode/opencode.jsonc @@ -1,6 +1,6 @@ { "$schema": "https://opencode.ai/config.json", - "plugin": ["opencode-openai-codex-auth"], + // "plugin": ["opencode-openai-codex-auth"], // "enterprise": { // "url": "https://enterprise.dev.opencode.ai", // }, @@ -10,17 +10,4 @@ "options": {}, }, }, - "mcp": { - "exa": { - "type": "remote", - "url": "https://mcp.exa.ai/mcp", - }, - "morph": { - "type": "local", - "command": ["bunx", "@morphllm/morphmcp"], - "environment": { - "ENABLED_TOOLS": "warp_grep", - }, - }, - }, } diff --git a/bun.lock b/bun.lock index bb83e7682..e775f2df8 100644 --- a/bun.lock +++ b/bun.lock @@ -20,7 +20,7 @@ }, "packages/console/app": { "name": "@opencode-ai/console-app", - "version": "1.0.143", + "version": "1.0.146", "dependencies": { "@cloudflare/vite-plugin": "1.15.2", "@ibm/plex": "6.4.1", @@ -48,7 +48,7 @@ }, "packages/console/core": { "name": "@opencode-ai/console-core", - "version": "1.0.143", + "version": "1.0.146", "dependencies": { "@aws-sdk/client-sts": "3.782.0", "@jsx-email/render": "1.1.1", @@ -75,7 +75,7 @@ }, "packages/console/function": { "name": "@opencode-ai/console-function", - "version": "1.0.143", + "version": "1.0.146", "dependencies": { "@ai-sdk/anthropic": "2.0.0", "@ai-sdk/openai": "2.0.2", @@ -99,7 +99,7 @@ }, "packages/console/mail": { "name": "@opencode-ai/console-mail", - "version": "1.0.143", + "version": "1.0.146", "dependencies": { "@jsx-email/all": "2.2.3", "@jsx-email/cli": "1.4.3", @@ -123,7 +123,7 @@ }, "packages/desktop": { "name": "@opencode-ai/desktop", - "version": "1.0.143", + "version": "1.0.146", "dependencies": { "@kobalte/core": "catalog:", "@opencode-ai/sdk": "workspace:*", @@ -168,7 +168,7 @@ }, "packages/enterprise": { "name": "@opencode-ai/enterprise", - "version": "1.0.143", + "version": "1.0.146", "dependencies": { "@opencode-ai/ui": "workspace:*", "@opencode-ai/util": "workspace:*", @@ -179,6 +179,7 @@ "aws4fetch": "^1.0.20", "hono": "catalog:", "hono-openapi": "catalog:", + "js-base64": "3.7.7", "luxon": "catalog:", "nitro": "3.0.1-alpha.1", "solid-js": "catalog:", @@ -196,7 +197,7 @@ }, "packages/function": { "name": "@opencode-ai/function", - "version": "1.0.143", + "version": "1.0.146", "dependencies": { "@octokit/auth-app": "8.0.1", "@octokit/rest": "22.0.0", @@ -212,7 +213,7 @@ }, "packages/opencode": { "name": "opencode", - "version": "1.0.143", + "version": "1.0.146", "bin": { "opencode": "./bin/opencode", }, @@ -304,7 +305,7 @@ }, "packages/plugin": { "name": "@opencode-ai/plugin", - "version": "1.0.143", + "version": "1.0.146", "dependencies": { "@opencode-ai/sdk": "workspace:*", "zod": "catalog:", @@ -324,7 +325,7 @@ }, "packages/sdk/js": { "name": "@opencode-ai/sdk", - "version": "1.0.143", + "version": "1.0.146", "devDependencies": { "@hey-api/openapi-ts": "0.88.1", "@tsconfig/node22": "catalog:", @@ -335,7 +336,7 @@ }, "packages/slack": { "name": "@opencode-ai/slack", - "version": "1.0.143", + "version": "1.0.146", "dependencies": { "@opencode-ai/sdk": "workspace:*", "@slack/bolt": "^3.17.1", @@ -348,7 +349,7 @@ }, "packages/tauri": { "name": "@opencode-ai/tauri", - "version": "1.0.143", + "version": "1.0.146", "dependencies": { "@opencode-ai/desktop": "workspace:*", "@tauri-apps/api": "^2", @@ -370,7 +371,7 @@ }, "packages/ui": { "name": "@opencode-ai/ui", - "version": "1.0.143", + "version": "1.0.146", "dependencies": { "@kobalte/core": "catalog:", "@opencode-ai/sdk": "workspace:*", @@ -402,7 +403,7 @@ }, "packages/util": { "name": "@opencode-ai/util", - "version": "1.0.143", + "version": "1.0.146", "dependencies": { "zod": "catalog:", }, @@ -413,7 +414,7 @@ }, "packages/web": { "name": "@opencode-ai/web", - "version": "1.0.143", + "version": "1.0.146", "dependencies": { "@astrojs/cloudflare": "12.6.3", "@astrojs/markdown-remark": "6.3.1", diff --git a/infra/enterprise.ts b/infra/enterprise.ts index 70693846a..22b4c6f44 100644 --- a/infra/enterprise.ts +++ b/infra/enterprise.ts @@ -1,10 +1,10 @@ import { SECRET } from "./secret" -import { domain } from "./stage" +import { domain, shortDomain } from "./stage" const storage = new sst.cloudflare.Bucket("EnterpriseStorage") -const enterprise = new sst.cloudflare.x.SolidStart("Enterprise", { - domain: "enterprise." + domain, +const teams = new sst.cloudflare.x.SolidStart("Teams", { + domain: shortDomain, path: "packages/enterprise", buildCommand: "bun run build:cloudflare", environment: { diff --git a/infra/stage.ts b/infra/stage.ts index 729422905..f9a6fd755 100644 --- a/infra/stage.ts +++ b/infra/stage.ts @@ -11,3 +11,9 @@ new cloudflare.RegionalHostname("RegionalHostname", { regionKey: "us", zoneId: zoneID, }) + +export const shortDomain = (() => { + if ($app.stage === "production") return "opncd.ai" + if ($app.stage === "dev") return "dev.opncd.ai" + return `${$app.stage}.dev.opncd.ai` +})() diff --git a/nix/hashes.json b/nix/hashes.json index ee38c07f5..84fe54493 100644 --- a/nix/hashes.json +++ b/nix/hashes.json @@ -1,3 +1,3 @@ { - "nodeModules": "sha256-WQMQmqKojxdRtwv6KL9HBaDfwYa4qPn2pvXKqgNM73A=" + "nodeModules": "sha256-WcFRAG8w1XwgZxzyAawkQ7mYfJxu5VhA3sPApEG6FdI=" } diff --git a/package.json b/package.json index 4579a06f3..39733b931 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "AI-powered development tool", "private": true, "type": "module", - "packageManager": "bun@1.3.4", + "packageManager": "bun@1.3.3", "scripts": { "dev": "bun run --cwd packages/opencode --conditions=browser src/index.ts", "typecheck": "bun turbo typecheck", diff --git a/packages/console/app/package.json b/packages/console/app/package.json index 96a47a46c..0dcc6e4af 100644 --- a/packages/console/app/package.json +++ b/packages/console/app/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/console-app", - "version": "1.0.143", + "version": "1.0.146", "type": "module", "scripts": { "typecheck": "tsgo --noEmit", diff --git a/packages/console/app/src/routes/t/[...path].tsx b/packages/console/app/src/routes/t/[...path].tsx new file mode 100644 index 000000000..b877a8d58 --- /dev/null +++ b/packages/console/app/src/routes/t/[...path].tsx @@ -0,0 +1,20 @@ +import type { APIEvent } from "@solidjs/start/server" + +async function handler(evt: APIEvent) { + const req = evt.request.clone() + const url = new URL(req.url) + const targetUrl = `https://enterprise.opencode.ai/${url.pathname}${url.search}` + const response = await fetch(targetUrl, { + method: req.method, + headers: req.headers, + body: req.body, + }) + return response +} + +export const GET = handler +export const POST = handler +export const PUT = handler +export const DELETE = handler +export const OPTIONS = handler +export const PATCH = handler diff --git a/packages/console/core/package.json b/packages/console/core/package.json index 5540ed2e1..814694f9f 100644 --- a/packages/console/core/package.json +++ b/packages/console/core/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@opencode-ai/console-core", - "version": "1.0.143", + "version": "1.0.146", "private": true, "type": "module", "dependencies": { diff --git a/packages/console/function/package.json b/packages/console/function/package.json index 634d53893..f3e04ea1c 100644 --- a/packages/console/function/package.json +++ b/packages/console/function/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/console-function", - "version": "1.0.143", + "version": "1.0.146", "$schema": "https://json.schemastore.org/package.json", "private": true, "type": "module", diff --git a/packages/console/mail/package.json b/packages/console/mail/package.json index d289b290f..0707ce883 100644 --- a/packages/console/mail/package.json +++ b/packages/console/mail/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/console-mail", - "version": "1.0.143", + "version": "1.0.146", "dependencies": { "@jsx-email/all": "2.2.3", "@jsx-email/cli": "1.4.3", diff --git a/packages/desktop/package.json b/packages/desktop/package.json index 65a8f9d13..6cd02b9ae 100644 --- a/packages/desktop/package.json +++ b/packages/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/desktop", - "version": "1.0.143", + "version": "1.0.146", "description": "", "type": "module", "exports": { diff --git a/packages/desktop/tsconfig.json b/packages/desktop/tsconfig.json index e91a254de..db04f79ca 100644 --- a/packages/desktop/tsconfig.json +++ b/packages/desktop/tsconfig.json @@ -14,11 +14,11 @@ "strict": true, "noEmit": false, "emitDeclarationOnly": true, - "outDir": "ts-dist", + "outDir": "node_modules/.ts-dist", "isolatedModules": true, "paths": { "@/*": ["./src/*"] } }, - "exclude": ["dist"] + "exclude": ["dist", "ts-dist"] } diff --git a/packages/enterprise/package.json b/packages/enterprise/package.json index cba02388e..b273507e0 100644 --- a/packages/enterprise/package.json +++ b/packages/enterprise/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/enterprise", - "version": "1.0.143", + "version": "1.0.146", "private": true, "type": "module", "scripts": { @@ -20,6 +20,7 @@ "@solidjs/meta": "catalog:", "hono": "catalog:", "hono-openapi": "catalog:", + "js-base64": "3.7.7", "luxon": "catalog:", "nitro": "3.0.1-alpha.1", "solid-js": "catalog:", diff --git a/packages/enterprise/src/entry-server.tsx b/packages/enterprise/src/entry-server.tsx index 68f4325c8..fbe5e6e0b 100644 --- a/packages/enterprise/src/entry-server.tsx +++ b/packages/enterprise/src/entry-server.tsx @@ -11,8 +11,6 @@ export default createHandler(() => ( OpenCode - - {assets} diff --git a/packages/enterprise/src/routes/index.tsx b/packages/enterprise/src/routes/index.tsx new file mode 100644 index 000000000..5a743b039 --- /dev/null +++ b/packages/enterprise/src/routes/index.tsx @@ -0,0 +1,3 @@ +export default function () { + return
Hello World
+} diff --git a/packages/enterprise/src/routes/share/[shareID].tsx b/packages/enterprise/src/routes/share/[shareID].tsx index 1c593ca87..fee66b478 100644 --- a/packages/enterprise/src/routes/share/[shareID].tsx +++ b/packages/enterprise/src/routes/share/[shareID].tsx @@ -23,6 +23,8 @@ import { preloadMultiFileDiff, PreloadMultiFileDiffResult } from "@pierre/precis import { Diff as SSRDiff } from "@opencode-ai/ui/diff-ssr" import { clientOnly } from "@solidjs/start" import { type IconName } from "@opencode-ai/ui/icons/provider" +import { Meta } from "@solidjs/meta" +import { Base64 } from "js-base64" const ClientOnlyDiff = clientOnly(() => import("@opencode-ai/ui/diff").then((m) => ({ default: m.Diff }))) @@ -41,6 +43,7 @@ const getData = query(async (shareID) => { const data = await Share.data(shareID) const result: { sessionID: string + shareID: string session: Session[] session_diff: { [sessionID: string]: FileDiff[] @@ -65,6 +68,7 @@ const getData = query(async (shareID) => { } } = { sessionID: share.sessionID, + shareID, session: [], session_diff: { [share.sessionID]: [], @@ -153,244 +157,277 @@ export default function () { ) }} > + {(data) => { const match = createMemo(() => Binary.search(data().session, data().sessionID, (s) => s.id)) if (!match().found) throw new Error(`Session ${data().sessionID} not found`) const info = createMemo(() => data().session[match().index]) + const ogImage = createMemo(() => { + const models = new Set() + const messages = data().message[data().sessionID] ?? [] + for (const msg of messages) { + if (msg.role === "assistant" && msg.modelID) { + models.add(msg.modelID) + } + } + const modelIDs = Array.from(models) + const encodedTitle = encodeURIComponent(Base64.encode(encodeURIComponent(info().title.substring(0, 700)))) + let modelParam: string + if (modelIDs.length === 1) { + modelParam = modelIDs[0] + } else if (modelIDs.length === 2) { + modelParam = encodeURIComponent(`${modelIDs[0]} & ${modelIDs[1]}`) + } else if (modelIDs.length > 2) { + modelParam = encodeURIComponent(`${modelIDs[0]} & ${modelIDs.length - 1} others`) + } else { + modelParam = "unknown" + } + const version = `v${info().version}` + return `https://social-cards.sst.dev/opencode-share/${encodedTitle}.png?model=${modelParam}&version=${version}&id=${data().shareID}` + }) return ( - - - {iife(() => { - const [store, setStore] = createStore({ - messageId: undefined as string | undefined, - }) - const messages = createMemo(() => - data().sessionID - ? (data().message[data().sessionID]?.filter((m) => m.role === "user") ?? []).sort( - (a, b) => b.time.created - a.time.created, - ) - : [], - ) - const firstUserMessage = createMemo(() => messages().at(0)) - const activeMessage = createMemo( - () => messages().find((m) => m.id === store.messageId) ?? firstUserMessage(), - ) - function setActiveMessage(message: UserMessage | undefined) { - if (message) { - setStore("messageId", message.id) - } else { - setStore("messageId", undefined) + <> + + + + + + {iife(() => { + const [store, setStore] = createStore({ + messageId: undefined as string | undefined, + }) + const messages = createMemo(() => + data().sessionID + ? (data().message[data().sessionID]?.filter((m) => m.role === "user") ?? []).sort( + (a, b) => b.time.created - a.time.created, + ) + : [], + ) + const firstUserMessage = createMemo(() => messages().at(0)) + const activeMessage = createMemo( + () => messages().find((m) => m.id === store.messageId) ?? firstUserMessage(), + ) + function setActiveMessage(message: UserMessage | undefined) { + if (message) { + setStore("messageId", message.id) + } else { + setStore("messageId", undefined) + } } - } - const provider = createMemo(() => activeMessage()?.model?.providerID) - const modelID = createMemo(() => activeMessage()?.model?.modelID) - const model = createMemo(() => data().model[data().sessionID]?.find((m) => m.id === modelID())) - const diffs = createMemo(() => { - const diffs = data().session_diff[data().sessionID] ?? [] - const preloaded = data().session_diff_preload[data().sessionID] ?? [] - return diffs.map((diff) => ({ - ...diff, - preloaded: preloaded.find((d) => d.newFile.name === diff.file), - })) - }) - const splitDiffs = createMemo(() => { - const diffs = data().session_diff[data().sessionID] ?? [] - const preloaded = data().session_diff_preload_split[data().sessionID] ?? [] - return diffs.map((diff) => ({ - ...diff, - preloaded: preloaded.find((d) => d.newFile.name === diff.file), - })) - }) + const provider = createMemo(() => activeMessage()?.model?.providerID) + const modelID = createMemo(() => activeMessage()?.model?.modelID) + const model = createMemo(() => data().model[data().sessionID]?.find((m) => m.id === modelID())) + const diffs = createMemo(() => { + const diffs = data().session_diff[data().sessionID] ?? [] + const preloaded = data().session_diff_preload[data().sessionID] ?? [] + return diffs.map((diff) => ({ + ...diff, + preloaded: preloaded.find((d) => d.newFile.name === diff.file), + })) + }) + const splitDiffs = createMemo(() => { + const diffs = data().session_diff[data().sessionID] ?? [] + const preloaded = data().session_diff_preload_split[data().sessionID] ?? [] + return diffs.map((diff) => ({ + ...diff, + preloaded: preloaded.find((d) => d.newFile.name === diff.file), + })) + }) - const title = () => ( -
-
-
- -
v{info().version}
+ const title = () => ( +
+
+
+ +
v{info().version}
+
+
+ +
{model()?.name ?? modelID()}
+
+
+ {DateTime.fromMillis(info().time.created).toFormat("dd MMM yyyy, HH:mm")} +
-
- -
{model()?.name ?? modelID()}
+
{info().title}
+
+ ) + + const turns = () => ( +
+
{title()}
+
+ + {(message) => ( + + )} +
-
- {DateTime.fromMillis(info().time.created).toFormat("dd MMM yyyy, HH:mm")} +
+
-
{info().title}
-
- ) + ) - const turns = () => ( -
-
{title()}
-
- - {(message) => ( - diffs().length === 0) + + return ( +
+
+
+ + + +
+
+ - )} - -
-
- -
-
- ) - - const wide = createMemo(() => diffs().length === 0) - - return ( -
-
-
- - - -
-
- - -
-
-
-
+ +
+ +
1, - "px-6": !wide() && messages().length === 1, + "@container relative shrink-0 pt-14 flex flex-col gap-10 min-h-0 w-full": true, + "mx-auto max-w-146": !wide(), }} > - {title()} -
-
- - 1 ? "pr-6 pl-18" : "px-6"), +
1, + "px-6": !wide() && messages().length === 1, }} > -
- -
- -
-
- 0}> - -
- -
+
+ + 1 + ? "pr-6 pl-18" + : "px-6"), + }} + > +
+ +
+
-
-
-
- - 0}> - - - - Session - - - {diffs().length} Files Changed - - - - {turns()} - - - - - -
- {turns()}
-
-
+ 0}> + +
+ +
+
+
+
+ + 0}> + + + + Session + + + {diffs().length} Files Changed + + + + {turns()} + + + + + +
+ {turns()} +
+
+
+
-
- ) - })} - - + ) + })} + + + ) }} diff --git a/packages/enterprise/vite.config.ts b/packages/enterprise/vite.config.ts index fb51d750c..11ca1729d 100644 --- a/packages/enterprise/vite.config.ts +++ b/packages/enterprise/vite.config.ts @@ -18,7 +18,14 @@ const nitroConfig: any = (() => { })() export default defineConfig({ - plugins: [tailwindcss(), solidStart() as PluginOption, nitro(nitroConfig)], + plugins: [ + tailwindcss(), + solidStart() as PluginOption, + nitro({ + ...nitroConfig, + baseURL: process.env.OPENCODE_BASE_URL, + }), + ], server: { host: "0.0.0.0", allowedHosts: true, diff --git a/packages/extensions/zed/extension.toml b/packages/extensions/zed/extension.toml index 03a0df6f3..252470f54 100644 --- a/packages/extensions/zed/extension.toml +++ b/packages/extensions/zed/extension.toml @@ -1,7 +1,7 @@ id = "opencode" name = "OpenCode" description = "The open source coding agent." -version = "1.0.143" +version = "1.0.146" schema_version = 1 authors = ["Anomaly"] repository = "https://github.com/sst/opencode" @@ -11,26 +11,26 @@ name = "OpenCode" icon = "./icons/opencode.svg" [agent_servers.opencode.targets.darwin-aarch64] -archive = "https://github.com/sst/opencode/releases/download/v1.0.143/opencode-darwin-arm64.zip" +archive = "https://github.com/sst/opencode/releases/download/v1.0.146/opencode-darwin-arm64.zip" cmd = "./opencode" args = ["acp"] [agent_servers.opencode.targets.darwin-x86_64] -archive = "https://github.com/sst/opencode/releases/download/v1.0.143/opencode-darwin-x64.zip" +archive = "https://github.com/sst/opencode/releases/download/v1.0.146/opencode-darwin-x64.zip" cmd = "./opencode" args = ["acp"] [agent_servers.opencode.targets.linux-aarch64] -archive = "https://github.com/sst/opencode/releases/download/v1.0.143/opencode-linux-arm64.tar.gz" +archive = "https://github.com/sst/opencode/releases/download/v1.0.146/opencode-linux-arm64.tar.gz" cmd = "./opencode" args = ["acp"] [agent_servers.opencode.targets.linux-x86_64] -archive = "https://github.com/sst/opencode/releases/download/v1.0.143/opencode-linux-x64.tar.gz" +archive = "https://github.com/sst/opencode/releases/download/v1.0.146/opencode-linux-x64.tar.gz" cmd = "./opencode" args = ["acp"] [agent_servers.opencode.targets.windows-x86_64] -archive = "https://github.com/sst/opencode/releases/download/v1.0.143/opencode-windows-x64.zip" +archive = "https://github.com/sst/opencode/releases/download/v1.0.146/opencode-windows-x64.zip" cmd = "./opencode.exe" args = ["acp"] diff --git a/packages/function/package.json b/packages/function/package.json index 756cedd40..769f96efc 100644 --- a/packages/function/package.json +++ b/packages/function/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/function", - "version": "1.0.143", + "version": "1.0.146", "$schema": "https://json.schemastore.org/package.json", "private": true, "type": "module", diff --git a/packages/opencode/package.json b/packages/opencode/package.json index ae6df98c1..ec7365c42 100644 --- a/packages/opencode/package.json +++ b/packages/opencode/package.json @@ -1,6 +1,6 @@ { "$schema": "https://json.schemastore.org/package.json", - "version": "1.0.143", + "version": "1.0.146", "name": "opencode", "type": "module", "private": true, diff --git a/packages/opencode/src/bus/index.ts b/packages/opencode/src/bus/index.ts index b6ab73e51..edb093f19 100644 --- a/packages/opencode/src/bus/index.ts +++ b/packages/opencode/src/bus/index.ts @@ -7,7 +7,13 @@ import { GlobalBus } from "./global" export namespace Bus { const log = Log.create({ service: "bus" }) type Subscription = (event: any) => void - const disposedEventType = "server.instance.disposed" + + export const InstanceDisposed = BusEvent.define( + "server.instance.disposed", + z.object({ + directory: z.string(), + }), + ) const state = Instance.state( () => { @@ -21,7 +27,7 @@ export namespace Bus { const wildcard = entry.subscriptions.get("*") if (!wildcard) return const event = { - type: disposedEventType, + type: InstanceDisposed.type, properties: { directory: Instance.directory, }, @@ -32,13 +38,6 @@ export namespace Bus { }, ) - export const InstanceDisposed = BusEvent.define( - disposedEventType, - z.object({ - directory: z.string(), - }), - ) - export async function publish( def: Definition, properties: z.output, diff --git a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx index 185c0a5c3..22e740afe 100644 --- a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx +++ b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx @@ -894,7 +894,7 @@ export function Session() { {(file) => ( - + {file.filename} 0}> +{file.additions} diff --git a/packages/opencode/src/project/instance.ts b/packages/opencode/src/project/instance.ts index 4defefa51..5291995a3 100644 --- a/packages/opencode/src/project/instance.ts +++ b/packages/opencode/src/project/instance.ts @@ -3,6 +3,7 @@ import { Context } from "../util/context" import { Project } from "./project" import { State } from "./state" import { iife } from "@/util/iife" +import { GlobalBus } from "@/bus/global" interface Context { directory: string @@ -52,6 +53,15 @@ export const Instance = { Log.Default.info("disposing instance", { directory: Instance.directory }) await State.dispose(Instance.directory) cache.delete(Instance.directory) + GlobalBus.emit("event", { + directory: Instance.directory, + payload: { + type: "server.instance.disposed", + properties: { + directory: Instance.directory, + }, + }, + }) }, async disposeAll() { Log.Default.info("disposing all instances") diff --git a/packages/opencode/src/provider/provider.ts b/packages/opencode/src/provider/provider.ts index 719c3516c..60ce2297b 100644 --- a/packages/opencode/src/provider/provider.ts +++ b/packages/opencode/src/provider/provider.ts @@ -318,6 +318,16 @@ export namespace Provider { }, } }, + cerebras: async () => { + return { + autoload: false, + options: { + headers: { + "X-Cerebras-3rd-Party-Integration": "opencode", + }, + }, + } + }, } export const Model = z diff --git a/packages/opencode/src/provider/transform.ts b/packages/opencode/src/provider/transform.ts index 2ae31acf8..b589d6371 100644 --- a/packages/opencode/src/provider/transform.ts +++ b/packages/opencode/src/provider/transform.ts @@ -74,12 +74,17 @@ export namespace ProviderTransform { return result } + // TODO: rm later + const bugged = + (model.id === "kimi-k2-thinking" && model.providerID === "opencode") || + (model.id === "moonshotai/Kimi-K2-Thinking" && model.providerID === "baseten") if ( model.providerID === "deepseek" || model.api.id.toLowerCase().includes("deepseek") || (model.capabilities.interleaved && typeof model.capabilities.interleaved === "object" && - model.capabilities.interleaved.field === "reasoning_content") + model.capabilities.interleaved.field === "reasoning_content" && + !bugged) ) { return msgs.map((msg) => { if (msg.role === "assistant" && Array.isArray(msg.content)) { @@ -231,9 +236,11 @@ export namespace ProviderTransform { if (model.api.npm === "@ai-sdk/google" || model.api.npm === "@ai-sdk/google-vertex") { result["thinkingConfig"] = { - thinkingLevel: "high", includeThoughts: true, } + if (model.api.id.includes("gemini-3")) { + result["thinkingConfig"]["thinkingLevel"] = "high" + } } if (model.api.id.includes("gpt-5") && !model.api.id.includes("gpt-5-chat")) { diff --git a/packages/opencode/src/server/server.ts b/packages/opencode/src/server/server.ts index 677c6cf13..ac7077bf7 100644 --- a/packages/opencode/src/server/server.ts +++ b/packages/opencode/src/server/server.ts @@ -56,6 +56,7 @@ export namespace Server { export const Event = { Connected: BusEvent.define("server.connected", z.object({})), + Disposed: BusEvent.define("global.disposed", z.object({})), } const app = new Hono() @@ -140,6 +141,35 @@ export namespace Server { }) }, ) + .post( + "/global/dispose", + describeRoute({ + summary: "Dispose instance", + description: "Clean up and dispose all OpenCode instances, releasing all resources.", + operationId: "global.dispose", + responses: { + 200: { + description: "Global disposed", + content: { + "application/json": { + schema: resolver(z.boolean()), + }, + }, + }, + }, + }), + async (c) => { + await Instance.disposeAll() + GlobalBus.emit("event", { + directory: "global", + payload: { + type: Event.Disposed.type, + properties: {}, + }, + }) + return c.json(true) + }, + ) .use(async (c, next) => { const directory = c.req.query("directory") ?? c.req.header("x-opencode-directory") ?? process.cwd() return Instance.provide({ diff --git a/packages/opencode/src/session/index.ts b/packages/opencode/src/session/index.ts index 484a1a8a7..bf3135284 100644 --- a/packages/opencode/src/session/index.ts +++ b/packages/opencode/src/session/index.ts @@ -223,34 +223,13 @@ export namespace Session { if (cfg.share === "disabled") { throw new Error("Sharing is disabled in configuration") } - - if (cfg.enterprise?.url) { - const { ShareNext } = await import("@/share/share-next") - const share = await ShareNext.create(id) - await update(id, (draft) => { - draft.share = { - url: share.url, - } - }) - } - - const session = await get(id) - if (session.share) return session.share - const { Share } = await import("../share/share") - const share = await Share.create(id) + const { ShareNext } = await import("@/share/share-next") + const share = await ShareNext.create(id) await update(id, (draft) => { draft.share = { url: share.url, } }) - await Storage.write(["share", id], share) - await Share.sync("session/info/" + id, session) - for (const msg of await messages({ sessionID: id })) { - await Share.sync("session/message/" + id + "/" + msg.info.id, msg.info) - for (const part of msg.parts) { - await Share.sync("session/part/" + id + "/" + msg.info.id + "/" + part.id, part) - } - } return share }) diff --git a/packages/opencode/src/share/share-next.ts b/packages/opencode/src/share/share-next.ts index 5196aeb98..fea9c3bb9 100644 --- a/packages/opencode/src/share/share-next.ts +++ b/packages/opencode/src/share/share-next.ts @@ -11,9 +11,11 @@ import type * as SDK from "@opencode-ai/sdk/v2" export namespace ShareNext { const log = Log.create({ service: "share-next" }) + async function url() { + return Config.get().then((x) => x.enterprise?.url ?? "https://opncd.ai") + } + export async function init() { - const config = await Config.get() - if (!config.enterprise) return Bus.subscribe(Session.Event.Updated, async (evt) => { await sync(evt.properties.info.id, [ { @@ -62,8 +64,7 @@ export namespace ShareNext { export async function create(sessionID: string) { log.info("creating share", { sessionID }) - const url = await Config.get().then((x) => x.enterprise!.url) - const result = await fetch(`${url}/api/share`, { + const result = await fetch(`${await url()}/api/share`, { method: "POST", headers: { "Content-Type": "application/json", @@ -126,11 +127,10 @@ export namespace ShareNext { const queued = queue.get(sessionID) if (!queued) return queue.delete(sessionID) - const url = await Config.get().then((x) => x.enterprise!.url) const share = await get(sessionID) if (!share) return - await fetch(`${url}/api/share/${share.id}/sync`, { + await fetch(`${await url()}/api/share/${share.id}/sync`, { method: "POST", headers: { "Content-Type": "application/json", @@ -146,10 +146,9 @@ export namespace ShareNext { export async function remove(sessionID: string) { log.info("removing share", { sessionID }) - const url = await Config.get().then((x) => x.enterprise!.url) const share = await get(sessionID) if (!share) return - await fetch(`${url}/api/share/${share.id}`, { + await fetch(`${await url()}/api/share/${share.id}`, { method: "DELETE", headers: { "Content-Type": "application/json", diff --git a/packages/opencode/src/tool/bash.txt b/packages/opencode/src/tool/bash.txt index 2773d3b85..8eadc500b 100644 --- a/packages/opencode/src/tool/bash.txt +++ b/packages/opencode/src/tool/bash.txt @@ -20,8 +20,7 @@ Usage notes: - The command argument is required. - You can specify an optional timeout in milliseconds (up to 600000ms / 10 minutes). If not specified, commands will timeout after 120000ms (2 minutes). - - It is very helpful if you write a clear, concise description of what this command - does in 5-10 words. + - The description argument is required. You must write a clear, concise description of what this command does in 5-10 words. - If the output exceeds 30000 characters, output will be truncated before being returned to you. - You can use the `run_in_background` parameter to run the command in the background, diff --git a/packages/plugin/package.json b/packages/plugin/package.json index f036a7cb3..e0620e4ce 100644 --- a/packages/plugin/package.json +++ b/packages/plugin/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@opencode-ai/plugin", - "version": "1.0.143", + "version": "1.0.146", "type": "module", "scripts": { "typecheck": "tsgo --noEmit", diff --git a/packages/sdk/js/package.json b/packages/sdk/js/package.json index f4bb68eb5..214be5dba 100644 --- a/packages/sdk/js/package.json +++ b/packages/sdk/js/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@opencode-ai/sdk", - "version": "1.0.143", + "version": "1.0.146", "type": "module", "scripts": { "typecheck": "tsgo --noEmit", diff --git a/packages/sdk/js/src/v2/gen/sdk.gen.ts b/packages/sdk/js/src/v2/gen/sdk.gen.ts index 368113085..90df76c22 100644 --- a/packages/sdk/js/src/v2/gen/sdk.gen.ts +++ b/packages/sdk/js/src/v2/gen/sdk.gen.ts @@ -28,6 +28,7 @@ import type { FindSymbolsResponses, FindTextResponses, FormatterStatusResponses, + GlobalDisposeResponses, GlobalEventResponses, InstanceDisposeResponses, LspStatusResponses, @@ -193,6 +194,18 @@ export class Global extends HeyApiClient { ...options, }) } + + /** + * Dispose instance + * + * Clean up and dispose all OpenCode instances, releasing all resources. + */ + public dispose(options?: Options) { + return (options?.client ?? this.client).post({ + url: "/global/dispose", + ...options, + }) + } } export class Project extends HeyApiClient { diff --git a/packages/sdk/js/src/v2/gen/types.gen.ts b/packages/sdk/js/src/v2/gen/types.gen.ts index 716bae9f8..dade066c0 100644 --- a/packages/sdk/js/src/v2/gen/types.gen.ts +++ b/packages/sdk/js/src/v2/gen/types.gen.ts @@ -725,6 +725,13 @@ export type EventServerConnected = { } } +export type EventGlobalDisposed = { + type: "global.disposed" + properties: { + [key: string]: unknown + } +} + export type Event = | EventInstallationUpdated | EventInstallationUpdateAvailable @@ -759,6 +766,7 @@ export type Event = | EventPtyExited | EventPtyDeleted | EventServerConnected + | EventGlobalDisposed export type GlobalEvent = { directory: string @@ -1700,6 +1708,22 @@ export type GlobalEventResponses = { export type GlobalEventResponse = GlobalEventResponses[keyof GlobalEventResponses] +export type GlobalDisposeData = { + body?: never + path?: never + query?: never + url: "/global/dispose" +} + +export type GlobalDisposeResponses = { + /** + * Global disposed + */ + 200: boolean +} + +export type GlobalDisposeResponse = GlobalDisposeResponses[keyof GlobalDisposeResponses] + export type ProjectListData = { body?: never path?: never diff --git a/packages/sdk/openapi.json b/packages/sdk/openapi.json index 20ea2be5d..93f8746e9 100644 --- a/packages/sdk/openapi.json +++ b/packages/sdk/openapi.json @@ -31,6 +31,31 @@ ] } }, + "/global/dispose": { + "post": { + "operationId": "global.dispose", + "summary": "Dispose instance", + "description": "Clean up and dispose all OpenCode instances, releasing all resources.", + "responses": { + "200": { + "description": "Global disposed", + "content": { + "application/json": { + "schema": { + "type": "boolean" + } + } + } + } + }, + "x-codeSamples": [ + { + "lang": "js", + "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})" + } + ] + } + }, "/project": { "get": { "operationId": "project.list", @@ -6810,6 +6835,20 @@ }, "required": ["type", "properties"] }, + "Event.global.disposed": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "global.disposed" + }, + "properties": { + "type": "object", + "properties": {} + } + }, + "required": ["type", "properties"] + }, "Event": { "anyOf": [ { @@ -6910,6 +6949,9 @@ }, { "$ref": "#/components/schemas/Event.server.connected" + }, + { + "$ref": "#/components/schemas/Event.global.disposed" } ] }, diff --git a/packages/slack/package.json b/packages/slack/package.json index 8ba4dd3c3..9c9d455e4 100644 --- a/packages/slack/package.json +++ b/packages/slack/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/slack", - "version": "1.0.143", + "version": "1.0.146", "type": "module", "scripts": { "dev": "bun run src/index.ts", diff --git a/packages/tauri/package.json b/packages/tauri/package.json index 61b781ac6..0826de1e3 100644 --- a/packages/tauri/package.json +++ b/packages/tauri/package.json @@ -1,7 +1,7 @@ { "name": "@opencode-ai/tauri", "private": true, - "version": "1.0.143", + "version": "1.0.146", "type": "module", "scripts": { "typecheck": "tsgo -b", diff --git a/packages/tauri/src-tauri/icons/128x128.png b/packages/tauri/src-tauri/icons/128x128.png index 57d061b44..caf7b02eb 100644 Binary files a/packages/tauri/src-tauri/icons/128x128.png and b/packages/tauri/src-tauri/icons/128x128.png differ diff --git a/packages/tauri/src-tauri/icons/128x128@2x.png b/packages/tauri/src-tauri/icons/128x128@2x.png index a87a4c3cc..47fe4c61e 100644 Binary files a/packages/tauri/src-tauri/icons/128x128@2x.png and b/packages/tauri/src-tauri/icons/128x128@2x.png differ diff --git a/packages/tauri/src-tauri/icons/32x32.png b/packages/tauri/src-tauri/icons/32x32.png index 8383b4730..5868bcc93 100644 Binary files a/packages/tauri/src-tauri/icons/32x32.png and b/packages/tauri/src-tauri/icons/32x32.png differ diff --git a/packages/tauri/src-tauri/icons/64x64.png b/packages/tauri/src-tauri/icons/64x64.png index ef3b81179..1ed7425d8 100644 Binary files a/packages/tauri/src-tauri/icons/64x64.png and b/packages/tauri/src-tauri/icons/64x64.png differ diff --git a/packages/tauri/src-tauri/icons/Square107x107Logo.png b/packages/tauri/src-tauri/icons/Square107x107Logo.png index c80eb8909..1db249bf7 100644 Binary files a/packages/tauri/src-tauri/icons/Square107x107Logo.png and b/packages/tauri/src-tauri/icons/Square107x107Logo.png differ diff --git a/packages/tauri/src-tauri/icons/Square142x142Logo.png b/packages/tauri/src-tauri/icons/Square142x142Logo.png index bb767ed97..1961c3408 100644 Binary files a/packages/tauri/src-tauri/icons/Square142x142Logo.png and b/packages/tauri/src-tauri/icons/Square142x142Logo.png differ diff --git a/packages/tauri/src-tauri/icons/Square150x150Logo.png b/packages/tauri/src-tauri/icons/Square150x150Logo.png index 15cc8e0d2..abc507347 100644 Binary files a/packages/tauri/src-tauri/icons/Square150x150Logo.png and b/packages/tauri/src-tauri/icons/Square150x150Logo.png differ diff --git a/packages/tauri/src-tauri/icons/Square284x284Logo.png b/packages/tauri/src-tauri/icons/Square284x284Logo.png index 5d78834e0..51e2a1b9f 100644 Binary files a/packages/tauri/src-tauri/icons/Square284x284Logo.png and b/packages/tauri/src-tauri/icons/Square284x284Logo.png differ diff --git a/packages/tauri/src-tauri/icons/Square30x30Logo.png b/packages/tauri/src-tauri/icons/Square30x30Logo.png index f78bf4c5a..066a1fd0c 100644 Binary files a/packages/tauri/src-tauri/icons/Square30x30Logo.png and b/packages/tauri/src-tauri/icons/Square30x30Logo.png differ diff --git a/packages/tauri/src-tauri/icons/Square310x310Logo.png b/packages/tauri/src-tauri/icons/Square310x310Logo.png index 2419f9209..2a85c8e95 100644 Binary files a/packages/tauri/src-tauri/icons/Square310x310Logo.png and b/packages/tauri/src-tauri/icons/Square310x310Logo.png differ diff --git a/packages/tauri/src-tauri/icons/Square44x44Logo.png b/packages/tauri/src-tauri/icons/Square44x44Logo.png index 3f665e55a..c855b8063 100644 Binary files a/packages/tauri/src-tauri/icons/Square44x44Logo.png and b/packages/tauri/src-tauri/icons/Square44x44Logo.png differ diff --git a/packages/tauri/src-tauri/icons/Square71x71Logo.png b/packages/tauri/src-tauri/icons/Square71x71Logo.png index f4d9d20d8..c8168f711 100644 Binary files a/packages/tauri/src-tauri/icons/Square71x71Logo.png and b/packages/tauri/src-tauri/icons/Square71x71Logo.png differ diff --git a/packages/tauri/src-tauri/icons/Square89x89Logo.png b/packages/tauri/src-tauri/icons/Square89x89Logo.png index 07be723db..19ec1777d 100644 Binary files a/packages/tauri/src-tauri/icons/Square89x89Logo.png and b/packages/tauri/src-tauri/icons/Square89x89Logo.png differ diff --git a/packages/tauri/src-tauri/icons/StoreLogo.png b/packages/tauri/src-tauri/icons/StoreLogo.png index 3e78e8d3e..3fd053d34 100644 Binary files a/packages/tauri/src-tauri/icons/StoreLogo.png and b/packages/tauri/src-tauri/icons/StoreLogo.png differ diff --git a/packages/tauri/src-tauri/icons/android/mipmap-hdpi/ic_launcher.png b/packages/tauri/src-tauri/icons/android/mipmap-hdpi/ic_launcher.png index 6e500bb7e..4f3ea0e36 100644 Binary files a/packages/tauri/src-tauri/icons/android/mipmap-hdpi/ic_launcher.png and b/packages/tauri/src-tauri/icons/android/mipmap-hdpi/ic_launcher.png differ diff --git a/packages/tauri/src-tauri/icons/android/mipmap-hdpi/ic_launcher_foreground.png b/packages/tauri/src-tauri/icons/android/mipmap-hdpi/ic_launcher_foreground.png index 23b5818ac..7db80699b 100644 Binary files a/packages/tauri/src-tauri/icons/android/mipmap-hdpi/ic_launcher_foreground.png and b/packages/tauri/src-tauri/icons/android/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/packages/tauri/src-tauri/icons/android/mipmap-hdpi/ic_launcher_round.png b/packages/tauri/src-tauri/icons/android/mipmap-hdpi/ic_launcher_round.png index 69d1023ec..a54ebe652 100644 Binary files a/packages/tauri/src-tauri/icons/android/mipmap-hdpi/ic_launcher_round.png and b/packages/tauri/src-tauri/icons/android/mipmap-hdpi/ic_launcher_round.png differ diff --git a/packages/tauri/src-tauri/icons/android/mipmap-mdpi/ic_launcher.png b/packages/tauri/src-tauri/icons/android/mipmap-mdpi/ic_launcher.png index e67031171..9337ccfa3 100644 Binary files a/packages/tauri/src-tauri/icons/android/mipmap-mdpi/ic_launcher.png and b/packages/tauri/src-tauri/icons/android/mipmap-mdpi/ic_launcher.png differ diff --git a/packages/tauri/src-tauri/icons/android/mipmap-mdpi/ic_launcher_foreground.png b/packages/tauri/src-tauri/icons/android/mipmap-mdpi/ic_launcher_foreground.png index d274f1c9d..0bfc1082e 100644 Binary files a/packages/tauri/src-tauri/icons/android/mipmap-mdpi/ic_launcher_foreground.png and b/packages/tauri/src-tauri/icons/android/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/packages/tauri/src-tauri/icons/android/mipmap-mdpi/ic_launcher_round.png b/packages/tauri/src-tauri/icons/android/mipmap-mdpi/ic_launcher_round.png index 167af3864..5b02ec732 100644 Binary files a/packages/tauri/src-tauri/icons/android/mipmap-mdpi/ic_launcher_round.png and b/packages/tauri/src-tauri/icons/android/mipmap-mdpi/ic_launcher_round.png differ diff --git a/packages/tauri/src-tauri/icons/android/mipmap-xhdpi/ic_launcher.png b/packages/tauri/src-tauri/icons/android/mipmap-xhdpi/ic_launcher.png index 237b8fb29..322aeaeaa 100644 Binary files a/packages/tauri/src-tauri/icons/android/mipmap-xhdpi/ic_launcher.png and b/packages/tauri/src-tauri/icons/android/mipmap-xhdpi/ic_launcher.png differ diff --git a/packages/tauri/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_foreground.png b/packages/tauri/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_foreground.png index d6299e807..ca1e336cc 100644 Binary files a/packages/tauri/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_foreground.png and b/packages/tauri/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/packages/tauri/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_round.png b/packages/tauri/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_round.png index 999e00638..f71110799 100644 Binary files a/packages/tauri/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_round.png and b/packages/tauri/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/packages/tauri/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher.png b/packages/tauri/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher.png index 262667374..287a6b500 100644 Binary files a/packages/tauri/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher.png and b/packages/tauri/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher.png differ diff --git a/packages/tauri/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_foreground.png b/packages/tauri/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_foreground.png index 4e04fbca4..9d3d06a86 100644 Binary files a/packages/tauri/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_foreground.png and b/packages/tauri/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/packages/tauri/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_round.png b/packages/tauri/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_round.png index cda7c3e6d..d4b6fde1b 100644 Binary files a/packages/tauri/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_round.png and b/packages/tauri/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/packages/tauri/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher.png b/packages/tauri/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher.png index cb9d5ef52..bde8d7596 100644 Binary files a/packages/tauri/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher.png and b/packages/tauri/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/packages/tauri/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_foreground.png b/packages/tauri/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_foreground.png index 557ddef40..03df7809d 100644 Binary files a/packages/tauri/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_foreground.png and b/packages/tauri/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/packages/tauri/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_round.png b/packages/tauri/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_round.png index df0abee51..62363be04 100644 Binary files a/packages/tauri/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_round.png and b/packages/tauri/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/packages/tauri/src-tauri/icons/icon.icns b/packages/tauri/src-tauri/icons/icon.icns index 0e47ddc16..be910ad5f 100644 Binary files a/packages/tauri/src-tauri/icons/icon.icns and b/packages/tauri/src-tauri/icons/icon.icns differ diff --git a/packages/tauri/src-tauri/icons/icon.ico b/packages/tauri/src-tauri/icons/icon.ico index 7749a74b1..ff88d21e4 100644 Binary files a/packages/tauri/src-tauri/icons/icon.ico and b/packages/tauri/src-tauri/icons/icon.ico differ diff --git a/packages/tauri/src-tauri/icons/icon.png b/packages/tauri/src-tauri/icons/icon.png index ae5fdabbe..0ecbb6d5f 100644 Binary files a/packages/tauri/src-tauri/icons/icon.png and b/packages/tauri/src-tauri/icons/icon.png differ diff --git a/packages/tauri/src-tauri/icons/ios/AppIcon-20x20@1x.png b/packages/tauri/src-tauri/icons/ios/AppIcon-20x20@1x.png index 36d7ee388..eb137e164 100644 Binary files a/packages/tauri/src-tauri/icons/ios/AppIcon-20x20@1x.png and b/packages/tauri/src-tauri/icons/ios/AppIcon-20x20@1x.png differ diff --git a/packages/tauri/src-tauri/icons/ios/AppIcon-20x20@2x-1.png b/packages/tauri/src-tauri/icons/ios/AppIcon-20x20@2x-1.png index 871f8e39d..aa76ab10b 100644 Binary files a/packages/tauri/src-tauri/icons/ios/AppIcon-20x20@2x-1.png and b/packages/tauri/src-tauri/icons/ios/AppIcon-20x20@2x-1.png differ diff --git a/packages/tauri/src-tauri/icons/ios/AppIcon-20x20@2x.png b/packages/tauri/src-tauri/icons/ios/AppIcon-20x20@2x.png index 871f8e39d..aa76ab10b 100644 Binary files a/packages/tauri/src-tauri/icons/ios/AppIcon-20x20@2x.png and b/packages/tauri/src-tauri/icons/ios/AppIcon-20x20@2x.png differ diff --git a/packages/tauri/src-tauri/icons/ios/AppIcon-20x20@3x.png b/packages/tauri/src-tauri/icons/ios/AppIcon-20x20@3x.png index 007046c4a..c58ea3d49 100644 Binary files a/packages/tauri/src-tauri/icons/ios/AppIcon-20x20@3x.png and b/packages/tauri/src-tauri/icons/ios/AppIcon-20x20@3x.png differ diff --git a/packages/tauri/src-tauri/icons/ios/AppIcon-29x29@1x.png b/packages/tauri/src-tauri/icons/ios/AppIcon-29x29@1x.png index 288506f61..0eeb4d9bf 100644 Binary files a/packages/tauri/src-tauri/icons/ios/AppIcon-29x29@1x.png and b/packages/tauri/src-tauri/icons/ios/AppIcon-29x29@1x.png differ diff --git a/packages/tauri/src-tauri/icons/ios/AppIcon-29x29@2x-1.png b/packages/tauri/src-tauri/icons/ios/AppIcon-29x29@2x-1.png index 013281df8..32601c70a 100644 Binary files a/packages/tauri/src-tauri/icons/ios/AppIcon-29x29@2x-1.png and b/packages/tauri/src-tauri/icons/ios/AppIcon-29x29@2x-1.png differ diff --git a/packages/tauri/src-tauri/icons/ios/AppIcon-29x29@2x.png b/packages/tauri/src-tauri/icons/ios/AppIcon-29x29@2x.png index 013281df8..32601c70a 100644 Binary files a/packages/tauri/src-tauri/icons/ios/AppIcon-29x29@2x.png and b/packages/tauri/src-tauri/icons/ios/AppIcon-29x29@2x.png differ diff --git a/packages/tauri/src-tauri/icons/ios/AppIcon-29x29@3x.png b/packages/tauri/src-tauri/icons/ios/AppIcon-29x29@3x.png index b042fbdda..a372c4a11 100644 Binary files a/packages/tauri/src-tauri/icons/ios/AppIcon-29x29@3x.png and b/packages/tauri/src-tauri/icons/ios/AppIcon-29x29@3x.png differ diff --git a/packages/tauri/src-tauri/icons/ios/AppIcon-40x40@1x.png b/packages/tauri/src-tauri/icons/ios/AppIcon-40x40@1x.png index 871f8e39d..aa76ab10b 100644 Binary files a/packages/tauri/src-tauri/icons/ios/AppIcon-40x40@1x.png and b/packages/tauri/src-tauri/icons/ios/AppIcon-40x40@1x.png differ diff --git a/packages/tauri/src-tauri/icons/ios/AppIcon-40x40@2x-1.png b/packages/tauri/src-tauri/icons/ios/AppIcon-40x40@2x-1.png index a78ec7334..e82ce2765 100644 Binary files a/packages/tauri/src-tauri/icons/ios/AppIcon-40x40@2x-1.png and b/packages/tauri/src-tauri/icons/ios/AppIcon-40x40@2x-1.png differ diff --git a/packages/tauri/src-tauri/icons/ios/AppIcon-40x40@2x.png b/packages/tauri/src-tauri/icons/ios/AppIcon-40x40@2x.png index a78ec7334..e82ce2765 100644 Binary files a/packages/tauri/src-tauri/icons/ios/AppIcon-40x40@2x.png and b/packages/tauri/src-tauri/icons/ios/AppIcon-40x40@2x.png differ diff --git a/packages/tauri/src-tauri/icons/ios/AppIcon-40x40@3x.png b/packages/tauri/src-tauri/icons/ios/AppIcon-40x40@3x.png index 9de8403a8..15ad59362 100644 Binary files a/packages/tauri/src-tauri/icons/ios/AppIcon-40x40@3x.png and b/packages/tauri/src-tauri/icons/ios/AppIcon-40x40@3x.png differ diff --git a/packages/tauri/src-tauri/icons/ios/AppIcon-512@2x.png b/packages/tauri/src-tauri/icons/ios/AppIcon-512@2x.png index 348f719a1..2260671c0 100644 Binary files a/packages/tauri/src-tauri/icons/ios/AppIcon-512@2x.png and b/packages/tauri/src-tauri/icons/ios/AppIcon-512@2x.png differ diff --git a/packages/tauri/src-tauri/icons/ios/AppIcon-60x60@2x.png b/packages/tauri/src-tauri/icons/ios/AppIcon-60x60@2x.png index 9de8403a8..15ad59362 100644 Binary files a/packages/tauri/src-tauri/icons/ios/AppIcon-60x60@2x.png and b/packages/tauri/src-tauri/icons/ios/AppIcon-60x60@2x.png differ diff --git a/packages/tauri/src-tauri/icons/ios/AppIcon-60x60@3x.png b/packages/tauri/src-tauri/icons/ios/AppIcon-60x60@3x.png index b06c67dd8..5c66bd3b1 100644 Binary files a/packages/tauri/src-tauri/icons/ios/AppIcon-60x60@3x.png and b/packages/tauri/src-tauri/icons/ios/AppIcon-60x60@3x.png differ diff --git a/packages/tauri/src-tauri/icons/ios/AppIcon-76x76@1x.png b/packages/tauri/src-tauri/icons/ios/AppIcon-76x76@1x.png index 903dc4d3e..a5b05f3b5 100644 Binary files a/packages/tauri/src-tauri/icons/ios/AppIcon-76x76@1x.png and b/packages/tauri/src-tauri/icons/ios/AppIcon-76x76@1x.png differ diff --git a/packages/tauri/src-tauri/icons/ios/AppIcon-76x76@2x.png b/packages/tauri/src-tauri/icons/ios/AppIcon-76x76@2x.png index c2f796c30..9c0615d41 100644 Binary files a/packages/tauri/src-tauri/icons/ios/AppIcon-76x76@2x.png and b/packages/tauri/src-tauri/icons/ios/AppIcon-76x76@2x.png differ diff --git a/packages/tauri/src-tauri/icons/ios/AppIcon-83.5x83.5@2x.png b/packages/tauri/src-tauri/icons/ios/AppIcon-83.5x83.5@2x.png index fd49a44f3..6b792b36a 100644 Binary files a/packages/tauri/src-tauri/icons/ios/AppIcon-83.5x83.5@2x.png and b/packages/tauri/src-tauri/icons/ios/AppIcon-83.5x83.5@2x.png differ diff --git a/packages/tauri/tsconfig.json b/packages/tauri/tsconfig.json index b21529450..e7f5c5c27 100644 --- a/packages/tauri/tsconfig.json +++ b/packages/tauri/tsconfig.json @@ -1,7 +1,19 @@ { - "extends": "../desktop/tsconfig.json", "compilerOptions": { - "outDir": "ts-dist" + "target": "ESNext", + "module": "ESNext", + "skipLibCheck": true, + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "jsx": "preserve", + "jsxImportSource": "solid-js", + "allowJs": true, + "strict": true, + "isolatedModules": true, + "noEmit": true, + "emitDeclarationOnly": false, + "outDir": "node_modules/.ts-dist" }, "references": [{ "path": "../desktop" }], "include": ["src"] diff --git a/packages/ui/package.json b/packages/ui/package.json index 3ac942cd2..277dcc9c5 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/ui", - "version": "1.0.143", + "version": "1.0.146", "type": "module", "exports": { "./*": "./src/components/*.tsx", diff --git a/packages/util/package.json b/packages/util/package.json index a077d701b..f6fc043fc 100644 --- a/packages/util/package.json +++ b/packages/util/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/util", - "version": "1.0.143", + "version": "1.0.146", "private": true, "type": "module", "exports": { diff --git a/packages/web/package.json b/packages/web/package.json index c607be57a..48f734fec 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -1,7 +1,7 @@ { "name": "@opencode-ai/web", "type": "module", - "version": "1.0.143", + "version": "1.0.146", "scripts": { "dev": "astro dev", "dev:remote": "VITE_API_URL=https://api.opencode.ai astro dev", diff --git a/packages/web/src/content/docs/sdk.mdx b/packages/web/src/content/docs/sdk.mdx index ca20277be..4f9a2959f 100644 --- a/packages/web/src/content/docs/sdk.mdx +++ b/packages/web/src/content/docs/sdk.mdx @@ -37,13 +37,13 @@ This starts both a server and a client #### Options -| Option | Type | Description | Default | -| --------------- | ---------- | -------------------------------- | ----------------------- | -| `baseUrl` | `string` | URL of the server | `http://localhost:4096` | -| `fetch` | `function` | Custom fetch implementation | `globalThis.fetch` | -| `parseAs` | `string` | Response parsing method | `auto` | -| `responseStyle` | `string` | Return style: `data` or `fields` | `fields` | -| `throwOnError` | `boolean` | Throw errors instead of return | `false` | +| Option | Type | Description | Default | +| ---------- | ------------- | ------------------------------ | ----------- | +| `hostname` | `string` | Server hostname | `127.0.0.1` | +| `port` | `number` | Server port | `4096` | +| `signal` | `AbortSignal` | Abort signal for cancellation | `undefined` | +| `timeout` | `number` | Timeout in ms for server start | `5000` | +| `config` | `Config` | Configuration object | `{}` | --- @@ -81,13 +81,13 @@ const client = createOpencodeClient({ #### Options -| Option | Type | Description | Default | -| ---------- | ------------- | ------------------------------ | ----------- | -| `hostname` | `string` | Server hostname | `127.0.0.1` | -| `port` | `number` | Server port | `4096` | -| `signal` | `AbortSignal` | Abort signal for cancellation | `undefined` | -| `timeout` | `number` | Timeout in ms for server start | `5000` | -| `config` | `Config` | Configuration object | `{}` | +| Option | Type | Description | Default | +| --------------- | ---------- | -------------------------------- | ----------------------- | +| `baseUrl` | `string` | URL of the server | `http://localhost:4096` | +| `fetch` | `function` | Custom fetch implementation | `globalThis.fetch` | +| `parseAs` | `string` | Response parsing method | `auto` | +| `responseStyle` | `string` | Return style: `data` or `fields` | `fields` | +| `throwOnError` | `boolean` | Throw errors instead of return | `false` | --- diff --git a/sdks/vscode/package.json b/sdks/vscode/package.json index 4125cac60..67d703a15 100644 --- a/sdks/vscode/package.json +++ b/sdks/vscode/package.json @@ -2,7 +2,7 @@ "name": "opencode", "displayName": "opencode", "description": "opencode for VS Code", - "version": "1.0.143", + "version": "1.0.146", "publisher": "sst-dev", "repository": { "type": "git",