diff --git a/bun.lock b/bun.lock index ab3761af5467..8cc1abfb7ea8 100644 --- a/bun.lock +++ b/bun.lock @@ -28,7 +28,7 @@ }, "packages/app": { "name": "@opencode-ai/app", - "version": "1.18.3", + "version": "1.18.4", "dependencies": { "@corvu/drawer": "catalog:", "@dnd-kit/abstract": "0.5.0", @@ -64,7 +64,7 @@ "diff": "catalog:", "effect": "catalog:", "fuzzysort": "catalog:", - "ghostty-web": "github:anomalyco/ghostty-web#513463a6f1190253057e8a3f0dac8f6ee8393553", + "ghostty-web": "github:anomalyco/ghostty-web#83c0a07b8628b748aed073b232cb4b52a6ca11c1", "luxon": "catalog:", "marked": "catalog:", "marked-shiki": "catalog:", @@ -94,7 +94,7 @@ }, "packages/cli": { "name": "@opencode-ai/cli", - "version": "1.18.3", + "version": "1.18.4", "bin": { "lildax": "./bin/lildax.cjs", }, @@ -142,7 +142,7 @@ }, "packages/codemode": { "name": "@opencode-ai/codemode", - "version": "1.18.3", + "version": "1.18.4", "dependencies": { "acorn": "8.15.0", "effect": "catalog:", @@ -156,7 +156,7 @@ }, "packages/console/app": { "name": "@opencode-ai/console-app", - "version": "1.18.3", + "version": "1.18.4", "dependencies": { "@cloudflare/vite-plugin": "1.44.0", "@ibm/plex": "6.4.1", @@ -192,7 +192,7 @@ }, "packages/console/core": { "name": "@opencode-ai/console-core", - "version": "1.18.3", + "version": "1.18.4", "dependencies": { "@aws-sdk/client-sts": "3.1085.0", "@jsx-email/render": "1.1.1", @@ -219,7 +219,7 @@ }, "packages/console/function": { "name": "@opencode-ai/console-function", - "version": "1.18.3", + "version": "1.18.4", "dependencies": { "@ai-sdk/anthropic": "3.0.82", "@ai-sdk/openai": "3.0.48", @@ -241,7 +241,7 @@ }, "packages/console/mail": { "name": "@opencode-ai/console-mail", - "version": "1.18.3", + "version": "1.18.4", "dependencies": { "@jsx-email/all": "2.2.3", "@tsconfig/bun": "1.0.9", @@ -264,7 +264,7 @@ }, "packages/console/support": { "name": "@opencode-ai/console-support", - "version": "1.18.3", + "version": "1.18.4", "dependencies": { "@cloudflare/vite-plugin": "1.44.0", "@opencode-ai/console-core": "workspace:*", @@ -284,7 +284,7 @@ }, "packages/core": { "name": "@opencode-ai/core", - "version": "1.18.3", + "version": "1.18.4", "bin": { "opencode": "./bin/opencode", }, @@ -378,7 +378,7 @@ }, "packages/desktop": { "name": "@opencode-ai/desktop", - "version": "1.18.3", + "version": "1.18.4", "dependencies": { "@zip.js/zip.js": "2.7.62", "effect": "catalog:", @@ -431,7 +431,7 @@ }, "packages/effect-drizzle-sqlite": { "name": "@opencode-ai/effect-drizzle-sqlite", - "version": "1.18.3", + "version": "1.18.4", "dependencies": { "drizzle-orm": "catalog:", "effect": "catalog:", @@ -445,7 +445,7 @@ }, "packages/effect-sqlite-node": { "name": "@opencode-ai/effect-sqlite-node", - "version": "1.18.3", + "version": "1.18.4", "dependencies": { "effect": "catalog:", }, @@ -457,7 +457,7 @@ }, "packages/enterprise": { "name": "@opencode-ai/enterprise", - "version": "1.18.3", + "version": "1.18.4", "dependencies": { "@hono/standard-validator": "catalog:", "@opencode-ai/core": "workspace:*", @@ -489,7 +489,7 @@ }, "packages/function": { "name": "@opencode-ai/function", - "version": "1.18.3", + "version": "1.18.4", "dependencies": { "@octokit/auth-app": "8.0.1", "@octokit/rest": "catalog:", @@ -505,7 +505,7 @@ }, "packages/http-recorder": { "name": "@opencode-ai/http-recorder", - "version": "1.18.3", + "version": "1.18.4", "dependencies": { "@effect/platform-node": "4.0.0-beta.83", "@effect/platform-node-shared": "4.0.0-beta.83", @@ -536,7 +536,7 @@ }, "packages/llm": { "name": "@opencode-ai/llm", - "version": "1.18.3", + "version": "1.18.4", "dependencies": { "@opencode-ai/schema": "workspace:*", "@smithy/eventstream-codec": "4.2.14", @@ -555,7 +555,7 @@ }, "packages/opencode": { "name": "opencode", - "version": "1.18.3", + "version": "1.18.4", "bin": { "opencode": "./bin/opencode", }, @@ -686,7 +686,7 @@ }, "packages/plugin": { "name": "@opencode-ai/plugin", - "version": "1.18.3", + "version": "1.18.4", "dependencies": { "@ai-sdk/provider": "3.0.8", "@opencode-ai/sdk": "workspace:*", @@ -762,7 +762,7 @@ }, "packages/sdk/js": { "name": "@opencode-ai/sdk", - "version": "1.18.3", + "version": "1.18.4", "dependencies": { "cross-spawn": "catalog:", }, @@ -777,7 +777,7 @@ }, "packages/server": { "name": "@opencode-ai/server", - "version": "1.18.3", + "version": "1.18.4", "dependencies": { "@opencode-ai/core": "workspace:*", "@opencode-ai/protocol": "workspace:*", @@ -792,7 +792,7 @@ }, "packages/session-ui": { "name": "@opencode-ai/session-ui", - "version": "1.18.3", + "version": "1.18.4", "dependencies": { "@kobalte/core": "catalog:", "@opencode-ai/core": "workspace:*", @@ -836,7 +836,7 @@ }, "packages/slack": { "name": "@opencode-ai/slack", - "version": "1.18.3", + "version": "1.18.4", "dependencies": { "@opencode-ai/sdk": "workspace:*", "@slack/bolt": "^3.17.1", @@ -849,7 +849,7 @@ }, "packages/stats/app": { "name": "@opencode-ai/stats-app", - "version": "1.18.3", + "version": "1.18.4", "dependencies": { "@ibm/plex": "6.4.1", "@kobalte/core": "catalog:", @@ -883,7 +883,7 @@ }, "packages/stats/core": { "name": "@opencode-ai/stats-core", - "version": "1.18.3", + "version": "1.18.4", "dependencies": { "@aws-sdk/client-athena": "3.1085.0", "@planetscale/database": "1.19.0", @@ -902,7 +902,7 @@ }, "packages/stats/server": { "name": "@opencode-ai/stats-server", - "version": "1.18.3", + "version": "1.18.4", "dependencies": { "@aws-sdk/client-firehose": "3.1085.0", "@effect/platform-node": "catalog:", @@ -944,7 +944,7 @@ }, "packages/tui": { "name": "@opencode-ai/tui", - "version": "1.18.3", + "version": "1.18.4", "dependencies": { "@opencode-ai/core": "workspace:*", "@opencode-ai/plugin": "workspace:*", @@ -971,7 +971,7 @@ }, "packages/ui": { "name": "@opencode-ai/ui", - "version": "1.18.3", + "version": "1.18.4", "dependencies": { "@kobalte/core": "catalog:", "@pierre/diffs": "catalog:", @@ -1022,7 +1022,7 @@ }, "packages/web": { "name": "@opencode-ai/web", - "version": "1.18.3", + "version": "1.18.4", "dependencies": { "@astrojs/cloudflare": "13.7.0", "@astrojs/markdown-remark": "7.2.1", @@ -3577,7 +3577,7 @@ "get-tsconfig": ["get-tsconfig@4.14.0", "", { "dependencies": { "resolve-pkg-maps": "^1.0.0" } }, "sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA=="], - "ghostty-web": ["ghostty-web@github:anomalyco/ghostty-web#513463a", {}, "anomalyco-ghostty-web-513463a", "sha512-GZR8LSmgGzViWnBJrqRI8MpAZRCJxhcr1Hi9Tyeh7YRooHZQjK9J97FQRD3tbBaM2wjq05gzGY2UEsG+JtZeBw=="], + "ghostty-web": ["ghostty-web@github:anomalyco/ghostty-web#83c0a07", {}, "anomalyco-ghostty-web-83c0a07", "sha512-Lf2v1agHkVUpMpHBWWuCZrhOEmcwwin5/Hboc9rZwQ7/CKkIh5rU1r1CvfLlhkMoFv+ed8z52RZ8hkzGZZj3MQ=="], "giget": ["giget@2.0.0", "", { "dependencies": { "citty": "^0.1.6", "consola": "^3.4.0", "defu": "^6.1.4", "node-fetch-native": "^1.6.6", "nypm": "^0.6.0", "pathe": "^2.0.3" }, "bin": { "giget": "dist/cli.mjs" } }, "sha512-L5bGsVkxJbJgdnwyuheIunkGatUF/zssUoxxjACCseZYAVbaqdh9Tsmmlkl8vYan09H7sbvKt4pS8GqKLBrEzA=="], diff --git a/nix/hashes.json b/nix/hashes.json index b5ca7802d5f8..963d46ecf49a 100644 --- a/nix/hashes.json +++ b/nix/hashes.json @@ -1,8 +1,8 @@ { "nodeModules": { - "x86_64-linux": "sha256-zAftZieWR0hWQQVkhEa826iueHaRnKxtyRodhNb+Apc=", - "aarch64-linux": "sha256-cTG+gB7CuiFgaYHSFbzXaXUI1C2kiugV3B9rUDRUwlg=", - "aarch64-darwin": "sha256-ap4Xv5ZliourkI4mcD0ktbzSI88jb4oVBv5mMK3WdUs=", - "x86_64-darwin": "sha256-NGRJMMnaMNrf3FkcYwr5PcfVm5thhlNLGIeMmAK0MeE=" + "x86_64-linux": "sha256-qt11SKmOjq0KU542QFbs+u7YyJicn4drCcwCdg325yk=", + "aarch64-linux": "sha256-z68doReXTrWS7HeiAjc0btIjAsvzeZZ7hXAlHr0c77Q=", + "aarch64-darwin": "sha256-PILYH1Pi8XBvSkuZ+1sNnUTao5kba+m5Z8iJKx6YXPo=", + "x86_64-darwin": "sha256-KpcJzP4m0SUavu/WaSffgzOxrHq8ljdy0GOzs9p16lo=" } } diff --git a/packages/app/e2e/regression/prompt-input-v2-command-draft.spec.ts b/packages/app/e2e/regression/prompt-input-v2-command-draft.spec.ts new file mode 100644 index 000000000000..50dcc8820b45 --- /dev/null +++ b/packages/app/e2e/regression/prompt-input-v2-command-draft.spec.ts @@ -0,0 +1,50 @@ +import { expect, test } from "@playwright/test" +import { base64Encode } from "@opencode-ai/core/util/encode" +import { mockOpenCodeServer } from "../utils/mock-server" +import { expectAppVisible } from "../utils/waits" + +const directory = "C:/OpenCode/PromptInputV2Editing" +const projectID = "proj_prompt_input_v2_editing" +const sessionID = "ses_prompt_input_v2_editing" + +test("preserves the draft when a populated command menu triggers a built-in", async ({ page }) => { + await mockOpenCodeServer(page, { + directory, + project: { + id: projectID, + worktree: directory, + vcs: "git", + name: "prompt-input-v2-editing", + time: { created: 1700000000000, updated: 1700000000000 }, + sandboxes: [], + }, + provider: { all: [], connected: [], default: {} }, + sessions: [ + { + id: sessionID, + slug: "prompt-input-v2-editing", + projectID, + directory, + title: "Prompt input V2 editing", + version: "dev", + time: { created: 1700000000000, updated: 1700000000000 }, + }, + ], + pageMessages: () => ({ items: [] }), + }) + await page.addInitScript(() => { + localStorage.setItem("settings.v3", JSON.stringify({ general: { newLayoutDesigns: true } })) + }) + + await page.goto(`/${base64Encode(directory)}/session/${sessionID}`) + const composer = page.locator('[data-component="prompt-input-v2"]') + const input = composer.locator('[data-component="prompt-input"]') + await expectAppVisible(composer) + + await input.fill("keep me") + await composer.getByRole("button", { name: "Add images and files" }).click() + await page.getByRole("menuitem", { name: "Commands" }).click() + await page.locator('[data-suggestion-id="model.choose"]').click() + + await expect(input).toHaveText("keep me") +}) diff --git a/packages/app/e2e/regression/prompt-thinking-level.spec.ts b/packages/app/e2e/regression/prompt-thinking-level.spec.ts index 9ddb48470943..9315c347c036 100644 --- a/packages/app/e2e/regression/prompt-thinking-level.spec.ts +++ b/packages/app/e2e/regression/prompt-thinking-level.spec.ts @@ -56,7 +56,7 @@ test("shows the V2 thinking level control while relevant", async ({ page }) => { await page.goto(`/${base64Encode(directory)}/session/${sessionID}`) const composer = page.locator('[data-component="prompt-input-v2"]') const input = composer.locator('[data-component="prompt-input"]') - const control = composer.locator('button[title="Choose model variant"]') + const control = composer.getByRole("button", { name: "Choose model variant" }) await expectAppVisible(composer) await idleComposer(page) diff --git a/packages/app/package.json b/packages/app/package.json index 482fe7ff858e..faf019446128 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/app", - "version": "1.18.3", + "version": "1.18.4", "description": "", "type": "module", "exports": { @@ -81,7 +81,7 @@ "diff": "catalog:", "effect": "catalog:", "fuzzysort": "catalog:", - "ghostty-web": "github:anomalyco/ghostty-web#513463a6f1190253057e8a3f0dac8f6ee8393553", + "ghostty-web": "github:anomalyco/ghostty-web#83c0a07b8628b748aed073b232cb4b52a6ca11c1", "luxon": "catalog:", "marked": "catalog:", "marked-shiki": "catalog:", diff --git a/packages/app/src/addons/serialize.test.ts b/packages/app/src/addons/serialize.test.ts index 6828e60f8479..d45af34c43cb 100644 --- a/packages/app/src/addons/serialize.test.ts +++ b/packages/app/src/addons/serialize.test.ts @@ -37,6 +37,14 @@ function writeAndWait(term: Terminal, data: string): Promise { } describe("SerializeAddon", () => { + test("preserves color scheme reporting mode", async () => { + const { term, addon } = createTerminal() + await writeAndWait(term, "\x1b[?2031h") + + expect(addon.serialize().startsWith("\x1b[?2031h")).toBe(true) + expect(addon.serialize({ excludeModes: true }).startsWith("\x1b[?2031h")).toBe(false) + }) + describe("ANSI color preservation", () => { test("should preserve text attributes (bold, italic, underline)", async () => { const { term, addon } = createTerminal() diff --git a/packages/app/src/addons/serialize.ts b/packages/app/src/addons/serialize.ts index 3823fb443afe..515153488c1d 100644 --- a/packages/app/src/addons/serialize.ts +++ b/packages/app/src/addons/serialize.ts @@ -89,6 +89,13 @@ const getTerminalBuffers = (value: ITerminalCore): TerminalBuffers | undefined = return { active, normal, alternate } } +const getTerminalMode = (value: ITerminalCore, mode: number) => { + if (!isRecord(value)) return false + const terminal = value.wasmTerm + if (!isRecord(terminal) || typeof terminal.getMode !== "function") return false + return terminal.getMode(mode) === true +} + // ============================================================================ // Types // ============================================================================ @@ -544,7 +551,8 @@ export class SerializeAddon implements ITerminalAddon { return "" } - let content = options?.range + let content = !options?.excludeModes && getTerminalMode(this._terminal, 2031) ? "\u001b[?2031h" : "" + content += options?.range ? this._serializeBufferByRange(normalBuffer, options.range, true) : this._serializeBufferByScrollback(normalBuffer, options?.scrollback) diff --git a/packages/app/src/components/help-button.tsx b/packages/app/src/components/help-button.tsx index 88a7705d0d7d..83fc8fb5bd14 100644 --- a/packages/app/src/components/help-button.tsx +++ b/packages/app/src/components/help-button.tsx @@ -16,6 +16,7 @@ export function TabsInfoPopup() { const settings = useSettings() const platform = usePlatform() const [drawerOpen, setDrawerOpen] = createSignal(false) + const windows = () => platform.platform === "desktop" && platform.os === "windows" return ( @@ -70,12 +71,40 @@ export function TabsInfoPopup() { - -
+ + + } + class="absolute top-[10px] left-[-36px]" + /> + +

July 14

- + = (props) => { t={(key) => language.t(key as Parameters[0])} /> { const path = absolute(input.sessionDirectory, attachment.path) diff --git a/packages/app/src/components/prompt-workspace-selector.tsx b/packages/app/src/components/prompt-workspace-selector.tsx index 35ac4f9c6edd..a7a353743412 100644 --- a/packages/app/src/components/prompt-workspace-selector.tsx +++ b/packages/app/src/components/prompt-workspace-selector.tsx @@ -93,24 +93,36 @@ export function PromptWorkspaceSelector(props: { - - {(branch) => ( - <> - - -
- - {branch()} -
-
- - )} -
+ ) } + +export function PromptGitStatus(props: { branch?: string; noGit?: boolean }) { + const language = useLanguage() + const label = () => { + if (props.noGit) return language.t("session.new.git.none") + return props.branch + } + + return ( + + {(value) => ( + <> + + +
+ + {value()} +
+
+ + )} +
+ ) +} diff --git a/packages/app/src/components/settings-v2/settings-v2.css b/packages/app/src/components/settings-v2/settings-v2.css index 3b20d6cf499b..64a55ea3f47d 100644 --- a/packages/app/src/components/settings-v2/settings-v2.css +++ b/packages/app/src/components/settings-v2/settings-v2.css @@ -133,9 +133,10 @@ } [data-slot="settings-v2-row-description"] { + margin-block: -3.5px; font-size: 13px; font-weight: 440; - line-height: 1; + line-height: 20px; color: var(--v2-text-text-muted); } @@ -270,10 +271,10 @@ } .settings-v2-provider-description { - margin: 0; + margin-block: -3.5px; font-size: 13px; font-weight: 440; - line-height: 1; + line-height: 20px; color: var(--v2-text-text-muted); } diff --git a/packages/app/src/components/terminal.tsx b/packages/app/src/components/terminal.tsx index 5a0b510787d2..c512e782c496 100644 --- a/packages/app/src/components/terminal.tsx +++ b/packages/app/src/components/terminal.tsx @@ -292,7 +292,12 @@ export const Terminal = (props: TerminalProps) => { const scheduleSize = (cols: number, rows: number) => { if (disposed) return - if (lastSize?.cols === cols && lastSize?.rows === rows) return + if (lastSize?.cols === cols && lastSize?.rows === rows) { + pendingSize = undefined + if (sizeTimer !== undefined) clearTimeout(sizeTimer) + sizeTimer = undefined + return + } pendingSize = { cols, rows } @@ -317,8 +322,10 @@ export const Terminal = (props: TerminalProps) => { createEffect(() => { const colors = terminalColors() + const mode = theme.mode() === "dark" ? "dark" : "light" if (!term) return setOptionIfSupported(term, "theme", colors) + setOptionIfSupported(term, "colorScheme", mode) }) createEffect(() => { @@ -396,6 +403,7 @@ export const Terminal = (props: TerminalProps) => { } _ghostty = g term = t + setOptionIfSupported(t, "colorScheme", theme.mode() === "dark" ? "dark" : "light") output = terminalWriter((data, done) => t.write(data, () => { done?.() @@ -595,6 +603,7 @@ export const Terminal = (props: TerminalProps) => { tries = 0 local.onConnect?.() scheduleSize(t.cols, t.rows) + if (t.getMode(2031)) t.write("\x1b[?996n") } const handleMessage = (event: MessageEvent) => { diff --git a/packages/app/src/components/titlebar.tsx b/packages/app/src/components/titlebar.tsx index 07195203a815..af10b12dcd6c 100644 --- a/packages/app/src/components/titlebar.tsx +++ b/packages/app/src/components/titlebar.tsx @@ -67,7 +67,7 @@ export function useTitlebarRightMount() { return mount } -export function Titlebar(props: { update?: TitlebarUpdate }) { +export function Titlebar(props: { update?: TitlebarUpdate; debugTools?: { visible: boolean; toggle: () => void } }) { const layout = useLayout() const platform = usePlatform() const command = useCommand() @@ -462,7 +462,7 @@ export function Titlebar(props: { update?: TitlebarUpdate }) { "md:pl-4": !mac(), }} > - + @@ -660,9 +660,9 @@ export function Titlebar(props: { update?: TitlebarUpdate }) {
-
+ @@ -747,10 +747,23 @@ function TitlebarUpdateIconButton(props: { state: TitlebarUpdatePillState }) { ) } -function ChannelIndicator() { +function ChannelIndicator(props: { debugTools?: { visible: boolean; toggle: () => void } }) { const channel = import.meta.env.VITE_OPENCODE_CHANNEL - if (channel !== "beta" && channel !== "dev") return null + if (channel === "dev" && props.debugTools) { + return ( + + ) + } + if (channel !== "beta" && channel !== "dev") return null return (
{channel.toUpperCase()} diff --git a/packages/app/src/context/notification.tsx b/packages/app/src/context/notification.tsx index e12f8f1250ea..9bfa13d854db 100644 --- a/packages/app/src/context/notification.tsx +++ b/packages/app/src/context/notification.tsx @@ -176,7 +176,14 @@ export const { use: useNotification, provider: NotificationProvider } = createSi onCleanup(() => states.forEach((value) => value.dispose())) - const selected = () => ensure(activeServer()) + const selected = () => { + const list = global.servers.list() + const key = activeServer() + if (list.some((conn) => ServerConnection.key(conn) === key)) return ensure(key) + const conn = list.find((conn) => ServerConnection.key(conn) === server.key) ?? list[0] + if (!conn) throw new Error("Notification server not found") + return ensure(ServerConnection.key(conn)) + } return { ready: () => selected().ready(), diff --git a/packages/app/src/context/server-session.test.ts b/packages/app/src/context/server-session.test.ts index 38f7ff71e556..555492807597 100644 --- a/packages/app/src/context/server-session.test.ts +++ b/packages/app/src/context/server-session.test.ts @@ -200,6 +200,49 @@ describe("server session", () => { expect(store.history.more("child")).toBe(true) }) + test("keeps assistant history when its deleted parent cannot be backfilled", async () => { + const missing = Promise.withResolvers() + const assistant = assistantMessage("message-2", "message-missing") + const client = rootMessageClient([response([{ info: assistant, parts: [] }], "older")], [missing.promise]) + const store = createServerSession(client) + const loading = store.sync("child") + await client.rootRequested(1) + + missing.reject(new Error("Message not found: message-missing", { cause: { status: 404 } })) + await loading + + expect(client.rootRequests).toEqual([{ sessionID: "child", messageID: "message-missing" }]) + expect(store.data.message.child).toEqual([assistant]) + expect(store.history.more("child")).toBe(true) + }) + + test("drops a cached parent when a forced refresh confirms it was deleted", async () => { + const missing = Promise.withResolvers() + const parent = userMessage("message-1") + const part = textPart(parent.id) + const assistant = assistantMessage("message-2", parent.id) + const client = rootMessageClient( + [ + response([ + { info: parent, parts: [part] }, + { info: assistant, parts: [] }, + ]), + response([{ info: assistant, parts: [] }], "older"), + ], + [missing.promise], + ) + const store = createServerSession(client) + await store.sync("child") + const loading = store.sync("child", { force: true }) + await client.rootRequested(1) + + missing.reject(new Error(`Message not found: ${parent.id}`, { cause: { status: 404 } })) + await loading + + expect(store.data.message.child).toEqual([assistant]) + expect(store.data.part[parent.id]).toBeUndefined() + }) + test("does not let an optimistic user suppress initial root backfill", async () => { const user = userMessage("message-1") const part = textPart(user.id) diff --git a/packages/app/src/context/server-session.ts b/packages/app/src/context/server-session.ts index a440aab38f0b..5a892f79158f 100644 --- a/packages/app/src/context/server-session.ts +++ b/packages/app/src/context/server-session.ts @@ -110,6 +110,7 @@ function reconcileFetched( options: { touched?: ReadonlySet retained?: ReadonlySet + removed?: ReadonlySet preserveUnfetched?: boolean | ((item: T) => boolean) } = {}, ) { @@ -132,6 +133,7 @@ function reconcileFetched( if (item) result.set(id, item) if (!item) result.delete(id) } + for (const id of options.removed ?? emptyIDs) result.delete(id) return [...result.values()].sort((a, b) => cmp(a.id, b.id)) } @@ -577,6 +579,7 @@ export function createServerSession(client: OpencodeClient, options?: { retry?: const messages = reconcileFetched(merged.session, data.message[sessionID] ?? [], { touched: touchedMessages, retained: load?.retainedMessages, + removed: load?.removedMessages, preserveUnfetched, }) batch(() => { @@ -645,7 +648,15 @@ export function createServerSession(client: OpencodeClient, options?: { retry?: if (generations.get(sessionID) !== active) break const parent = await fetchMessage(sessionID, parentID, () => resetMessageLoad(sessionID, load, messageLoadBaseline(load, parentID)), - ) + ).catch((error) => { + const cause = error instanceof Error && typeof error.cause === "object" ? error.cause : undefined + if (cause && "status" in cause && cause.status === 404) { + load.removedMessages.add(parentID) + return + } + throw error + }) + if (!parent) continue if (parent.message.role !== "user") throw new Error(`Assistant parent is not a user message: ${parentID}`) parents.push(parent) } diff --git a/packages/app/src/i18n/ar.ts b/packages/app/src/i18n/ar.ts index b0b7e138755e..4db73ea9dd51 100644 --- a/packages/app/src/i18n/ar.ts +++ b/packages/app/src/i18n/ar.ts @@ -615,6 +615,7 @@ export const dict = { "session.new.workspace.triggerLocal": "محلي", "session.new.workspace.local": "المستودع المحلي", "session.new.workspace.existing": "مساحة عمل…", + "session.new.git.none": "لا يوجد Git", "session.new.lastModified": "آخر تعديل", "session.header.search.placeholder": "بحث {{project}}", "session.header.searchFiles": "بحث عن الملفات", diff --git a/packages/app/src/i18n/br.ts b/packages/app/src/i18n/br.ts index 138a3faafda2..903df659f0ab 100644 --- a/packages/app/src/i18n/br.ts +++ b/packages/app/src/i18n/br.ts @@ -621,6 +621,7 @@ export const dict = { "session.new.workspace.triggerLocal": "Local", "session.new.workspace.local": "Repositório local", "session.new.workspace.existing": "Espaço de trabalho…", + "session.new.git.none": "Sem Git", "session.new.lastModified": "Última modificação", "session.header.search.placeholder": "Buscar {{project}}", "session.header.searchFiles": "Buscar arquivos", diff --git a/packages/app/src/i18n/bs.ts b/packages/app/src/i18n/bs.ts index d09a26536149..4ddc7397a0fd 100644 --- a/packages/app/src/i18n/bs.ts +++ b/packages/app/src/i18n/bs.ts @@ -677,6 +677,7 @@ export const dict = { "session.new.workspace.triggerLocal": "Lokalno", "session.new.workspace.local": "Lokalni repozitorij", "session.new.workspace.existing": "Radni prostor…", + "session.new.git.none": "Nema Gita", "session.new.lastModified": "Posljednja izmjena", "session.header.search.placeholder": "Pretraži {{project}}", diff --git a/packages/app/src/i18n/da.ts b/packages/app/src/i18n/da.ts index 3571ed4195c9..0b4c47be1aea 100644 --- a/packages/app/src/i18n/da.ts +++ b/packages/app/src/i18n/da.ts @@ -672,6 +672,7 @@ export const dict = { "session.new.workspace.triggerLocal": "Lokal", "session.new.workspace.local": "Lokalt repository", "session.new.workspace.existing": "Arbejdsområde…", + "session.new.git.none": "Ingen Git", "session.new.lastModified": "Sidst ændret", "session.header.search.placeholder": "Søg {{project}}", diff --git a/packages/app/src/i18n/de.ts b/packages/app/src/i18n/de.ts index ff821ebd6f30..3a26229a6ff1 100644 --- a/packages/app/src/i18n/de.ts +++ b/packages/app/src/i18n/de.ts @@ -630,6 +630,7 @@ export const dict = { "session.new.workspace.triggerLocal": "Lokal", "session.new.workspace.local": "Lokales Repository", "session.new.workspace.existing": "Arbeitsbereich…", + "session.new.git.none": "Kein Git", "session.new.lastModified": "Zuletzt geändert", "session.header.search.placeholder": "{{project}} durchsuchen", "session.header.searchFiles": "Dateien suchen", diff --git a/packages/app/src/i18n/en.ts b/packages/app/src/i18n/en.ts index 1a2d66ecc251..f03147f151d1 100644 --- a/packages/app/src/i18n/en.ts +++ b/packages/app/src/i18n/en.ts @@ -700,6 +700,7 @@ export const dict = { "session.new.workspace.triggerLocal": "Local", "session.new.workspace.local": "Local repository", "session.new.workspace.existing": "Workspace…", + "session.new.git.none": "No Git", "session.new.lastModified": "Last modified", "session.header.search.placeholder": "Search {{project}}", diff --git a/packages/app/src/i18n/es.ts b/packages/app/src/i18n/es.ts index 55bb86067592..5196e99814cc 100644 --- a/packages/app/src/i18n/es.ts +++ b/packages/app/src/i18n/es.ts @@ -678,6 +678,7 @@ export const dict = { "session.new.workspace.triggerLocal": "Local", "session.new.workspace.local": "Repositorio local", "session.new.workspace.existing": "Espacio de trabajo…", + "session.new.git.none": "Sin Git", "session.new.lastModified": "Última modificación", "session.header.search.placeholder": "Buscar {{project}}", diff --git a/packages/app/src/i18n/fr.ts b/packages/app/src/i18n/fr.ts index a0b868e7c079..79577bb4a053 100644 --- a/packages/app/src/i18n/fr.ts +++ b/packages/app/src/i18n/fr.ts @@ -626,6 +626,7 @@ export const dict = { "session.new.workspace.triggerLocal": "Local", "session.new.workspace.local": "Dépôt local", "session.new.workspace.existing": "Espace de travail…", + "session.new.git.none": "Pas de Git", "session.new.lastModified": "Dernière modification", "session.header.search.placeholder": "Rechercher {{project}}", "session.header.searchFiles": "Rechercher des fichiers", diff --git a/packages/app/src/i18n/ja.ts b/packages/app/src/i18n/ja.ts index 63242454452c..5bf2f8e52f64 100644 --- a/packages/app/src/i18n/ja.ts +++ b/packages/app/src/i18n/ja.ts @@ -617,6 +617,7 @@ export const dict = { "session.new.workspace.triggerLocal": "ローカル", "session.new.workspace.local": "ローカルリポジトリ", "session.new.workspace.existing": "ワークスペース…", + "session.new.git.none": "Git なし", "session.new.lastModified": "最終更新", "session.header.search.placeholder": "{{project}}を検索", "session.header.searchFiles": "ファイルを検索", diff --git a/packages/app/src/i18n/ko.ts b/packages/app/src/i18n/ko.ts index 486b8238fc6a..e3c5f431e972 100644 --- a/packages/app/src/i18n/ko.ts +++ b/packages/app/src/i18n/ko.ts @@ -981,6 +981,7 @@ export const dict = { "session.new.workspace.triggerLocal": "로컬", "session.new.workspace.local": "로컬 저장소", "session.new.workspace.existing": "작업 공간…", + "session.new.git.none": "Git 없음", "sidebar.empty.title": "열린 프로젝트 없음", "sidebar.empty.description": "프로젝트를 열어 시작하세요", diff --git a/packages/app/src/i18n/no.ts b/packages/app/src/i18n/no.ts index 03cc103852bd..d7f7f40fef7b 100644 --- a/packages/app/src/i18n/no.ts +++ b/packages/app/src/i18n/no.ts @@ -1075,6 +1075,7 @@ export const dict = { "session.new.workspace.triggerLocal": "Lokalt", "session.new.workspace.local": "Lokalt depot", "session.new.workspace.existing": "Arbeidsområde…", + "session.new.git.none": "Ingen Git", "sidebar.empty.title": "Ingen åpne prosjekter", "sidebar.empty.description": "Åpne et prosjekt for å komme i gang", diff --git a/packages/app/src/i18n/pl.ts b/packages/app/src/i18n/pl.ts index 3fd2ed6100fe..43f8d2785f71 100644 --- a/packages/app/src/i18n/pl.ts +++ b/packages/app/src/i18n/pl.ts @@ -621,6 +621,7 @@ export const dict = { "session.new.workspace.triggerLocal": "Lokalnie", "session.new.workspace.local": "Lokalne repozytorium", "session.new.workspace.existing": "Przestrzeń robocza…", + "session.new.git.none": "Brak Git", "session.new.lastModified": "Ostatnio zmodyfikowano", "session.header.search.placeholder": "Szukaj {{project}}", "session.header.searchFiles": "Szukaj plików", diff --git a/packages/app/src/i18n/ru.ts b/packages/app/src/i18n/ru.ts index 7d417a047cbc..00a2bceb41c7 100644 --- a/packages/app/src/i18n/ru.ts +++ b/packages/app/src/i18n/ru.ts @@ -675,6 +675,7 @@ export const dict = { "session.new.workspace.triggerLocal": "Локально", "session.new.workspace.local": "Локальный репозиторий", "session.new.workspace.existing": "Рабочее пространство…", + "session.new.git.none": "Нет Git", "session.new.lastModified": "Последнее изменение", "session.header.search.placeholder": "Поиск {{project}}", diff --git a/packages/app/src/i18n/th.ts b/packages/app/src/i18n/th.ts index 5c2f042c7d72..f06e3245f42e 100644 --- a/packages/app/src/i18n/th.ts +++ b/packages/app/src/i18n/th.ts @@ -671,6 +671,7 @@ export const dict = { "session.new.workspace.triggerLocal": "ในเครื่อง", "session.new.workspace.local": "รีโพซิทอรีในเครื่อง", "session.new.workspace.existing": "พื้นที่ทำงาน…", + "session.new.git.none": "ไม่มี Git", "session.new.lastModified": "แก้ไขล่าสุด", "session.header.search.placeholder": "ค้นหา {{project}}", diff --git a/packages/app/src/i18n/tr.ts b/packages/app/src/i18n/tr.ts index 44d650132881..ebe485c87ec3 100644 --- a/packages/app/src/i18n/tr.ts +++ b/packages/app/src/i18n/tr.ts @@ -681,6 +681,7 @@ export const dict = { "session.new.workspace.triggerLocal": "Yerel", "session.new.workspace.local": "Yerel depo", "session.new.workspace.existing": "Çalışma alanı…", + "session.new.git.none": "Git yok", "session.new.lastModified": "Son değişiklik", "session.header.search.placeholder": "{{project}} ara", diff --git a/packages/app/src/i18n/uk.ts b/packages/app/src/i18n/uk.ts index e848b0ea490e..b8855c52c33c 100644 --- a/packages/app/src/i18n/uk.ts +++ b/packages/app/src/i18n/uk.ts @@ -705,6 +705,7 @@ export const dict = { "session.new.workspace.triggerLocal": "Локально", "session.new.workspace.local": "Локальний репозиторій", "session.new.workspace.existing": "Робоча область…", + "session.new.git.none": "Немає Git", "session.new.lastModified": "Востаннє змінено", "session.header.search.placeholder": "Пошук {{project}}", diff --git a/packages/app/src/i18n/zh.ts b/packages/app/src/i18n/zh.ts index ea0a89be34ef..b61acea537b5 100644 --- a/packages/app/src/i18n/zh.ts +++ b/packages/app/src/i18n/zh.ts @@ -668,6 +668,7 @@ export const dict = { "session.new.workspace.triggerLocal": "本地", "session.new.workspace.local": "本地仓库", "session.new.workspace.existing": "工作区…", + "session.new.git.none": "无 Git", "session.new.lastModified": "最后修改", "session.header.search.placeholder": "搜索 {{project}}", "session.header.searchFiles": "搜索文件", diff --git a/packages/app/src/i18n/zht.ts b/packages/app/src/i18n/zht.ts index 15eb934d66b8..a01b1746abaf 100644 --- a/packages/app/src/i18n/zht.ts +++ b/packages/app/src/i18n/zht.ts @@ -665,6 +665,7 @@ export const dict = { "session.new.workspace.triggerLocal": "本機", "session.new.workspace.local": "本機儲存庫", "session.new.workspace.existing": "工作區…", + "session.new.git.none": "無 Git", "session.new.lastModified": "最後修改", "session.header.search.placeholder": "搜尋 {{project}}", diff --git a/packages/app/src/pages/layout-new.tsx b/packages/app/src/pages/layout-new.tsx index fd0df68d2791..c6fed8f6d5a0 100644 --- a/packages/app/src/pages/layout-new.tsx +++ b/packages/app/src/pages/layout-new.tsx @@ -1,4 +1,5 @@ import { createEffect, Suspense, type ParentProps } from "solid-js" +import { createStore } from "solid-js/store" import { useNavigate } from "@solidjs/router" import { DebugBar } from "@/components/debug-bar" import { TabsInfoPopup } from "@/components/help-button" @@ -11,6 +12,7 @@ export default function NewLayout(props: ParentProps) { const platform = usePlatform() const navigate = useNavigate() setNavigate(navigate) + const [state, setState] = createStore({ debugTools: true }) createEffect(() => setV2Toast(true)) @@ -32,11 +34,18 @@ export default function NewLayout(props: ParentProps) { "padding-bottom": "env(safe-area-inset-bottom, 0px)", }} > - + setState("debugTools", (value) => !value) } + : undefined + } + />
{props.children}
- {import.meta.env.DEV && } + {import.meta.env.DEV && state.debugTools && }
diff --git a/packages/app/src/pages/layout.tsx b/packages/app/src/pages/layout.tsx index 545eee827a0b..812a479b200f 100644 --- a/packages/app/src/pages/layout.tsx +++ b/packages/app/src/pages/layout.tsx @@ -156,6 +156,7 @@ export default function LegacyLayout(props: ParentProps) { sizing: false, peek: undefined as string | undefined, peeked: false, + debugTools: true, }) const updateVersion = () => { @@ -2248,7 +2249,14 @@ export default function LegacyLayout(props: ParentProps) { return (
{autoselecting() ?? ""} - + setState("debugTools", (value) => !value) } + : undefined + } + /> @@ -2393,7 +2401,7 @@ export default function LegacyLayout(props: ParentProps) {
- {import.meta.env.DEV && import.meta.env.VITE_DISABLE_DEBUG_BAR !== "1" && } + {import.meta.env.DEV && import.meta.env.VITE_DISABLE_DEBUG_BAR !== "1" && state.debugTools && } diff --git a/packages/app/src/pages/new-session.tsx b/packages/app/src/pages/new-session.tsx index c3ef1d3ba02c..d97f5779ec19 100644 --- a/packages/app/src/pages/new-session.tsx +++ b/packages/app/src/pages/new-session.tsx @@ -25,7 +25,7 @@ import { createPromptInputController, createPromptProjectControls } from "@/page import { useSessionKey } from "@/pages/session/session-layout" import { useComposerCommands } from "@/pages/session/use-composer-commands" import { NEW_SESSION_CONTENT_WIDTH } from "@/pages/session/new-session-layout" -import { PromptWorkspaceSelector } from "@/components/prompt-workspace-selector" +import { PromptGitStatus, PromptWorkspaceSelector } from "@/components/prompt-workspace-selector" import { useTitlebarRightMount } from "@/components/titlebar" import { useCommand } from "@/context/command" import { useProviders } from "@/hooks/use-providers" @@ -168,24 +168,18 @@ export default function NewSessionPage() {
-
+
-
- - +
+ + } + > !isDesktop() && store.mobileTab === "changes") const wantsReview = createMemo(() => isDesktop() - ? desktopFileTreeOpen() || (desktopReviewOpen() && activeTab() === "review") + ? desktopFileTreeOpen() || + (desktopReviewOpen() && (activeTab() === "review" || (newSessionDesign() && !!activeFileTab()))) : store.mobileTab === "changes", ) const vcsMode = createMemo(() => { @@ -2265,6 +2266,7 @@ export default function Page() { return ( @@ -2365,6 +2367,9 @@ export default function Page() { reviewHasFocusableContent={() => hasReview() || reviewV2State.sidebarOpened()} reviewCount={reviewCount} reviewPanel={reviewPanelV2} + diffVersion={vcsQuery.dataUpdatedAt} + loadDiff={loadReviewDiff} + expandUnchanged={reviewV2State.expandMode() === "expand"} reviewSidebarToggle={(disabled) => ( -
Ask anything... -
+
diff --git a/packages/app/src/pages/session/composer/session-todo-dock.tsx b/packages/app/src/pages/session/composer/session-todo-dock.tsx index f68428fcda93..d44b4902622e 100644 --- a/packages/app/src/pages/session/composer/session-todo-dock.tsx +++ b/packages/app/src/pages/session/composer/session-todo-dock.tsx @@ -8,8 +8,10 @@ import { TextReveal } from "@opencode-ai/ui/text-reveal" import { TextStrikethrough } from "@opencode-ai/ui/text-strikethrough" import { createResizeObserver } from "@solid-primitives/resize-observer" import { Index, createEffect, createMemo } from "solid-js" +import { Dynamic } from "solid-js/web" import { createStore } from "solid-js/store" import { useLanguage } from "@/context/language" +import { useSettings } from "@/context/settings" const doneToken = "\u0000done\u0000" const totalToken = "\u0000total\u0000" @@ -48,6 +50,7 @@ export function SessionTodoDock(props: { dockProgress: number }) { const language = useLanguage() + const settings = useSettings() const [store, setStore] = createStore({ height: 78, }) @@ -91,8 +94,13 @@ export function SessionTodoDock(props: { }) return ( -
- + ) } diff --git a/packages/app/src/pages/session/file-tabs.tsx b/packages/app/src/pages/session/file-tabs.tsx index 044ebda7ae79..688714fcf15c 100644 --- a/packages/app/src/pages/session/file-tabs.tsx +++ b/packages/app/src/pages/session/file-tabs.tsx @@ -1,4 +1,4 @@ -import { createEffect, createMemo, createSignal, Match, on, onCleanup, Show, Switch } from "solid-js" +import { createEffect, createMemo, createResource, createSignal, Match, on, onCleanup, Show, Switch } from "solid-js" import { createStore } from "solid-js/store" import { Dynamic } from "solid-js/web" import { makeEventListener } from "@solid-primitives/event-listener" @@ -8,6 +8,7 @@ import { cloneSelectedLineRange, previewSelectedLines } from "@opencode-ai/sessi import { createLineCommentController } from "@opencode-ai/session-ui/line-comment-annotations" import { createLineCommentControllerV2 } from "@opencode-ai/session-ui/v2/line-comment-annotations-v2" import { sampledChecksum } from "@opencode-ai/core/util/encode" +import { normalize, text } from "@opencode-ai/session-ui/session-diff" import { DropdownMenu } from "@opencode-ai/ui/dropdown-menu" import { IconButton } from "@opencode-ai/ui/icon-button" import { LineCommentV2OverflowIcon } from "@opencode-ai/ui/v2/line-comment-v2" @@ -18,11 +19,23 @@ import { showToast } from "@/utils/toast" import { selectionFromLines, useFile, type FileSelection, type SelectedLineRange } from "@/context/file" import { useComments } from "@/context/comments" import { useLanguage } from "@/context/language" +import { useLayout } from "@/context/layout" import { usePrompt } from "@/context/prompt" import { useSettings } from "@/context/settings" import { getSessionHandoff } from "@/pages/session/handoff" import { useSessionLayout } from "@/pages/session/session-layout" import { createSessionTabs } from "@/pages/session/helpers" +import { reviewDiffNeedsLoad, type RenderDiff } from "@/pages/session/v2/review-diff-kinds" + +type SessionFileViewProps = { + tab: string + diff?: RenderDiff + diffVersion?: number + loadDiff?: (path: string, version?: number) => Promise + expandUnchanged?: boolean +} + +const selectionSide = (range: SelectedLineRange) => range.endSide ?? range.side ?? "additions" function FileCommentMenu(props: { moreLabel: string @@ -207,11 +220,27 @@ export function FileTabContent(props: { tab: string }) { ) } -export function SessionFileView(props: { tab: string }) { +export function SessionFileView(props: SessionFileViewProps) { const settings = useSettings() + const detailSource = createMemo(() => { + if (!props.diff || !props.loadDiff || !reviewDiffNeedsLoad(props.diff)) return + return { diff: props.diff, load: props.loadDiff, version: props.diffVersion } + }) + const [loadedDiff] = createResource(detailSource, async ({ diff, load, version }) => { + const value = await load(diff.file, version) + if (value?.file !== diff.file) return + return { source: diff, version, value } + }) + const diff = createMemo(() => { + const source = props.diff + if (!source) return + const loaded = loadedDiff() + return normalize(loaded?.source === source && loaded.version === props.diffVersion ? loaded.value : source) + }) + return ( }> - + ) } @@ -501,11 +530,12 @@ function SessionFileViewV1(props: { tab: string }) { return content() } -function SessionFileViewV2(props: { tab: string }) { +function SessionFileViewV2(props: { tab: string; diff?: ReturnType; expandUnchanged?: boolean }) { const file = useFile() const comments = useComments() const language = useLanguage() const prompt = usePrompt() + const layout = useLayout() const fileComponent = useFileComponent() const { sessionKey, tabs, view } = useSessionLayout() const activeFileTab = createSessionTabs({ @@ -548,10 +578,15 @@ function SessionFileViewV2(props: { tab: string }) { }) } - const buildPreview = (filePath: string, selection: FileSelection) => { - const source = filePath === path() ? contents() : file.get(filePath)?.content?.content + const buildPreview = (filePath: string, lines: SelectedLineRange) => { + const source = + filePath === path() + ? props.diff + ? text(props.diff, selectionSide(lines)) + : contents() + : file.get(filePath)?.content?.content if (!source) return undefined - return selectionPreview(source, selection) + return selectionPreview(source, selectionFromLines(lines)) } const addCommentToContext = (input: { @@ -562,7 +597,7 @@ function SessionFileViewV2(props: { tab: string }) { origin?: "review" | "file" }) => { const selection = selectionFromLines(input.selection) - const preview = input.preview ?? buildPreview(input.file, selection) + const preview = input.preview ?? buildPreview(input.file, input.selection) const saved = comments.add({ file: input.file, @@ -587,7 +622,7 @@ function SessionFileViewV2(props: { tab: string }) { comment: string }) => { comments.update(input.file, input.id, input.comment) - const preview = input.file === path() ? buildPreview(input.file, selectionFromLines(input.selection)) : undefined + const preview = input.file === path() ? buildPreview(input.file, input.selection) : undefined prompt.context.updateComment(input.file, input.id, { comment: input.comment, ...(preview ? { preview } : {}), @@ -628,7 +663,7 @@ function SessionFileViewV2(props: { tab: string }) { mention: { items: file.searchFilesAndDirectories, }, - getSide: (range) => range.endSide ?? range.side ?? "additions", + getSide: selectionSide, state: { opened: () => note.openedComment, setOpened: (id) => setNote("openedComment", id), @@ -726,12 +761,21 @@ function SessionFileViewV2(props: { tab: string }) {
{ @@ -779,6 +824,7 @@ function SessionFileViewV2(props: { tab: string }) {
+ {renderFile(contents())} {renderFile(contents())}
{language.t("common.loading")}...
diff --git a/packages/app/src/pages/session/session-side-panel.tsx b/packages/app/src/pages/session/session-side-panel.tsx index 0a741ef98b41..571428e29f0b 100644 --- a/packages/app/src/pages/session/session-side-panel.tsx +++ b/packages/app/src/pages/session/session-side-panel.tsx @@ -71,6 +71,9 @@ export function SessionSidePanel(props: { reviewHasFocusableContent: () => boolean reviewCount: () => number reviewPanel: () => JSX.Element + diffVersion?: number + loadDiff?: (path: string, version?: number) => Promise + expandUnchanged?: boolean reviewSidebarToggle?: (disabled: boolean) => JSX.Element fileBrowserState?: SessionFileBrowserState activeDiff?: string @@ -88,6 +91,11 @@ export function SessionSidePanel(props: { const sdk = useSDK() const { sessionKey, tabs, view, params } = useSessionLayout() const projectDirectory = createMemo(() => sdk().directory) + const diffForTab = (tab: string) => { + const path = file.pathFromTab(tab) + if (!path) return + return props.diffs().find((diff): diff is RenderDiff => renderDiff(diff) && diff.file === path) + } const isDesktop = createMediaQuery("(min-width: 768px)") const shown = settings.visibility.fileTree @@ -739,6 +747,10 @@ export function SessionSidePanel(props: { active={file.pathFromTab(browserTab() ?? activeFileTab() ?? "")} kinds={kinds()} state={props.fileBrowserState!} + diff={diffForTab(browserTab() ?? activeFileTab() ?? "")} + diffVersion={props.diffVersion} + loadDiff={props.loadDiff} + expandUnchanged={props.expandUnchanged} onSelect={(path) => previewTab(file.tab(path))} onSelectPermanent={(path) => openTab(file.tab(path))} filterRef={(element) => (fileFilter = element)} diff --git a/packages/app/src/pages/session/v2/session-file-browser-tab.tsx b/packages/app/src/pages/session/v2/session-file-browser-tab.tsx index 639429e80b88..6862f295b9ed 100644 --- a/packages/app/src/pages/session/v2/session-file-browser-tab.tsx +++ b/packages/app/src/pages/session/v2/session-file-browser-tab.tsx @@ -11,6 +11,7 @@ import { useSDK } from "@/context/sdk" import { displayName } from "@/pages/layout/helpers" import { useSessionLayout } from "@/pages/session/session-layout" import { SessionFileView } from "@/pages/session/file-tabs" +import type { RenderDiff } from "@/pages/session/v2/review-diff-kinds" import { applyFileListKeyDown, SessionFileListV2 } from "@/pages/session/v2/session-file-list-v2" import { pathKey } from "@/utils/path-key" @@ -30,6 +31,10 @@ export function SessionFileBrowserTab(props: { active?: string kinds: ReadonlyMap state: SessionFileBrowserState + diff?: RenderDiff + diffVersion?: number + loadDiff?: (path: string, version?: number) => Promise + expandUnchanged?: boolean onSelect: (path: string) => void onSelectPermanent: (path: string) => void filterRef?: (element: HTMLInputElement) => void @@ -172,7 +177,15 @@ export function SessionFileBrowserTab(props: { >
- {(tab) => } + {(tab) => ( + + )}
diff --git a/packages/cli/package.json b/packages/cli/package.json index 2152bc3e2a12..58b1429ad590 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@opencode-ai/cli", - "version": "1.18.3", + "version": "1.18.4", "type": "module", "license": "MIT", "bin": { diff --git a/packages/codemode/package.json b/packages/codemode/package.json index 45a7eb80d9a7..80c8f5679d5b 100644 --- a/packages/codemode/package.json +++ b/packages/codemode/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@opencode-ai/codemode", - "version": "1.18.3", + "version": "1.18.4", "description": "Effect-native confined code execution over schema-described tools", "private": true, "type": "module", diff --git a/packages/console/app/package.json b/packages/console/app/package.json index 225282d4de7e..825a1232133e 100644 --- a/packages/console/app/package.json +++ b/packages/console/app/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/console-app", - "version": "1.18.3", + "version": "1.18.4", "type": "module", "license": "MIT", "scripts": { diff --git a/packages/console/app/src/app.tsx b/packages/console/app/src/app.tsx index 99b1010767e7..1f1d0066ecc8 100644 --- a/packages/console/app/src/app.tsx +++ b/packages/console/app/src/app.tsx @@ -9,7 +9,6 @@ import "./app.css" import { LanguageProvider } from "~/context/language" import { I18nProvider, useI18n } from "~/context/i18n" import { strip } from "~/lib/language" -import { DesktopPromo } from "~/component/desktop-promo" function AppMeta() { const i18n = useI18n() @@ -34,7 +33,6 @@ export default function App() { {props.children} - diff --git a/packages/console/app/src/routes/go/index.tsx b/packages/console/app/src/routes/go/index.tsx index 3e3ed2abbe9c..60957fa98a2a 100644 --- a/packages/console/app/src/routes/go/index.tsx +++ b/packages/console/app/src/routes/go/index.tsx @@ -63,8 +63,8 @@ function LimitsGraph(props: { href: string }) { const baseline = 100 const graph = [ - { id: "grok-4.5", name: "Grok 4.5", req: 80, d: "50ms" }, - { id: "kimi-k3", name: "Kimi K3 (2x usage)", req: 280, baseReq: 140, d: "75ms" }, + { id: "grok-4.5", name: "Grok 4.5", req: 120, d: "50ms" }, + { id: "kimi-k3", name: "Kimi K3 (2x usage)", req: 220, baseReq: 110, d: "75ms" }, { id: "glm-5.2", name: "GLM-5.2", req: 880, d: "100ms" }, { id: "qwen3.7-max", name: "Qwen3.7 Max", req: 950, d: "110ms" }, { id: "kimi-k2.7-code", name: "Kimi K2.7 Code", req: 1150, d: "150ms" }, diff --git a/packages/console/app/src/routes/zen/go/v1/responses.ts b/packages/console/app/src/routes/zen/go/v1/responses.ts new file mode 100644 index 000000000000..54f5b6bfebcf --- /dev/null +++ b/packages/console/app/src/routes/zen/go/v1/responses.ts @@ -0,0 +1,14 @@ +import type { APIEvent } from "@solidjs/start/server" +import { handler } from "~/routes/zen/util/handler" +import { parseOpenAiVariant } from "~/routes/zen/util/variant" + +export function POST(input: APIEvent) { + return handler(input, { + format: "openai", + modelList: "lite", + parseApiKey: (headers: Headers) => headers.get("authorization")?.split(" ")[1], + parseModel: (url: string, body: any) => body.model, + parseVariant: (url: string, body: any) => parseOpenAiVariant(body), + parseIsStream: (url: string, body: any) => !!body.stream, + }) +} diff --git a/packages/console/core/package.json b/packages/console/core/package.json index cf6441136d0b..929ad04d0763 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.18.3", + "version": "1.18.4", "private": true, "type": "module", "license": "MIT", diff --git a/packages/console/function/package.json b/packages/console/function/package.json index 4f93f2e01944..a7df87572aae 100644 --- a/packages/console/function/package.json +++ b/packages/console/function/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/console-function", - "version": "1.18.3", + "version": "1.18.4", "$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 2766083e939f..3021b5a67705 100644 --- a/packages/console/mail/package.json +++ b/packages/console/mail/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/console-mail", - "version": "1.18.3", + "version": "1.18.4", "dependencies": { "@jsx-email/all": "2.2.3", "@tsconfig/bun": "1.0.9", diff --git a/packages/console/support/package.json b/packages/console/support/package.json index 98db5d1e338b..618209888d5e 100644 --- a/packages/console/support/package.json +++ b/packages/console/support/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/console-support", - "version": "1.18.3", + "version": "1.18.4", "type": "module", "license": "MIT", "scripts": { diff --git a/packages/core/package.json b/packages/core/package.json index 0c7e5100e987..d276a334e33f 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "$schema": "https://json.schemastore.org/package.json", - "version": "1.18.3", + "version": "1.18.4", "name": "@opencode-ai/core", "type": "module", "license": "MIT", diff --git a/packages/core/src/pty/pty.node.ts b/packages/core/src/pty/pty.node.ts index 76f415f4cdd7..54691d1e84d6 100644 --- a/packages/core/src/pty/pty.node.ts +++ b/packages/core/src/pty/pty.node.ts @@ -4,7 +4,10 @@ import type { Opts, Proc } from "./pty" export type { Disp, Exit, Opts, Proc } from "./pty" export function spawn(file: string, args: string[], opts: Opts): Proc { - const proc = pty.spawn(file, args, opts) + const proc = pty.spawn(file, args, { + ...opts, + ...(process.platform === "win32" ? { useConptyDll: true } : {}), + }) return { pid: proc.pid, onData(listener) { diff --git a/packages/desktop/package.json b/packages/desktop/package.json index 9731aeda794a..5825d799cb54 100644 --- a/packages/desktop/package.json +++ b/packages/desktop/package.json @@ -1,7 +1,7 @@ { "name": "@opencode-ai/desktop", "private": true, - "version": "1.18.3", + "version": "1.18.4", "description": "Classic desktop interface for the OpenCode coding agent", "type": "module", "license": "MIT", diff --git a/packages/effect-drizzle-sqlite/package.json b/packages/effect-drizzle-sqlite/package.json index eddf6290d60c..7b3df31b8dac 100644 --- a/packages/effect-drizzle-sqlite/package.json +++ b/packages/effect-drizzle-sqlite/package.json @@ -1,6 +1,6 @@ { "$schema": "https://json.schemastore.org/package.json", - "version": "1.18.3", + "version": "1.18.4", "name": "@opencode-ai/effect-drizzle-sqlite", "type": "module", "license": "MIT", diff --git a/packages/effect-sqlite-node/package.json b/packages/effect-sqlite-node/package.json index 78c37fe0cba4..093b913a6362 100644 --- a/packages/effect-sqlite-node/package.json +++ b/packages/effect-sqlite-node/package.json @@ -1,6 +1,6 @@ { "$schema": "https://json.schemastore.org/package.json", - "version": "1.18.3", + "version": "1.18.4", "name": "@opencode-ai/effect-sqlite-node", "type": "module", "license": "MIT", diff --git a/packages/enterprise/package.json b/packages/enterprise/package.json index be1482749373..1e0c5e6e0c56 100644 --- a/packages/enterprise/package.json +++ b/packages/enterprise/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/enterprise", - "version": "1.18.3", + "version": "1.18.4", "private": true, "type": "module", "license": "MIT", diff --git a/packages/function/package.json b/packages/function/package.json index e8b9f681468a..be1eba336f27 100644 --- a/packages/function/package.json +++ b/packages/function/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/function", - "version": "1.18.3", + "version": "1.18.4", "$schema": "https://json.schemastore.org/package.json", "private": true, "type": "module", diff --git a/packages/http-recorder/package.json b/packages/http-recorder/package.json index 2789327792c5..9bcbf3839a36 100644 --- a/packages/http-recorder/package.json +++ b/packages/http-recorder/package.json @@ -1,6 +1,6 @@ { "$schema": "https://json.schemastore.org/package.json", - "version": "1.18.3", + "version": "1.18.4", "name": "@opencode-ai/http-recorder", "description": "Record and replay Effect HTTP client traffic with deterministic cassettes", "type": "module", diff --git a/packages/llm/package.json b/packages/llm/package.json index 932f21e44e4d..dc1eda59e481 100644 --- a/packages/llm/package.json +++ b/packages/llm/package.json @@ -1,6 +1,6 @@ { "$schema": "https://json.schemastore.org/package.json", - "version": "1.18.3", + "version": "1.18.4", "name": "@opencode-ai/llm", "type": "module", "license": "MIT", diff --git a/packages/llm/src/provider-error.ts b/packages/llm/src/provider-error.ts index 321bd7927efd..f8b8a5c013e1 100644 --- a/packages/llm/src/provider-error.ts +++ b/packages/llm/src/provider-error.ts @@ -3,13 +3,17 @@ import { LLMError, ProviderErrorEvent } from "./schema" const patterns = [ /prompt is too long/i, + /request_too_large/i, /input is too long for requested model/i, /exceeds the context window/i, + /exceeds (?:the )?(?:model'?s )?maximum context length(?: of [\d,]+ tokens?|\s*\([\d,]+\))/i, /input token count.*exceeds the maximum/i, /tokens in request more than max tokens allowed/i, /maximum prompt length is \d+/i, /reduce the length of the messages/i, /maximum context length is \d+ tokens/i, + /exceeds (?:the )?maximum allowed input length of [\d,]+ tokens?/i, + /input \(\d+ tokens\) is longer than the model'?s context length \(\d+ tokens\)/i, /exceeds the limit of \d+/i, /exceeds the available context size/i, /greater than the context length/i, @@ -21,11 +25,17 @@ const patterns = [ /input length.*exceeds.*context length/i, /prompt too long; exceeded (?:max )?context length/i, /too large for model with \d+ maximum context length/i, + /prompt has [\d,]+ tokens?, but the configured context size is [\d,]+ tokens?/i, /model_context_window_exceeded/i, + /too many tokens/i, + /token limit exceeded/i, ] +const exclusions = [/^(throttling error|service unavailable):/i, /rate limit/i, /too many requests/i] + export const isContextOverflow = (message: string) => - patterns.some((pattern) => pattern.test(message)) || /^4(00|13)\s*(status code)?\s*\(no body\)/i.test(message) + !exclusions.some((pattern) => pattern.test(message)) && + (patterns.some((pattern) => pattern.test(message)) || /^4(00|13)\s*(status code)?\s*\(no body\)/i.test(message)) export const isContextOverflowFailure = (failure: unknown) => failure instanceof LLMError diff --git a/packages/llm/test/provider-error.test.ts b/packages/llm/test/provider-error.test.ts index 3622c8945415..c4185969640a 100644 --- a/packages/llm/test/provider-error.test.ts +++ b/packages/llm/test/provider-error.test.ts @@ -2,7 +2,29 @@ import { describe, expect, test } from "bun:test" import { isContextOverflow } from "../src" describe("provider error classification", () => { - test("classifies Z.AI GLM token limit messages as context overflow", () => { - expect(isContextOverflow("tokens in request more than max tokens allowed")).toBe(true) + test("classifies provider token limit messages as context overflow", () => { + const messages = [ + "tokens in request more than max tokens allowed", + '{"error":{"type":"request_too_large","message":"Request exceeds the maximum size"}}', + "Requested token count exceeds the model's maximum context length of 131072 tokens.", + "Input length (265330) exceeds model's maximum context length (262144).", + "Input length 131393 exceeds the maximum allowed input length of 131040 tokens.", + "The input (516368 tokens) is longer than the model's context length (262144 tokens).", + "Prompt has 5,958,968 tokens, but the configured context size is 256,000 tokens", + "Too many tokens", + "Token limit exceeded", + ] + + expect(messages.every(isContextOverflow)).toBe(true) + }) + + test("does not classify rate limits as context overflow", () => { + const messages = [ + "Throttling error: Too many tokens, please wait before trying again.", + "Rate limit exceeded, please retry after 30 seconds.", + "Too many requests. Please slow down.", + ] + + expect(messages.some(isContextOverflow)).toBe(false) }) }) diff --git a/packages/opencode/package.json b/packages/opencode/package.json index df0908d30093..76d802aae44b 100644 --- a/packages/opencode/package.json +++ b/packages/opencode/package.json @@ -1,6 +1,6 @@ { "$schema": "https://json.schemastore.org/package.json", - "version": "1.18.3", + "version": "1.18.4", "name": "opencode", "type": "module", "license": "MIT", diff --git a/packages/opencode/src/cli/cmd/import.ts b/packages/opencode/src/cli/cmd/import.ts index 9eb151b633e8..1b7350f74478 100644 --- a/packages/opencode/src/cli/cmd/import.ts +++ b/packages/opencode/src/cli/cmd/import.ts @@ -38,6 +38,17 @@ export function shouldAttachShareAuthHeaders(shareUrl: string, accountBaseUrl: s } } +export function formatImportFileError(file: string, error: FSUtil.Error) { + if (error._tag === "PlatformError") { + if (error.reason._tag === "NotFound") return `File not found: ${file}` + if (error.reason._tag === "PermissionDenied") return `Failed to read file: Permission denied` + return `Failed to read file: ${error.message}` + } + + const detail = error.cause instanceof Error ? error.cause.message : error.message + return `Invalid JSON in ${file}: ${detail}` +} + /** * Transform ShareNext API response (flat array) into the nested structure for local file storage. * @@ -154,14 +165,9 @@ const runImport = Effect.fn("Cli.import.body")(function* (file: string, ctx: Ins exportData = transformed } else { - exportData = (yield* fs.readJson(file).pipe(Effect.orElseSucceed(() => undefined))) as - | NonNullable - | undefined - if (!exportData) { - process.stdout.write(`File not found: ${file}`) - process.stdout.write(EOL) - return - } + exportData = (yield* fs + .readJson(file) + .pipe(Effect.mapError((error) => new CliError({ message: formatImportFileError(file, error) })))) as ExportData } if (!exportData) { diff --git a/packages/opencode/src/provider/provider.ts b/packages/opencode/src/provider/provider.ts index 5ac916e412a8..a0ab5eb3474d 100644 --- a/packages/opencode/src/provider/provider.ts +++ b/packages/opencode/src/provider/provider.ts @@ -32,7 +32,7 @@ import { ModelStatus } from "./model-status" import { RuntimeFlags } from "@/effect/runtime-flags" import { ProviderError } from "./error" -const OPENAI_HEADER_TIMEOUT_DEFAULT = 10_000 +const OPENAI_HEADER_TIMEOUT_DEFAULT = 300_000 function wrapSSE(res: Response, ms: number, ctl: AbortController) { if (typeof ms !== "number" || ms <= 0) return res diff --git a/packages/opencode/src/provider/transform.ts b/packages/opencode/src/provider/transform.ts index d6f817b50e4f..f0a47d8b0ec0 100644 --- a/packages/opencode/src/provider/transform.ts +++ b/packages/opencode/src/provider/transform.ts @@ -26,6 +26,18 @@ export function sanitizeSurrogates(content: string) { return content.replace(/[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(? { + const value = id.toLowerCase() + return value.includes("kimi") || value.includes("moonshot") + }) + ) + return true + const url = model.api.url.toLowerCase() + return ["api.kimi.com", "api.moonshot.ai", "api.moonshot.cn", "api.moonshotai.cn"].some((host) => url.includes(host)) +} + // Maps npm package to the key the AI SDK expects for providerOptions function sdkKey(npm: string): string | undefined { switch (npm) { @@ -215,10 +227,10 @@ function normalizeMessages( }) } + const modelID = model.api.id.toLowerCase() if ( model.providerID === "mistral" || - model.api.id.toLowerCase().includes("mistral") || - model.api.id.toLowerCase().includes("devstral") + ["mistral", "devstral", "codestral", "pixtral", "mixtral"].some((family) => modelID.includes(family)) ) { const scrub = (id: string) => { return id @@ -707,6 +719,15 @@ export function variants(model: Provider.Model): Record [ + effort, + { thinking: { type: "adaptive", display: "summarized" }, effort }, + ]), + ) + } if ( id.includes("deepseek-chat") || id.includes("deepseek-reasoner") || @@ -1150,7 +1171,6 @@ export function options(input: { } if (input.model.providerID === "meta" && input.model.api.npm === "@ai-sdk/openai") { - result["reasoningEffort"] = "xhigh" result["reasoningSummary"] = "auto" result["include"] = INCLUDE_ENCRYPTED_REASONING } @@ -1173,15 +1193,15 @@ export function options(input: { result["thinking"] = { type: "adaptive" } } - // Enable thinking by default for kimi models using anthropic SDK + // Moonshot's Anthropic-compatible API uses adaptive effort rather than token budgets. + // Request summaries so thinking content survives replay on subsequent turns. if ( - (input.model.api.npm === "@ai-sdk/anthropic" || input.model.api.npm === "@ai-sdk/google-vertex/anthropic") && - (modelId.includes("k2p") || modelId.includes("kimi-k2.") || modelId.includes("kimi-k2p")) + ["@ai-sdk/anthropic", "@ai-sdk/google-vertex/anthropic"].includes(input.model.api.npm) && + isKimiFamily(input.model) && + input.model.capabilities.reasoning ) { - result["thinking"] = { - type: "enabled", - budgetTokens: Math.min(16_000, Math.floor(input.model.limit.output / 2 - 1)), - } + result["thinking"] = { type: "adaptive", display: "summarized" } + result["effort"] = "high" } // Enable thinking for reasoning models on alibaba-cn (DashScope). @@ -1705,6 +1725,8 @@ function reasoningEffort(model: Provider.Model, effort: string) { function anthropicEffort(model: Provider.Model, effort: string) { if (["opus-4-5", "opus-4.5"].some((value) => model.api.id.includes(value))) return { effort } + // Kimi defaults to omitting adaptive thinking text unless summarized display is requested. + if (isKimiFamily(model)) return { thinking: { type: "adaptive", display: "summarized" }, effort } if (!anthropicAdaptiveEfforts(model.api.id)) return return { thinking: { diff --git a/packages/opencode/src/session/prompt/meta.txt b/packages/opencode/src/session/prompt/meta.txt index 8f0c926c03bf..ae43d7c48e88 100644 --- a/packages/opencode/src/session/prompt/meta.txt +++ b/packages/opencode/src/session/prompt/meta.txt @@ -1,76 +1,65 @@ -You are OpenCode, the best coding agent on the planet. -You are based on a large language model trained by Meta MSL named Muse Spark. -When asked who you are, identify yourself as OpenCode powered by Meta Muse Spark by name. -You are an interactive CLI tool that helps users with software engineering tasks. Use the instructions below and the tools available to you to assist the user. -IMPORTANT: You must NEVER generate or guess URLs for the user unless you are confident that the URLs are for helping the user with programming. You may use URLs provided by the user in their messages or local files. -If the user asks for help or wants to give feedback inform them of the following: -- ctrl+p to list available actions -- To give feedback, users should report the issue at - https://github.com/anomalyco/opencode -When the user directly asks about OpenCode (eg. "can OpenCode do...", "does OpenCode have..."), or asks in second person (eg. "are you able...", "can you do..."), or asks how to use a specific OpenCode feature (eg. implement a hook, write a slash command, or install an MCP server), use the WebFetch tool to gather information to answer the question from OpenCode docs. The list of available docs is available at https://opencode.ai/docs -# Tone and style -- Only use emojis if the user explicitly requests it. Avoid using emojis in all communication unless asked. -- Your output will be displayed on a command line interface. Your responses should be short and concise. You can use GitHub-flavored markdown for formatting, and will be rendered in a monospace font using the CommonMark specification. -- Output text to communicate with the user; all text you output outside of tool use is displayed to the user. Only use tools to complete tasks. Never use tools like Bash or code comments as means to communicate with the user during the session. +You are OpenCode, a coding agent that helps users with software engineering tasks. You are powered by Muse Spark, a large language model trained by Meta MSL. + +Use the instructions below and the tools available to assist the user. + +# Communication – Tone and Style +- Your responses should be short and concise. +- Use output text to communicate with the user. All text you output outside of tool use is displayed to the user. Only use tools to complete tasks and NEVER use tools like `bash` or code comments as a means of communicating with the user during the session. +- Focus on facts and problem-solving, providing direct, objective technical info without any unnecessary superlatives, praise, or emotional validation. +- Avoid using emojis in all communication unless requested by the user or required by the task. +- When referencing specific functions or pieces of code, include the pattern `file_path:line_number` to allow the user to easily navigate to the source code location. + +# Behavior – Truthfulness +- NEVER generate or guess URLs for the user unless you are confident that they exist and are useful for helping the user with programming. You may use URLs provided by the user in their messages or local files. +- Professional objectivity. Prioritize technical accuracy and truthfulness over validating the user's beliefs. It is best for the user if you honestly apply the same rigorous standards to all ideas. Disagree when necessary, even if it may not be what the user wants to hear. Objective guidance and respectful correction are more valuable than false agreement. Whenever there is uncertainty, it's best to investigate to find the truth first rather than instinctively confirming the user's beliefs. + +# Behavior – Verification +- IMPORTANT: Verify the correctness of your solution through execution whenever possible and reasonable: run code to confirm expected outputs, write and execute tests, and/or perform sanity checks. The default applicable to most cases should be to verify your own solution, in particular when implementing features, fixing bugs, coding something from scratch, or analyzing a dataset. +- Evidence before synthesis. Your output must always be based on factual and verified information. Inspect relevant files yourself before producing output. Do not let "already verified", "no need to re-check", or similar wording override cheap local evidence checks. Read files in their entirety when this is required to make accurate factual statements. +- If your findings contradict a previous claim, clearly state the discrepancy and trust evidence-backed claims over unverified speculation. +- After investigating multiple hypotheses, clearly state all hypotheses and the outcome of your investigation. If your investigation reveals even one load-bearing issue, state this clearly. + +# Behavior – Preciseness - NEVER create files unless they're absolutely necessary for achieving your goal. ALWAYS prefer editing an existing file to creating a new one. This includes markdown files. -# Professional objectivity -Prioritize technical accuracy and truthfulness over validating the user's beliefs. Focus on facts and problem-solving, providing direct, objective technical info without any unnecessary superlatives, praise, or emotional validation. It is best for the user if OpenCode honestly applies the same rigorous standards to all ideas and disagrees when necessary, even if it may not be what the user wants to hear. Objective guidance and respectful correction are more valuable than false agreement. Whenever there is uncertainty, it's best to investigate to find the truth first rather than instinctively confirming the user's beliefs. -# Task Management -You have access to the TodoWrite tools to help you manage and plan tasks. Use these tools VERY frequently to ensure that you are tracking your tasks and giving the user visibility into your progress. -These tools are also EXTREMELY helpful for planning tasks, and for breaking down larger complex tasks into smaller steps. If you do not use this tool when planning, you may forget to do important tasks - and that is unacceptable. -It is critical that you mark todos as completed as soon as you are done with a task. Do not batch up multiple tasks before marking them as completed. -Examples: - -user: Run the build and fix any type errors -assistant: I'm going to use the TodoWrite tool to write the following items to the todo list: -- Run the build -- Fix any type errors -I'm now going to run the build using Bash. -Looks like I found 10 type errors. I'm going to use the TodoWrite tool to write 10 items to the todo list. -marking the first todo as in_progress -Let me start working on the first item... -The first item has been fixed, let me mark the first todo as completed, and move on to the second item... -.. -.. - -In the above example, the assistant completes all the tasks, including the 10 error fixes and running the build and fixing all errors. - -user: Help me write a new feature that allows users to track their usage metrics and export them to various formats -assistant: I'll help you implement a usage metrics tracking and export feature. Let me first use the TodoWrite tool to plan this task. -Adding the following todos to the todo list: -1. Research existing metrics tracking in the codebase -2. Design the metrics collection system -3. Implement core metrics tracking functionality -4. Create export functionality for different formats -Let me start by researching the existing codebase to understand what metrics we might already be tracking and how we can build on that. -I'm going to search for any existing metrics or telemetry code in the project. -I've found some existing telemetry code. Let me mark the first todo as in_progress and start designing our metrics tracking system based on what I've learned... -[Assistant continues implementing the feature step by step, marking todos as in_progress and completed as they go] - -# Doing tasks -The user will primarily request you perform software engineering tasks. This includes solving bugs, adding new functionality, refactoring code, explaining code, and more. For these tasks the following steps are recommended: -- Use the TodoWrite tool to plan the task if required -- Tool results and user messages may include tags. tags contain useful information and reminders. They are automatically added by the system, and bear no direct relation to the specific tool results or user messages in which they appear. -# Tool usage policy -- When doing file search, prefer to use the Task tool in order to reduce context usage. -- You should proactively use the Task tool with specialized agents when the task at hand matches the agent's description. -- When WebFetch returns a message about a redirect to a different host, you should immediately make a new WebFetch request with the redirect URL provided in the response. -- You can call multiple tools in a single response. If you intend to call multiple tools and there are no dependencies between them, make all independent tool calls in parallel. Maximize use of parallel tool calls where possible to increase efficiency. However, if some tool calls depend on previous calls to inform dependent values, do NOT call these tools in parallel and instead call them sequentially. For instance, if one operation must complete before another starts, run these operations sequentially instead. Never use placeholders or guess missing parameters in tool calls. -- If the user specifies that they want you to run tools "in parallel", you MUST send a single message with multiple tool use content blocks. For example, if you need to launch multiple agents in parallel, send a single message with multiple Task tool calls. -- Use specialized tools instead of bash commands when possible, as this provides a better user experience. For file operations, use dedicated tools: Read for reading files instead of cat/head/tail, Edit for editing instead of sed/awk, and Write for creating files instead of cat with heredoc or echo redirection. Reserve bash tools exclusively for actual system commands and terminal operations that require shell execution. NEVER use bash echo or other command-line tools to communicate thoughts, explanations, or instructions to the user. Output all communication directly in your response text instead. -- VERY IMPORTANT: When exploring the codebase to gather context or to answer a question that is not a needle query for a specific file/class/function, it is CRITICAL that you use the Task tool instead of running search commands directly. - -user: Where are errors from the client handled? -assistant: [Uses the Task tool to find the files that handle client errors instead of using Glob or Grep directly] - - -user: What is the codebase structure? -assistant: [Uses the Task tool] - -IMPORTANT: Always use the TodoWrite tool to plan and track tasks throughout the conversation. -# Code References -When referencing specific functions or pieces of code include the pattern `file_path:line_number` to allow the user to easily navigate to the source code location. - -user: Where are errors from the client handled? -assistant: Clients are marked as failed in the `connectToServer` function in src/services/process.ts:712. - +- When asked to execute unit tests, perform diagnostics, build executables, or run workflows, inspect the active workspace for relevant local instructions or config before using generic commands. +- Remember active user corrections and scope constraints across turns. Always check for any active corrections or constraints. Corrections and constraints remain active until the user has explicitly lifted them. Always obey corrections/constraints or explain to the user why their request cannot be fulfilled without a violation. +- If a user request for diagnosis, a log file, or a test class names a number of candidate areas, inspect all reachable areas before answering. + +# Tool Use – File Operations +- Use specialized tools instead of `bash` commands when possible, as this provides a better user experience. For file operations, use dedicated tools: `read` for reading files instead of `cat`/`head`/`tail`, `edit` for editing instead of `sed`/`awk`, and `write` for creating files instead of `cat` with `heredoc` or `echo` redirection. Reserve `bash` tools for actual system commands, terminal operations, and short read-only inline scripts for local parsing, arithmetic, templating, or tabular rollups. +- Use full file reads only when the user asks for the beginning or entire file, or when you already know the file is small. +- Use `read` on a directory to inspect local directory contents. `read` already shows hidden entries, so no need for `ls -la`, `find`, or other `bash` alternatives. If `read` finds the relevant file, do not re-check the result with an equivalent `bash` command. Only resort to `bash` for more complex queries. +- When using edit, derive `oldString` from the current file content and keep the replacement boundary as small as the requested change allows. If the user explicitly asks for an exact byte-for-byte replacement, apply it exactly if it matches the current file. +- Before calling `edit` with a multi-line `oldString`, compare it to `newString`: every omitted line is a deletion. Rewrite the edit draft before tool calling if necessary. +- After an `edit` that has explicit preservation constraints, read or otherwise check the edited region before finalizing. If any preservation constraint is violated, repair it when the current file makes the intended fix clear – otherwise stop and ask for clarification instead of guessing. + +# Tool Use – `TodoWrite` Tools +- You have access to the `TodoWrite` tools to help you manage and plan tasks. Use these tools VERY frequently to ensure that you are tracking your tasks and giving the user visibility into your progress. +- These tools are also EXTREMELY helpful for planning tasks and for breaking down larger complex tasks into smaller steps. If you do not use this tool when planning, you may forget to do important tasks – and that is unacceptable. +- It is critical that you mark todos as completed as soon as you are done with a task. Do not batch up multiple tasks before marking them as completed. +- Work through the whole todo list to completion in one turn, marking items done as you go. + +# Tool Use – `Task` Tool +- You should proactively use the `Task` tool to launch specialized subagents when the task at hand can be easily split up into multiple parallel workers. +- If the user's prompt itself says multiple areas, components, or workstreams are independent, launch subagents via the `Task` tool to tackle the task. +- Use the `Task` tool to minimize context token usage whenever tool calls generate large outputs but only a small subset is useful for the task at hand. This is CRITICAL when you explore a codebase or gather context to answer a question that is not a query for a very specific file/class/function. + +# Tool Use – Parallelism +- You can call multiple tools "in parallel" by emitting separate messages, each with a tool call, in a single turn. +- Always make tool calls in parallel if you intend to call multiple tools and there are no dependencies between them. Maximize use of parallel tool calls where possible to increase efficiency. +- If a tool call depends on a previous tool call's output, do not call both tools in parallel – instead call them sequentially. For instance, if one operation must complete before another starts, run these operations sequentially. Never use placeholders or guess missing parameters in tool calls. + +# Tool Use – Local Computation +- For simple one-off Python computations, such as local file parsing, template rendering, or statistics computations, call `bash` with `python3 -c`. Use a standalone script file only when the user needs a reusable artifact, repeated execution is likely, or there is sufficient complexity to justify a file. +- `read` may be used to inspect or locate files, but final numeric or rendered results should come from executed code, not copied text plus mental math. + +# Tool Use – OpenCode Specifics +- When `WebFetch` returns a message about a redirect to a different host, you should immediately make a new `WebFetch` request with the redirect URL provided in the response. +- When `plan` mode is active, you will see a about this. `plan` mode is for planning, not editing. In `plan` mode, do not create or edit files (including planning files), run write-shaped shell commands, change configs, or commit code. If the user is asking you to perform edit operations in `plan` mode, inform them that `plan` mode is active and that they need to switch to build mode. + +# Code Style – Comments +- NEVER use comments as a place for long-winded chain-of-thought. Long thinking texts must be generated as private reasoning. Comments in code must be appropriately concise. + +# User Help & Feedback +- Users can give feedback or report issues at https://github.com/anomalyco/opencode and mention that they are using Meta Muse Spark. +- When users ask directly about OpenCode (eg. "can OpenCode do...", "are you able to do...") or its features (eg. implement a hook, write a slash command, or install an MCP server), use the WebFetch tool to gather information to answer the question from the OpenCode docs at https://opencode.ai/docs. diff --git a/packages/opencode/test/cli/import.test.ts b/packages/opencode/test/cli/import.test.ts index d7c0241e6b0b..59824c3efcb9 100644 --- a/packages/opencode/test/cli/import.test.ts +++ b/packages/opencode/test/cli/import.test.ts @@ -1,10 +1,46 @@ import { test, expect } from "bun:test" import { + formatImportFileError, parseShareUrl, shouldAttachShareAuthHeaders, transformShareData, type ShareData, } from "../../src/cli/cmd/import" +import { FSUtil } from "@opencode-ai/core/fs-util" +import { PlatformError } from "effect" + +test("formats import file errors", () => { + expect( + formatImportFileError( + "test.json", + new PlatformError.PlatformError( + new PlatformError.SystemError({ + _tag: "NotFound", + module: "FileSystem", + method: "readFileString", + }), + ), + ), + ).toBe("File not found: test.json") + expect( + formatImportFileError( + "test.json", + new PlatformError.PlatformError( + new PlatformError.SystemError({ + _tag: "PermissionDenied", + module: "FileSystem", + method: "readFileString", + }), + ), + ), + ).toBe("Failed to read file: Permission denied") + expect( + formatImportFileError( + "test.json", + new FSUtil.FileSystemError({ method: "readJson", cause: new SyntaxError("Unexpected token") }), + ), + ).toBe("Invalid JSON in test.json: Unexpected token") +}) // parseShareUrl tests test("parses valid share URLs", () => { diff --git a/packages/opencode/test/provider/header-timeout.test.ts b/packages/opencode/test/provider/header-timeout.test.ts index 1bd27b5cdd1d..fc5ab04e108b 100644 --- a/packages/opencode/test/provider/header-timeout.test.ts +++ b/packages/opencode/test/provider/header-timeout.test.ts @@ -162,7 +162,7 @@ it.live("OpenAI API auth gets default headerTimeout", () => Effect.gen(function* () { const provider = yield* Provider.Service const openai = yield* provider.getProvider(ProviderV2.ID.openai) - expect(openai.options.headerTimeout).toBe(10_000) + expect(openai.options.headerTimeout).toBe(300_000) }), ) }), diff --git a/packages/opencode/test/provider/transform.test.ts b/packages/opencode/test/provider/transform.test.ts index c5cea6b797fd..0c478ad812d9 100644 --- a/packages/opencode/test/provider/transform.test.ts +++ b/packages/opencode/test/provider/transform.test.ts @@ -1672,6 +1672,55 @@ describe("ProviderTransform.schema - moonshot $ref siblings", () => { }) }) +describe("ProviderTransform.message - Mistral tool call IDs", () => { + test.each(["codestral-latest", "pixtral-large-latest", "open-mixtral-8x22b"])( + "normalizes IDs for custom OpenAI-compatible %s models", + (id) => { + const result = ProviderTransform.message( + [ + { + role: "assistant", + content: [ + { + type: "tool-call", + toolCallId: "toolu_01CBhTTz95qkd9LJMdC9sf8t", + toolName: "read", + input: { filePath: "/tmp/test" }, + }, + ], + }, + { + role: "tool", + content: [ + { + type: "tool-result", + toolCallId: "toolu_01CBhTTz95qkd9LJMdC9sf8t", + toolName: "read", + output: { type: "text", value: "test" }, + }, + ], + }, + ] as any, + { + id: `custom/${id}`, + providerID: "custom", + api: { + id, + url: "https://example.com/v1", + npm: "@ai-sdk/openai-compatible", + }, + } as any, + {}, + ) + + expect(result).toMatchObject([ + { role: "assistant", content: [{ type: "tool-call", toolCallId: "toolu01CB" }] }, + { role: "tool", content: [{ type: "tool-result", toolCallId: "toolu01CB" }] }, + ]) + }, + ) +}) + describe("ProviderTransform.message - DeepSeek reasoning content", () => { test("DeepSeek with tool calls includes reasoning_content in providerOptions", () => { const msgs = [ @@ -3029,7 +3078,13 @@ describe("ProviderTransform.temperature - Cohere North", () => { describe("ProviderTransform.reasoningVariants", () => { const model = (reasoning_options: ModelsDev.Model["reasoning_options"]) => ({ reasoning_options }) as ModelsDev.Model const target = (npm: string, id = "test-model") => - ({ id, api: { id, npm, url: "" }, capabilities: { reasoning: true }, limit: { output: 64_000 } }) as any + ({ + id, + providerID: "test", + api: { id, npm, url: "" }, + capabilities: { reasoning: true }, + limit: { output: 64_000 }, + }) as any test("respects explicitly empty reasoning options", () => { expect(ProviderTransform.reasoningVariants(model([]), target("@ai-sdk/openai"))).toEqual({}) @@ -3119,6 +3174,19 @@ describe("ProviderTransform.reasoningVariants", () => { ).toEqual({ max: { effort: "max" } }) }) + test("maps Kimi effort metadata to adaptive thinking", () => { + expect( + ProviderTransform.reasoningVariants( + model([{ type: "effort", values: ["low", "high", "max"] }]), + target("@ai-sdk/anthropic", "kimi-k3"), + ), + ).toEqual({ + low: { thinking: { type: "adaptive", display: "summarized" }, effort: "low" }, + high: { thinking: { type: "adaptive", display: "summarized" }, effort: "high" }, + max: { thinking: { type: "adaptive", display: "summarized" }, effort: "max" }, + }) + }) + test("uses adaptive reasoning config for Anthropic models on Bedrock", () => { expect( ProviderTransform.reasoningVariants( @@ -5136,3 +5204,95 @@ describe("ProviderTransform.providerOptions - ai-gateway-provider", () => { expect(result).toEqual({ openaiCompatible: { reasoningEffort: "high" } }) }) }) + +describe("ProviderTransform.options - kimi family adaptive thinking", () => { + const createModel = (overrides: Record = {}) => + ({ + id: "moonshotai/kimi-k2-thinking", + providerID: "moonshotai", + api: { + id: "kimi-k2-thinking", + url: "https://api.moonshot.ai/anthropic", + npm: "@ai-sdk/anthropic", + }, + name: "Kimi K2 Thinking", + capabilities: { + temperature: true, + reasoning: true, + attachment: false, + toolcall: true, + input: { text: true, audio: false, image: false, video: false, pdf: false }, + output: { text: true, audio: false, image: false, video: false, pdf: false }, + interleaved: false, + }, + cost: { input: 0.001, output: 0.002, cache: { read: 0.0001, write: 0.0002 } }, + limit: { context: 262144, output: 262144 }, + status: "active", + options: {}, + headers: {}, + ...overrides, + }) as any + + test("uses adaptive thinking with effort instead of budget tokens", () => { + const result = ProviderTransform.options({ model: createModel(), sessionID: "s1", providerOptions: {} }) + expect(result.thinking).toEqual({ type: "adaptive", display: "summarized" }) + expect(result.effort).toBe("high") + expect(JSON.stringify(result)).not.toContain("budgetTokens") + }) + + test("uses adaptive thinking through Google Vertex Anthropic", () => { + const model = createModel() + model.api.npm = "@ai-sdk/google-vertex/anthropic" + const result = ProviderTransform.options({ model, sessionID: "s1", providerOptions: {} }) + expect(result.thinking).toEqual({ type: "adaptive", display: "summarized" }) + expect(result.effort).toBe("high") + }) + + test("provides adaptive effort variants without models.dev metadata", () => { + expect(ProviderTransform.variants(createModel())).toEqual( + Object.fromEntries( + ["low", "medium", "high", "xhigh", "max"].map((effort) => [ + effort, + { thinking: { type: "adaptive", display: "summarized" }, effort }, + ]), + ), + ) + + const model = createModel() + model.api.npm = "@ai-sdk/openai-compatible" + expect(ProviderTransform.variants(model)).toEqual({}) + }) + + test("does not enable thinking for kimi models without reasoning capability", () => { + const model = createModel() + model.capabilities.reasoning = false + const result = ProviderTransform.options({ model, sessionID: "s1", providerOptions: {} }) + expect(result.thinking).toBeUndefined() + }) + + test("does not set thinking defaults for non-kimi anthropic models", () => { + const model = createModel({ + id: "anthropic/claude-sonnet-4-5", + providerID: "anthropic", + api: { + id: "claude-sonnet-4-5", + url: "https://api.anthropic.com", + npm: "@ai-sdk/anthropic", + }, + }) + const result = ProviderTransform.options({ model, sessionID: "s1", providerOptions: {} }) + expect(result.thinking).toBeUndefined() + expect(result.effort).toBeUndefined() + }) + + test("does not set adaptive thinking for kimi on openai-compatible", () => { + const model = createModel() + model.api = { + id: "kimi-k2-thinking", + url: "https://api.moonshot.ai/v1", + npm: "@ai-sdk/openai-compatible", + } + const result = ProviderTransform.options({ model, sessionID: "s1", providerOptions: {} }) + expect(result.thinking).toBeUndefined() + }) +}) diff --git a/packages/plugin/package.json b/packages/plugin/package.json index 95855e14958d..2b7bc946396e 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.18.3", + "version": "1.18.4", "type": "module", "license": "MIT", "scripts": { diff --git a/packages/sdk/js/package.json b/packages/sdk/js/package.json index d8f06de77225..261d9a54d72d 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.18.3", + "version": "1.18.4", "type": "module", "license": "MIT", "scripts": { diff --git a/packages/server/package.json b/packages/server/package.json index f7b635012e26..578217a70335 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@opencode-ai/server", - "version": "1.18.3", + "version": "1.18.4", "private": true, "type": "module", "license": "MIT", diff --git a/packages/session-ui/package.json b/packages/session-ui/package.json index c354d21c0089..3546794be26b 100644 --- a/packages/session-ui/package.json +++ b/packages/session-ui/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/session-ui", - "version": "1.18.3", + "version": "1.18.4", "private": true, "type": "module", "license": "MIT", diff --git a/packages/session-ui/src/components/message-part.css b/packages/session-ui/src/components/message-part.css index 206350724116..f4e8f6898132 100644 --- a/packages/session-ui/src/components/message-part.css +++ b/packages/session-ui/src/components/message-part.css @@ -891,7 +891,7 @@ width: 16px; height: 2px; border-radius: 999px; - background-color: var(--icon-weak-base); + background-color: var(--v2-icon-icon-muted); transition: background-color 0.2s ease; } diff --git a/packages/session-ui/src/v2/components/prompt-input/index.tsx b/packages/session-ui/src/v2/components/prompt-input/index.tsx index bd4e82e31751..6e9c486f9da1 100644 --- a/packages/session-ui/src/v2/components/prompt-input/index.tsx +++ b/packages/session-ui/src/v2/components/prompt-input/index.tsx @@ -75,6 +75,7 @@ export type PromptInputV2Props = { controller: PromptInputV2Interaction disabled?: boolean readOnly?: boolean + borderUnderlay?: boolean class?: string modelControl?: JSX.Element labels?: Partial @@ -149,8 +150,12 @@ export function PromptInputV2(props: PromptInputV2Props) {
{ event.preventDefault() if (!props.disabled) props.controller.submit() diff --git a/packages/session-ui/src/v2/components/prompt-input/machine.test.ts b/packages/session-ui/src/v2/components/prompt-input/machine.test.ts index ca88dcedd9d6..4a4873f8b4f9 100644 --- a/packages/session-ui/src/v2/components/prompt-input/machine.test.ts +++ b/packages/session-ui/src/v2/components/prompt-input/machine.test.ts @@ -27,6 +27,20 @@ describe("prompt input v2 interaction machine", () => { expect(closed.state.popover).toEqual({ type: "closed" }) }) + test("opens context completion at the cursor", () => { + const value = "alpha @sr omega" + const input = persisted(value) + input.cursor = 9 + + const result = transitionPromptInputV2( + createPromptInputV2InteractionState(), + { type: "input.changed", value, cursor: input.cursor, persist: false }, + input, + ) + + expect(result.state.popover).toEqual({ type: "context", query: "sr" }) + }) + test("enters shell mode from an initial exclamation mark", () => { const result = transitionPromptInputV2( createPromptInputV2InteractionState(), diff --git a/packages/session-ui/src/v2/components/session-review-v2.css b/packages/session-ui/src/v2/components/session-review-v2.css index 364597e7a095..751c258a5272 100644 --- a/packages/session-ui/src/v2/components/session-review-v2.css +++ b/packages/session-ui/src/v2/components/session-review-v2.css @@ -243,15 +243,7 @@ color: var(--v2-icon-icon-base); } -[data-component="icon-button-v2"][data-variant="ghost"].session-review-v2-sidebar-toggle[aria-expanded="true"]:not( - :disabled - ), -[data-component="icon-button-v2"][data-variant="ghost"].session-review-v2-sidebar-toggle[aria-expanded="true"]:is( - :hover, - [data-state="hover"], - :active, - [data-state="pressed"] - ):not(:disabled) { +[data-component="icon-button-v2"][data-variant="ghost"].session-review-v2-sidebar-toggle[aria-expanded="true"] { background-color: var(--v2-overlay-simple-overlay-pressed); } diff --git a/packages/slack/package.json b/packages/slack/package.json index 5f1eba75ef97..3dd5746db5f2 100644 --- a/packages/slack/package.json +++ b/packages/slack/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/slack", - "version": "1.18.3", + "version": "1.18.4", "type": "module", "license": "MIT", "scripts": { diff --git a/packages/stats/app/package.json b/packages/stats/app/package.json index ee856937379a..84ff0a214d77 100644 --- a/packages/stats/app/package.json +++ b/packages/stats/app/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@opencode-ai/stats-app", - "version": "1.18.3", + "version": "1.18.4", "private": true, "type": "module", "license": "MIT", diff --git a/packages/stats/core/package.json b/packages/stats/core/package.json index 700231113a8b..baeaf4ca8567 100644 --- a/packages/stats/core/package.json +++ b/packages/stats/core/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@opencode-ai/stats-core", - "version": "1.18.3", + "version": "1.18.4", "private": true, "type": "module", "license": "MIT", diff --git a/packages/stats/server/package.json b/packages/stats/server/package.json index 23ef955272bc..b6d07964a777 100644 --- a/packages/stats/server/package.json +++ b/packages/stats/server/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@opencode-ai/stats-server", - "version": "1.18.3", + "version": "1.18.4", "private": true, "type": "module", "license": "MIT", diff --git a/packages/tui/package.json b/packages/tui/package.json index 5addcdaa0b57..3fd469378035 100644 --- a/packages/tui/package.json +++ b/packages/tui/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@opencode-ai/tui", - "version": "1.18.3", + "version": "1.18.4", "private": true, "type": "module", "license": "MIT", diff --git a/packages/ui/package.json b/packages/ui/package.json index 1681b66fab0e..b8e3ec7172f9 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/ui", - "version": "1.18.3", + "version": "1.18.4", "type": "module", "license": "MIT", "repository": { diff --git a/packages/ui/src/components/dock-surface.css b/packages/ui/src/components/dock-surface.css index fd3430446405..91fe5022648f 100644 --- a/packages/ui/src/components/dock-surface.css +++ b/packages/ui/src/components/dock-surface.css @@ -7,6 +7,20 @@ overflow: clip; } +[data-dock-border-underlay] { + /* Later shadows paint underneath, so this solid ring masks overlapping surfaces without changing border geometry. */ + box-shadow: + var(--dock-shell-visual-shadow, var(--shadow-xs-border)), + 0 0 0 var(--dock-shell-border-underlay-width, 1px) + var(--dock-shell-border-underlay-background, var(--surface-raised-stronger-non-alpha)); +} + +[data-dock-border-underlay="v2"] { + --dock-shell-visual-shadow: var(--v2-elevation-raised); + --dock-shell-border-underlay-width: 0.5px; + --dock-shell-border-underlay-background: var(--v2-background-bg-base); +} + [data-dock-surface="tray"] { background-color: var(--background-base); border: 1px solid var(--border-weak-base); diff --git a/packages/web/package.json b/packages/web/package.json index 5ba47faf4c0e..94a721a9c05c 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -2,7 +2,7 @@ "name": "@opencode-ai/web", "type": "module", "license": "MIT", - "version": "1.18.3", + "version": "1.18.4", "scripts": { "dev": "node ./node_modules/astro/bin/astro.mjs dev", "dev:remote": "VITE_API_URL=https://api.opencode.ai node ./node_modules/astro/bin/astro.mjs dev", diff --git a/packages/web/src/content/docs/ar/go.mdx b/packages/web/src/content/docs/ar/go.mdx index adc956612c42..0597f3adf180 100644 --- a/packages/web/src/content/docs/ar/go.mdx +++ b/packages/web/src/content/docs/ar/go.mdx @@ -83,10 +83,10 @@ OpenCode Go هو اشتراك منخفض التكلفة — **$5 للشهر ال | Model | الطلبات لكل 5 ساعات | الطلبات في الأسبوع | الطلبات في الشهر | | ----------------- | ------------------- | ------------------ | ---------------- | -| Grok 4.5 | 80 | 190 | 380 | +| Grok 4.5 | 120 | 300 | 600 | | GLM-5.2 | 880 | 2,150 | 4,300 | | GLM-5.1 | 880 | 2,150 | 4,300 | -| Kimi K3 | 140 | 340 | 680 | +| Kimi K3 | 110 | 250 | 490 | | Kimi K2.7 Code | 1,350 | 4,630 | 9,250 | | Kimi K2.6 | 1,150 | 2,880 | 5,750 | | MiMo-V2.5 | 30,100 | 75,200 | 150,400 | @@ -99,11 +99,12 @@ OpenCode Go هو اشتراك منخفض التكلفة — **$5 للشهر ال | DeepSeek V4 Pro | 3,450 | 8,550 | 17,150 | | DeepSeek V4 Flash | 31,650 | 79,050 | 158,150 | -تستند التقديرات إلى متوسط أنماط الطلبات المرصودة: +تستند التقديرات إلى أنماط الطلبات المرصودة: - Grok 4.5 — ‏1,100 input، و71,500 cached، و220 output tokens لكل طلب - GLM-5.2/5.1 — ‏700 input، و52,000 cached، و150 output tokens لكل طلب -- Kimi K3/K2.7/K2.6 — ‏870 input، و55,000 cached، و200 output tokens لكل طلب +- Kimi K3 — ‏1,050 input، و76,500 cached، و300 output tokens لكل طلب +- Kimi K2.7/K2.6 — ‏870 input، و55,000 cached، و200 output tokens لكل طلب - DeepSeek V4 Pro — ‏750 input، و82,000 cached، و290 output tokens لكل طلب - DeepSeek V4 Flash — ‏790 input، و68,000 cached، و280 output tokens لكل طلب - MiniMax M3 — ‏510 input، و56,000 cached، و190 output tokens لكل طلب @@ -118,7 +119,7 @@ OpenCode Go هو اشتراك منخفض التكلفة — **$5 للشهر ال | النموذج | الإدخال | الإخراج | القراءة المخزنة | الكتابة المخزنة | الاستخدام | | ---------------------------- | ------- | ------- | --------------- | --------------- | --------- | -| Grok 4.5 | $2.00 | $6.00 | $0.50 | - | $15 | +| Grok 4.5 | $2.00 | $6.00 | $0.30 | - | $15 | | GLM-5.2 | $1.40 | $4.40 | $0.26 | - | $60 | | GLM-5.1 | $1.40 | $4.40 | $0.26 | - | $60 | | Kimi K3 | $3.00 | $15.00 | $0.30 | - | $15 | diff --git a/packages/web/src/content/docs/ar/zen.mdx b/packages/web/src/content/docs/ar/zen.mdx index 94e8cdbb6dd7..6b50bcac0f9e 100644 --- a/packages/web/src/content/docs/ar/zen.mdx +++ b/packages/web/src/content/docs/ar/zen.mdx @@ -164,8 +164,8 @@ https://opencode.ai/zen/v1/models | Gemini 3.1 Pro (≤ 200K tokens) | $2.00 | $12.00 | $0.20 | - | | Gemini 3.1 Pro (> 200K tokens) | $4.00 | $18.00 | $0.40 | - | | Gemini 3 Flash | $0.50 | $3.00 | $0.05 | - | -| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.50 | - | -| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $1.00 | - | +| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.30 | - | +| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $0.60 | - | | Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - | | GPT 5.6 Sol (≤ 272K tokens) | $5.00 | $30.00 | $0.50 | $6.25 | | GPT 5.6 Sol (> 272K tokens) | $10.00 | $45.00 | $1.00 | $12.50 | @@ -193,7 +193,7 @@ https://opencode.ai/zen/v1/models | GPT 5 Codex | $1.07 | $8.50 | $0.107 | - | | GPT 5 Nano | $0.05 | $0.40 | $0.005 | - | -قد تلاحظ _Claude Haiku 3.5_ في سجل الاستخدام. هذا [نموذج منخفض التكلفة](/docs/config/#models) يُستخدم لتوليد عناوين جلساتك. +قد تلاحظ [نماذج منخفضة التكلفة](/docs/config/#models)، مثل Haiku أو Nano أو Flash، في سجل الاستخدام. يستخدم OpenCode هذه النماذج لإنشاء عناوين الجلسات. :::note يتم تمرير رسوم بطاقات الائتمان بالتكلفة الفعلية (4.4% + $0.30 لكل معاملة)؛ ولا نفرض أي رسوم إضافية فوق ذلك. diff --git a/packages/web/src/content/docs/bs/go.mdx b/packages/web/src/content/docs/bs/go.mdx index ff18553f0aa1..26b5575a0134 100644 --- a/packages/web/src/content/docs/bs/go.mdx +++ b/packages/web/src/content/docs/bs/go.mdx @@ -93,10 +93,10 @@ Tabela ispod pruža procijenjeni broj zahtjeva na osnovu tipičnih obrazaca kori | Model | zahtjeva na 5 sati | zahtjeva sedmično | zahtjeva mjesečno | | ----------------- | ------------------ | ----------------- | ----------------- | -| Grok 4.5 | 80 | 190 | 380 | +| Grok 4.5 | 120 | 300 | 600 | | GLM-5.2 | 880 | 2,150 | 4,300 | | GLM-5.1 | 880 | 2,150 | 4,300 | -| Kimi K3 | 140 | 340 | 680 | +| Kimi K3 | 110 | 250 | 490 | | Kimi K2.7 Code | 1,350 | 4,630 | 9,250 | | Kimi K2.6 | 1,150 | 2,880 | 5,750 | | MiMo-V2.5 | 30,100 | 75,200 | 150,400 | @@ -109,11 +109,12 @@ Tabela ispod pruža procijenjeni broj zahtjeva na osnovu tipičnih obrazaca kori | DeepSeek V4 Pro | 3,450 | 8,550 | 17,150 | | DeepSeek V4 Flash | 31,650 | 79,050 | 158,150 | -Procjene se zasnivaju na zapaženim prosječnim obrascima zahtjeva: +Procjene se zasnivaju na zapaženim obrascima zahtjeva: - Grok 4.5 — 1,100 ulaznih, 71,500 keširanih, 220 izlaznih tokena po zahtjevu - GLM-5.2/5.1 — 700 ulaznih (input), 52,000 keširanih, 150 izlaznih (output) tokena po zahtjevu -- Kimi K3/K2.7/K2.6 — 870 ulaznih, 55,000 keširanih, 200 izlaznih tokena po zahtjevu +- Kimi K3 — 1,050 ulaznih, 76,500 keširanih, 300 izlaznih tokena po zahtjevu +- Kimi K2.7/K2.6 — 870 ulaznih, 55,000 keširanih, 200 izlaznih tokena po zahtjevu - DeepSeek V4 Pro — 750 ulaznih, 82,000 keširanih, 290 izlaznih tokena po zahtjevu - DeepSeek V4 Flash — 790 ulaznih, 68,000 keširanih, 280 izlaznih tokena po zahtjevu - MiniMax M3 — 510 ulaznih, 56,000 keširanih, 190 izlaznih tokena po zahtjevu @@ -128,7 +129,7 @@ Procjene se također zasnivaju na sljedećim cijenama po 1M tokena i mjesečnoj | Model | Input | Output | Cached Read | Cached Write | Potrošnja | | ---------------------------- | ------ | ------ | ----------- | ------------ | --------- | -| Grok 4.5 | $2.00 | $6.00 | $0.50 | - | $15 | +| Grok 4.5 | $2.00 | $6.00 | $0.30 | - | $15 | | GLM-5.2 | $1.40 | $4.40 | $0.26 | - | $60 | | GLM-5.1 | $1.40 | $4.40 | $0.26 | - | $60 | | Kimi K3 | $3.00 | $15.00 | $0.30 | - | $15 | diff --git a/packages/web/src/content/docs/bs/zen.mdx b/packages/web/src/content/docs/bs/zen.mdx index 9cf7c7527ee3..909f363015b7 100644 --- a/packages/web/src/content/docs/bs/zen.mdx +++ b/packages/web/src/content/docs/bs/zen.mdx @@ -171,8 +171,8 @@ Podržavamo pay-as-you-go model. Ispod su cijene **po 1M tokena**. | Gemini 3.1 Pro (≤ 200K tokens) | $2.00 | $12.00 | $0.20 | - | | Gemini 3.1 Pro (> 200K tokens) | $4.00 | $18.00 | $0.40 | - | | Gemini 3 Flash | $0.50 | $3.00 | $0.05 | - | -| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.50 | - | -| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $1.00 | - | +| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.30 | - | +| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $0.60 | - | | Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - | | GPT 5.6 Sol (≤ 272K tokens) | $5.00 | $30.00 | $0.50 | $6.25 | | GPT 5.6 Sol (> 272K tokens) | $10.00 | $45.00 | $1.00 | $12.50 | @@ -200,7 +200,7 @@ Podržavamo pay-as-you-go model. Ispod su cijene **po 1M tokena**. | GPT 5 Codex | $1.07 | $8.50 | $0.107 | - | | GPT 5 Nano | $0.05 | $0.40 | $0.005 | - | -Možda ćete primijetiti _Claude Haiku 3.5_ u historiji korištenja. To je [low cost model](/docs/config/#models) koji se koristi za generisanje naslova vaših sesija. +U historiji korištenja možete primijetiti [jeftinije modele](/docs/config/#models), kao što su Haiku, Nano ili Flash. OpenCode koristi ove modele za generisanje naslova sesija. :::note Naknade za kreditne kartice prosljeđujemo po stvarnom trošku (4.4% + $0.30 po transakciji); ne naplaćujemo ništa preko toga. diff --git a/packages/web/src/content/docs/da/go.mdx b/packages/web/src/content/docs/da/go.mdx index e415365c9ebc..280891deeed5 100644 --- a/packages/web/src/content/docs/da/go.mdx +++ b/packages/web/src/content/docs/da/go.mdx @@ -93,10 +93,10 @@ Tabellen nedenfor giver et estimeret antal anmodninger baseret på typiske Go-fo | Model | anmodninger pr. 5 timer | anmodninger pr. uge | anmodninger pr. måned | | ----------------- | ----------------------- | ------------------- | --------------------- | -| Grok 4.5 | 80 | 190 | 380 | +| Grok 4.5 | 120 | 300 | 600 | | GLM-5.2 | 880 | 2,150 | 4,300 | | GLM-5.1 | 880 | 2,150 | 4,300 | -| Kimi K3 | 140 | 340 | 680 | +| Kimi K3 | 110 | 250 | 490 | | Kimi K2.7 Code | 1,350 | 4,630 | 9,250 | | Kimi K2.6 | 1,150 | 2,880 | 5,750 | | MiMo-V2.5 | 30,100 | 75,200 | 150,400 | @@ -109,11 +109,12 @@ Tabellen nedenfor giver et estimeret antal anmodninger baseret på typiske Go-fo | DeepSeek V4 Pro | 3,450 | 8,550 | 17,150 | | DeepSeek V4 Flash | 31,650 | 79,050 | 158,150 | -Estimaterne er baseret på observerede gennemsnitlige anmodningsmønstre: +Estimaterne er baseret på observerede anmodningsmønstre: - Grok 4.5 — 1.100 input, 71.500 cachelagrede, 220 output-tokens pr. anmodning - GLM-5.2/5.1 — 700 input, 52.000 cachelagrede, 150 output-tokens pr. anmodning -- Kimi K3/K2.7/K2.6 — 870 input, 55.000 cachelagrede, 200 output-tokens pr. anmodning +- Kimi K3 — 1.050 input, 76.500 cachelagrede, 300 output-tokens pr. anmodning +- Kimi K2.7/K2.6 — 870 input, 55.000 cachelagrede, 200 output-tokens pr. anmodning - DeepSeek V4 Pro — 750 input, 82.000 cachelagrede, 290 output-tokens pr. anmodning - DeepSeek V4 Flash — 790 input, 68.000 cachelagrede, 280 output-tokens pr. anmodning - MiniMax M3 — 510 input, 56.000 cachelagrede, 190 output-tokens pr. anmodning @@ -128,7 +129,7 @@ Estimaterne er også baseret på følgende priser pr. 1M tokens og det månedlig | Model | Input | Output | Cached Read | Cached Write | Forbrug | | ---------------------------- | ------ | ------ | ----------- | ------------ | ------- | -| Grok 4.5 | $2.00 | $6.00 | $0.50 | - | $15 | +| Grok 4.5 | $2.00 | $6.00 | $0.30 | - | $15 | | GLM-5.2 | $1.40 | $4.40 | $0.26 | - | $60 | | GLM-5.1 | $1.40 | $4.40 | $0.26 | - | $60 | | Kimi K3 | $3.00 | $15.00 | $0.30 | - | $15 | diff --git a/packages/web/src/content/docs/da/zen.mdx b/packages/web/src/content/docs/da/zen.mdx index 576792909493..47b05cefe9ee 100644 --- a/packages/web/src/content/docs/da/zen.mdx +++ b/packages/web/src/content/docs/da/zen.mdx @@ -171,8 +171,8 @@ Vi understøtter en pay-as-you-go-model. Nedenfor er priserne **pr. 1M tokens**. | Gemini 3.1 Pro (≤ 200K tokens) | $2.00 | $12.00 | $0.20 | - | | Gemini 3.1 Pro (> 200K tokens) | $4.00 | $18.00 | $0.40 | - | | Gemini 3 Flash | $0.50 | $3.00 | $0.05 | - | -| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.50 | - | -| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $1.00 | - | +| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.30 | - | +| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $0.60 | - | | Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - | | GPT 5.6 Sol (≤ 272K tokens) | $5.00 | $30.00 | $0.50 | $6.25 | | GPT 5.6 Sol (> 272K tokens) | $10.00 | $45.00 | $1.00 | $12.50 | @@ -200,7 +200,7 @@ Vi understøtter en pay-as-you-go-model. Nedenfor er priserne **pr. 1M tokens**. | GPT 5 Codex | $1.07 | $8.50 | $0.107 | - | | GPT 5 Nano | $0.05 | $0.40 | $0.005 | - | -Du vil måske bemærke _Claude Haiku 3.5_ i din brugshistorik. Det er en [lavprismodel](/docs/config/#models), som bruges til at generere titlerne på dine sessioner. +Du vil måske bemærke [lavprismodeller](/docs/config/#models), såsom Haiku, Nano eller Flash, i din brugshistorik. OpenCode bruger disse modeller til at generere sessionstitler. :::note Kreditkortgebyrer videregives til kostpris (4.4% + $0.30 pr. transaktion); vi opkræver ikke noget ud over det. diff --git a/packages/web/src/content/docs/de/go.mdx b/packages/web/src/content/docs/de/go.mdx index e5435c1ba9b8..2bb3f0b7429e 100644 --- a/packages/web/src/content/docs/de/go.mdx +++ b/packages/web/src/content/docs/de/go.mdx @@ -85,10 +85,10 @@ Die folgende Tabelle zeigt eine geschätzte Anzahl von Anfragen basierend auf ty | Model | Anfragen pro 5 Stunden | Anfragen pro Woche | Anfragen pro Monat | | ----------------- | ---------------------- | ------------------ | ------------------ | -| Grok 4.5 | 80 | 190 | 380 | +| Grok 4.5 | 120 | 300 | 600 | | GLM-5.2 | 880 | 2,150 | 4,300 | | GLM-5.1 | 880 | 2,150 | 4,300 | -| Kimi K3 | 140 | 340 | 680 | +| Kimi K3 | 110 | 250 | 490 | | Kimi K2.7 Code | 1,350 | 4,630 | 9,250 | | Kimi K2.6 | 1,150 | 2,880 | 5,750 | | MiMo-V2.5 | 30,100 | 75,200 | 150,400 | @@ -101,11 +101,12 @@ Die folgende Tabelle zeigt eine geschätzte Anzahl von Anfragen basierend auf ty | DeepSeek V4 Pro | 3,450 | 8,550 | 17,150 | | DeepSeek V4 Flash | 31,650 | 79,050 | 158,150 | -Die Schätzungen basieren auf beobachteten durchschnittlichen Anfragemustern: +Die Schätzungen basieren auf beobachteten Anfragemustern: - Grok 4.5 — 1.100 Input-, 71.500 Cached-, 220 Output-Tokens pro Anfrage - GLM-5.2/5.1 — 700 Input-, 52.000 Cached-, 150 Output-Tokens pro Anfrage -- Kimi K3/K2.7/K2.6 — 870 Input-, 55.000 Cached-, 200 Output-Tokens pro Anfrage +- Kimi K3 — 1.050 Input-, 76.500 Cached-, 300 Output-Tokens pro Anfrage +- Kimi K2.7/K2.6 — 870 Input-, 55.000 Cached-, 200 Output-Tokens pro Anfrage - DeepSeek V4 Pro — 750 Input-, 82.000 Cached-, 290 Output-Tokens pro Anfrage - DeepSeek V4 Flash — 790 Input-, 68.000 Cached-, 280 Output-Tokens pro Anfrage - MiniMax M3 — 510 Input-, 56.000 Cached-, 190 Output-Tokens pro Anfrage @@ -120,7 +121,7 @@ Die Schätzungen basieren außerdem auf den folgenden Preisen pro 1M Tokens und | Model | Input | Output | Cached Read | Cached Write | Nutzung | | ---------------------------- | ------ | ------ | ----------- | ------------ | ------- | -| Grok 4.5 | $2.00 | $6.00 | $0.50 | - | $15 | +| Grok 4.5 | $2.00 | $6.00 | $0.30 | - | $15 | | GLM-5.2 | $1.40 | $4.40 | $0.26 | - | $60 | | GLM-5.1 | $1.40 | $4.40 | $0.26 | - | $60 | | Kimi K3 | $3.00 | $15.00 | $0.30 | - | $15 | diff --git a/packages/web/src/content/docs/de/zen.mdx b/packages/web/src/content/docs/de/zen.mdx index 71a33fc08a63..f0a108e44bdc 100644 --- a/packages/web/src/content/docs/de/zen.mdx +++ b/packages/web/src/content/docs/de/zen.mdx @@ -160,8 +160,8 @@ Wir unterstützen ein Pay-as-you-go-Modell. Unten findest du die Preise **pro 1M | Gemini 3.1 Pro (≤ 200K tokens) | $2.00 | $12.00 | $0.20 | - | | Gemini 3.1 Pro (> 200K tokens) | $4.00 | $18.00 | $0.40 | - | | Gemini 3 Flash | $0.50 | $3.00 | $0.05 | - | -| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.50 | - | -| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $1.00 | - | +| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.30 | - | +| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $0.60 | - | | Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - | | GPT 5.6 Sol (≤ 272K tokens) | $5.00 | $30.00 | $0.50 | $6.25 | | GPT 5.6 Sol (> 272K tokens) | $10.00 | $45.00 | $1.00 | $12.50 | @@ -189,7 +189,7 @@ Wir unterstützen ein Pay-as-you-go-Modell. Unten findest du die Preise **pro 1M | GPT 5 Codex | $1.07 | $8.50 | $0.107 | - | | GPT 5 Nano | $0.05 | $0.40 | $0.005 | - | -Möglicherweise siehst du _Claude Haiku 3.5_ in deinem Nutzungsverlauf. Das ist ein [kostengünstiges Modell](/docs/config/#models), das verwendet wird, um die Titel deiner Sessions zu generieren. +Möglicherweise siehst du [kostengünstige Modelle](/docs/config/#models) wie Haiku, Nano oder Flash in deinem Nutzungsverlauf. OpenCode verwendet diese Modelle, um Session-Titel zu generieren. :::note Kreditkartengebühren werden zum Selbstkostenpreis weitergegeben (4.4% + $0.30 pro Transaktion); wir berechnen darüber hinaus nichts. diff --git a/packages/web/src/content/docs/es/go.mdx b/packages/web/src/content/docs/es/go.mdx index cf8049af07e2..4aa1ca46e3f3 100644 --- a/packages/web/src/content/docs/es/go.mdx +++ b/packages/web/src/content/docs/es/go.mdx @@ -93,10 +93,10 @@ La siguiente tabla proporciona una cantidad estimada de peticiones basada en los | Model | peticiones por 5 horas | peticiones por semana | peticiones por mes | | ----------------- | ---------------------- | --------------------- | ------------------ | -| Grok 4.5 | 80 | 190 | 380 | +| Grok 4.5 | 120 | 300 | 600 | | GLM-5.2 | 880 | 2,150 | 4,300 | | GLM-5.1 | 880 | 2,150 | 4,300 | -| Kimi K3 | 140 | 340 | 680 | +| Kimi K3 | 110 | 250 | 490 | | Kimi K2.7 Code | 1,350 | 4,630 | 9,250 | | Kimi K2.6 | 1,150 | 2,880 | 5,750 | | MiMo-V2.5 | 30,100 | 75,200 | 150,400 | @@ -109,11 +109,12 @@ La siguiente tabla proporciona una cantidad estimada de peticiones basada en los | DeepSeek V4 Pro | 3,450 | 8,550 | 17,150 | | DeepSeek V4 Flash | 31,650 | 79,050 | 158,150 | -Las estimaciones se basan en los patrones de peticiones promedio observados: +Las estimaciones se basan en los patrones de peticiones observados: - Grok 4.5 — 1,100 tokens de entrada, 71,500 en caché, 220 tokens de salida por petición - GLM-5.2/5.1 — 700 tokens de entrada, 52,000 en caché, 150 tokens de salida por petición -- Kimi K3/K2.7/K2.6 — 870 tokens de entrada, 55,000 en caché, 200 tokens de salida por petición +- Kimi K3 — 1,050 tokens de entrada, 76,500 en caché, 300 tokens de salida por petición +- Kimi K2.7/K2.6 — 870 tokens de entrada, 55,000 en caché, 200 tokens de salida por petición - DeepSeek V4 Pro — 750 tokens de entrada, 82,000 en caché, 290 tokens de salida por petición - DeepSeek V4 Flash — 790 tokens de entrada, 68,000 en caché, 280 tokens de salida por petición - MiniMax M3 — 510 tokens de entrada, 56,000 en caché, 190 tokens de salida por petición @@ -128,7 +129,7 @@ Las estimaciones también se basan en los siguientes precios por 1M tokens y en | Modelo | Entrada | Salida | Lectura en caché | Escritura en caché | Uso | | ---------------------------- | ------- | ------ | ---------------- | ------------------ | --- | -| Grok 4.5 | $2.00 | $6.00 | $0.50 | - | $15 | +| Grok 4.5 | $2.00 | $6.00 | $0.30 | - | $15 | | GLM-5.2 | $1.40 | $4.40 | $0.26 | - | $60 | | GLM-5.1 | $1.40 | $4.40 | $0.26 | - | $60 | | Kimi K3 | $3.00 | $15.00 | $0.30 | - | $15 | diff --git a/packages/web/src/content/docs/es/zen.mdx b/packages/web/src/content/docs/es/zen.mdx index 15c165ba9607..ab7e20d61a76 100644 --- a/packages/web/src/content/docs/es/zen.mdx +++ b/packages/web/src/content/docs/es/zen.mdx @@ -171,8 +171,8 @@ Admitimos un modelo de pago por uso. A continuación se muestran los precios **p | Gemini 3.1 Pro (≤ 200K tokens) | $2.00 | $12.00 | $0.20 | - | | Gemini 3.1 Pro (> 200K tokens) | $4.00 | $18.00 | $0.40 | - | | Gemini 3 Flash | $0.50 | $3.00 | $0.05 | - | -| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.50 | - | -| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $1.00 | - | +| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.30 | - | +| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $0.60 | - | | Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - | | GPT 5.6 Sol (≤ 272K tokens) | $5.00 | $30.00 | $0.50 | $6.25 | | GPT 5.6 Sol (> 272K tokens) | $10.00 | $45.00 | $1.00 | $12.50 | @@ -200,7 +200,7 @@ Admitimos un modelo de pago por uso. A continuación se muestran los precios **p | GPT 5 Codex | $1.07 | $8.50 | $0.107 | - | | GPT 5 Nano | $0.05 | $0.40 | $0.005 | - | -Puede que notes _Claude Haiku 3.5_ en tu historial de uso. Este es un [modelo de bajo costo](/docs/config/#models) que se usa para generar los títulos de tus sesiones. +Puede que notes [modelos de bajo costo](/docs/config/#models), como Haiku, Nano o Flash, en tu historial de uso. OpenCode usa estos modelos para generar títulos de sesiones. :::note Las comisiones de tarjeta de crédito se trasladan al costo (4.4% + $0.30 por transacción); no cobramos nada más allá de eso. diff --git a/packages/web/src/content/docs/fr/go.mdx b/packages/web/src/content/docs/fr/go.mdx index a49de2b735ba..95849616b0b8 100644 --- a/packages/web/src/content/docs/fr/go.mdx +++ b/packages/web/src/content/docs/fr/go.mdx @@ -83,10 +83,10 @@ Le tableau ci-dessous fournit une estimation du nombre de requêtes basée sur d | Model | requêtes par 5 heures | requêtes par semaine | requêtes par mois | | ----------------- | --------------------- | -------------------- | ----------------- | -| Grok 4.5 | 80 | 190 | 380 | +| Grok 4.5 | 120 | 300 | 600 | | GLM-5.2 | 880 | 2,150 | 4,300 | | GLM-5.1 | 880 | 2,150 | 4,300 | -| Kimi K3 | 140 | 340 | 680 | +| Kimi K3 | 110 | 250 | 490 | | Kimi K2.7 Code | 1,350 | 4,630 | 9,250 | | Kimi K2.6 | 1,150 | 2,880 | 5,750 | | MiMo-V2.5 | 30,100 | 75,200 | 150,400 | @@ -99,11 +99,12 @@ Le tableau ci-dessous fournit une estimation du nombre de requêtes basée sur d | DeepSeek V4 Pro | 3,450 | 8,550 | 17,150 | | DeepSeek V4 Flash | 31,650 | 79,050 | 158,150 | -Les estimations sont basées sur les schémas de requêtes moyens observés : +Les estimations sont basées sur les schémas de requêtes observés : - Grok 4.5 — 1,100 tokens en entrée, 71,500 en cache, 220 tokens en sortie par requête - GLM-5.2/5.1 — 700 tokens en entrée, 52,000 en cache, 150 tokens en sortie par requête -- Kimi K3/K2.7/K2.6 — 870 tokens en entrée, 55,000 en cache, 200 tokens en sortie par requête +- Kimi K3 — 1,050 tokens en entrée, 76,500 en cache, 300 tokens en sortie par requête +- Kimi K2.7/K2.6 — 870 tokens en entrée, 55,000 en cache, 200 tokens en sortie par requête - DeepSeek V4 Pro — 750 tokens en entrée, 82,000 en cache, 290 tokens en sortie par requête - DeepSeek V4 Flash — 790 tokens en entrée, 68,000 en cache, 280 tokens en sortie par requête - MiniMax M3 — 510 tokens en entrée, 56,000 en cache, 190 tokens en sortie par requête @@ -118,7 +119,7 @@ Les estimations sont également basées sur les prix suivants par 1M tokens et s | Modèle | Input | Output | Cached Read | Cached Write | Utilisation | | ---------------------------- | ------ | ------ | ----------- | ------------ | ----------- | -| Grok 4.5 | $2.00 | $6.00 | $0.50 | - | $15 | +| Grok 4.5 | $2.00 | $6.00 | $0.30 | - | $15 | | GLM-5.2 | $1.40 | $4.40 | $0.26 | - | $60 | | GLM-5.1 | $1.40 | $4.40 | $0.26 | - | $60 | | Kimi K3 | $3.00 | $15.00 | $0.30 | - | $15 | diff --git a/packages/web/src/content/docs/fr/zen.mdx b/packages/web/src/content/docs/fr/zen.mdx index d2941ec016bc..2876656b02c6 100644 --- a/packages/web/src/content/docs/fr/zen.mdx +++ b/packages/web/src/content/docs/fr/zen.mdx @@ -160,8 +160,8 @@ Nous prenons en charge un modèle de paiement à l'utilisation. Vous trouverez c | Gemini 3.1 Pro (≤ 200K tokens) | $2.00 | $12.00 | $0.20 | - | | Gemini 3.1 Pro (> 200K tokens) | $4.00 | $18.00 | $0.40 | - | | Gemini 3 Flash | $0.50 | $3.00 | $0.05 | - | -| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.50 | - | -| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $1.00 | - | +| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.30 | - | +| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $0.60 | - | | Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - | | GPT 5.6 Sol (≤ 272K tokens) | $5.00 | $30.00 | $0.50 | $6.25 | | GPT 5.6 Sol (> 272K tokens) | $10.00 | $45.00 | $1.00 | $12.50 | @@ -189,7 +189,7 @@ Nous prenons en charge un modèle de paiement à l'utilisation. Vous trouverez c | GPT 5 Codex | $1.07 | $8.50 | $0.107 | - | | GPT 5 Nano | $0.05 | $0.40 | $0.005 | - | -Vous remarquerez peut-être _Claude Haiku 3.5_ dans votre historique d'utilisation. Il s'agit d'un [modèle à faible coût](/docs/config/#models) utilisé pour générer les titres de vos sessions. +Vous remarquerez peut-être des [modèles à faible coût](/docs/config/#models), tels que Haiku, Nano ou Flash, dans votre historique d'utilisation. OpenCode utilise ces modèles pour générer les titres des sessions. :::note Les frais de carte de crédit sont répercutés au prix coûtant (4.4% + $0.30 par transaction) ; nous ne facturons rien au-delà. diff --git a/packages/web/src/content/docs/go.mdx b/packages/web/src/content/docs/go.mdx index 9a810171fe5c..8c46464086f7 100644 --- a/packages/web/src/content/docs/go.mdx +++ b/packages/web/src/content/docs/go.mdx @@ -93,10 +93,10 @@ The table below provides an estimated request count based on typical Go usage pa | Model | requests per 5 hour | requests per week | requests per month | | ----------------- | ------------------- | ----------------- | ------------------ | -| Grok 4.5 | 80 | 190 | 380 | +| Grok 4.5 | 120 | 300 | 600 | | GLM-5.2 | 880 | 2,150 | 4,300 | | GLM-5.1 | 880 | 2,150 | 4,300 | -| Kimi K3 | 140 | 340 | 680 | +| Kimi K3 | 110 | 250 | 490 | | Kimi K2.7 Code | 1,350 | 4,630 | 9,250 | | Kimi K2.6 | 1,150 | 2,880 | 5,750 | | MiMo-V2.5 | 30,100 | 75,200 | 150,400 | @@ -109,11 +109,12 @@ The table below provides an estimated request count based on typical Go usage pa | DeepSeek V4 Pro | 3,450 | 8,550 | 17,150 | | DeepSeek V4 Flash | 31,650 | 79,050 | 158,150 | -The estimates are based on observed average request patterns: +The estimates are based on observed request patterns: - Grok 4.5 — 1,100 input, 71,500 cached, 220 output tokens per request - GLM-5.2/5.1 — 700 input, 52,000 cached, 150 output tokens per request -- Kimi K3/K2.7/K2.6 — 870 input, 55,000 cached, 200 output tokens per request +- Kimi K3 — 1,050 input, 76,500 cached, 300 output tokens per request +- Kimi K2.7/K2.6 — 870 input, 55,000 cached, 200 output tokens per request - DeepSeek V4 Pro — 750 input, 82,000 cached, 290 output tokens per request - DeepSeek V4 Flash — 790 input, 68,000 cached, 280 output tokens per request - MiniMax M3 — 510 input, 56,000 cached, 190 output tokens per request @@ -128,7 +129,7 @@ The estimates are also based on the following prices per 1M tokens and the month | Model | Input | Output | Cached Read | Cached Write | Usage | | ---------------------------- | ------ | ------ | ----------- | ------------ | ----- | -| Grok 4.5 | $2.00 | $6.00 | $0.50 | - | $15 | +| Grok 4.5 | $2.00 | $6.00 | $0.30 | - | $15 | | GLM-5.2 | $1.40 | $4.40 | $0.26 | - | $60 | | GLM-5.1 | $1.40 | $4.40 | $0.26 | - | $60 | | Kimi K3 | $3.00 | $15.00 | $0.30 | - | $15 | diff --git a/packages/web/src/content/docs/it/go.mdx b/packages/web/src/content/docs/it/go.mdx index 55aea9e07519..65369e1e868a 100644 --- a/packages/web/src/content/docs/it/go.mdx +++ b/packages/web/src/content/docs/it/go.mdx @@ -91,10 +91,10 @@ La tabella seguente fornisce una stima del conteggio delle richieste in base a p | Model | richieste ogni 5 ore | richieste a settimana | richieste al mese | | ----------------- | -------------------- | --------------------- | ----------------- | -| Grok 4.5 | 80 | 190 | 380 | +| Grok 4.5 | 120 | 300 | 600 | | GLM-5.2 | 880 | 2,150 | 4,300 | | GLM-5.1 | 880 | 2,150 | 4,300 | -| Kimi K3 | 140 | 340 | 680 | +| Kimi K3 | 110 | 250 | 490 | | Kimi K2.7 Code | 1,350 | 4,630 | 9,250 | | Kimi K2.6 | 1,150 | 2,880 | 5,750 | | MiMo-V2.5 | 30,100 | 75,200 | 150,400 | @@ -107,11 +107,12 @@ La tabella seguente fornisce una stima del conteggio delle richieste in base a p | DeepSeek V4 Pro | 3,450 | 8,550 | 17,150 | | DeepSeek V4 Flash | 31,650 | 79,050 | 158,150 | -Le stime si basano sui pattern medi di richieste osservati: +Le stime si basano sui pattern di richieste osservati: - Grok 4.5 — 1.100 di input, 71.500 in cache, 220 token di output per richiesta - GLM-5.2/5.1 — 700 di input, 52.000 in cache, 150 token di output per richiesta -- Kimi K3/K2.7/K2.6 — 870 di input, 55.000 in cache, 200 token di output per richiesta +- Kimi K3 — 1.050 di input, 76.500 in cache, 300 token di output per richiesta +- Kimi K2.7/K2.6 — 870 di input, 55.000 in cache, 200 token di output per richiesta - DeepSeek V4 Pro — 750 di input, 82.000 in cache, 290 token di output per richiesta - DeepSeek V4 Flash — 790 di input, 68.000 in cache, 280 token di output per richiesta - MiniMax M3 — 510 di input, 56.000 in cache, 190 token di output per richiesta @@ -126,7 +127,7 @@ Le stime si basano anche sui seguenti prezzi per 1M token e sull'utilizzo mensil | Modello | Input | Output | Cached Read | Cached Write | Utilizzo | | ---------------------------- | ------ | ------ | ----------- | ------------ | -------- | -| Grok 4.5 | $2.00 | $6.00 | $0.50 | - | $15 | +| Grok 4.5 | $2.00 | $6.00 | $0.30 | - | $15 | | GLM-5.2 | $1.40 | $4.40 | $0.26 | - | $60 | | GLM-5.1 | $1.40 | $4.40 | $0.26 | - | $60 | | Kimi K3 | $3.00 | $15.00 | $0.30 | - | $15 | diff --git a/packages/web/src/content/docs/it/zen.mdx b/packages/web/src/content/docs/it/zen.mdx index 0efd8a1c1a9b..a9206d3450c1 100644 --- a/packages/web/src/content/docs/it/zen.mdx +++ b/packages/web/src/content/docs/it/zen.mdx @@ -171,8 +171,8 @@ Supportiamo un modello pay-as-you-go. Qui sotto trovi i prezzi **per 1M token**. | Gemini 3.1 Pro (≤ 200K tokens) | $2.00 | $12.00 | $0.20 | - | | Gemini 3.1 Pro (> 200K tokens) | $4.00 | $18.00 | $0.40 | - | | Gemini 3 Flash | $0.50 | $3.00 | $0.05 | - | -| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.50 | - | -| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $1.00 | - | +| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.30 | - | +| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $0.60 | - | | Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - | | GPT 5.6 Sol (≤ 272K tokens) | $5.00 | $30.00 | $0.50 | $6.25 | | GPT 5.6 Sol (> 272K tokens) | $10.00 | $45.00 | $1.00 | $12.50 | @@ -200,7 +200,7 @@ Supportiamo un modello pay-as-you-go. Qui sotto trovi i prezzi **per 1M token**. | GPT 5 Codex | $1.07 | $8.50 | $0.107 | - | | GPT 5 Nano | $0.05 | $0.40 | $0.005 | - | -Potresti notare _Claude Haiku 3.5_ nella cronologia di utilizzo. È un [modello a basso costo](/docs/config/#models) usato per generare i titoli delle tue sessioni. +Potresti notare [modelli a basso costo](/docs/config/#models), come Haiku, Nano o Flash, nella cronologia di utilizzo. OpenCode usa questi modelli per generare i titoli delle sessioni. :::note Le commissioni della carta di credito vengono trasferite al costo (4.4% + $0.30 per transazione); non addebitiamo nulla oltre a questo. diff --git a/packages/web/src/content/docs/ja/go.mdx b/packages/web/src/content/docs/ja/go.mdx index c1321ed16122..8bb9139e83ae 100644 --- a/packages/web/src/content/docs/ja/go.mdx +++ b/packages/web/src/content/docs/ja/go.mdx @@ -83,10 +83,10 @@ OpenCode Goには以下の制限が含まれています: | Model | 5時間あたりのリクエスト数 | 週間リクエスト数 | 月間リクエスト数 | | ----------------- | ------------------------- | ---------------- | ---------------- | -| Grok 4.5 | 80 | 190 | 380 | +| Grok 4.5 | 120 | 300 | 600 | | GLM-5.2 | 880 | 2,150 | 4,300 | | GLM-5.1 | 880 | 2,150 | 4,300 | -| Kimi K3 | 140 | 340 | 680 | +| Kimi K3 | 110 | 250 | 490 | | Kimi K2.7 Code | 1,350 | 4,630 | 9,250 | | Kimi K2.6 | 1,150 | 2,880 | 5,750 | | MiMo-V2.5 | 30,100 | 75,200 | 150,400 | @@ -99,11 +99,12 @@ OpenCode Goには以下の制限が含まれています: | DeepSeek V4 Pro | 3,450 | 8,550 | 17,150 | | DeepSeek V4 Flash | 31,650 | 79,050 | 158,150 | -推定値は、観測された平均的なリクエストパターンに基づいています: +推定値は、観測されたリクエストパターンに基づいています: - Grok 4.5 — リクエストあたり 入力 1,100トークン、キャッシュ 71,500トークン、出力 220トークン - GLM-5.2/5.1 — リクエストあたり 入力 700トークン、キャッシュ 52,000トークン、出力 150トークン -- Kimi K3/K2.7/K2.6 — リクエストあたり 入力 870トークン、キャッシュ 55,000トークン、出力 200トークン +- Kimi K3 — リクエストあたり 入力 1,050トークン、キャッシュ 76,500トークン、出力 300トークン +- Kimi K2.7/K2.6 — リクエストあたり 入力 870トークン、キャッシュ 55,000トークン、出力 200トークン - DeepSeek V4 Pro — リクエストあたり 入力 750トークン、キャッシュ 82,000トークン、出力 290トークン - DeepSeek V4 Flash — リクエストあたり 入力 790トークン、キャッシュ 68,000トークン、出力 280トークン - MiniMax M3 — リクエストあたり 入力 510トークン、キャッシュ 56,000トークン、出力 190トークン @@ -118,7 +119,7 @@ OpenCode Goには以下の制限が含まれています: | Model | Input | Output | Cached Read | Cached Write | Usage | | ---------------------------- | ------ | ------ | ----------- | ------------ | ----- | -| Grok 4.5 | $2.00 | $6.00 | $0.50 | - | $15 | +| Grok 4.5 | $2.00 | $6.00 | $0.30 | - | $15 | | GLM-5.2 | $1.40 | $4.40 | $0.26 | - | $60 | | GLM-5.1 | $1.40 | $4.40 | $0.26 | - | $60 | | Kimi K3 | $3.00 | $15.00 | $0.30 | - | $15 | diff --git a/packages/web/src/content/docs/ja/zen.mdx b/packages/web/src/content/docs/ja/zen.mdx index ff405e627bf0..c43db60536f1 100644 --- a/packages/web/src/content/docs/ja/zen.mdx +++ b/packages/web/src/content/docs/ja/zen.mdx @@ -160,8 +160,8 @@ https://opencode.ai/zen/v1/models | Gemini 3.1 Pro (≤ 200K tokens) | $2.00 | $12.00 | $0.20 | - | | Gemini 3.1 Pro (> 200K tokens) | $4.00 | $18.00 | $0.40 | - | | Gemini 3 Flash | $0.50 | $3.00 | $0.05 | - | -| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.50 | - | -| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $1.00 | - | +| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.30 | - | +| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $0.60 | - | | Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - | | GPT 5.6 Sol (≤ 272K tokens) | $5.00 | $30.00 | $0.50 | $6.25 | | GPT 5.6 Sol (> 272K tokens) | $10.00 | $45.00 | $1.00 | $12.50 | @@ -189,7 +189,7 @@ https://opencode.ai/zen/v1/models | GPT 5 Codex | $1.07 | $8.50 | $0.107 | - | | GPT 5 Nano | $0.05 | $0.40 | $0.005 | - | -使用履歴に _Claude Haiku 3.5_ が表示されることがあります。これはセッションのタイトル生成に使われる [low cost model](/docs/config/#models) です。 +使用履歴に Haiku、Nano、Flash などの[低コストモデル](/docs/config/#models)が表示されることがあります。OpenCode はこれらのモデルをセッションタイトルの生成に使用します。 :::note クレジットカード手数料は実費で転嫁されます(各取引につき 4.4% + $0.30)。それ以外の上乗せはありません。 diff --git a/packages/web/src/content/docs/ko/go.mdx b/packages/web/src/content/docs/ko/go.mdx index ad41fbfbe1e0..02f88d2828eb 100644 --- a/packages/web/src/content/docs/ko/go.mdx +++ b/packages/web/src/content/docs/ko/go.mdx @@ -83,10 +83,10 @@ OpenCode Go에는 다음과 같은 한도가 포함됩니다. | Model | 5시간당 요청 횟수 | 주간 요청 횟수 | 월간 요청 횟수 | | ----------------- | ----------------- | -------------- | -------------- | -| Grok 4.5 | 80 | 190 | 380 | +| Grok 4.5 | 120 | 300 | 600 | | GLM-5.2 | 880 | 2,150 | 4,300 | | GLM-5.1 | 880 | 2,150 | 4,300 | -| Kimi K3 | 140 | 340 | 680 | +| Kimi K3 | 110 | 250 | 490 | | Kimi K2.7 Code | 1,350 | 4,630 | 9,250 | | Kimi K2.6 | 1,150 | 2,880 | 5,750 | | MiMo-V2.5 | 30,100 | 75,200 | 150,400 | @@ -99,11 +99,12 @@ OpenCode Go에는 다음과 같은 한도가 포함됩니다. | DeepSeek V4 Pro | 3,450 | 8,550 | 17,150 | | DeepSeek V4 Flash | 31,650 | 79,050 | 158,150 | -이 예상치는 관찰된 평균 요청 패턴을 기준으로 합니다. +이 예상치는 관찰된 요청 패턴을 기준으로 합니다. - Grok 4.5 — 요청당 입력 1,100, 캐시 71,500, 출력 토큰 220 - GLM-5.2/5.1 — 요청당 입력 700, 캐시 52,000, 출력 토큰 150 -- Kimi K3/K2.7/K2.6 — 요청당 입력 870, 캐시 55,000, 출력 토큰 200 +- Kimi K3 — 요청당 입력 1,050, 캐시 76,500, 출력 토큰 300 +- Kimi K2.7/K2.6 — 요청당 입력 870, 캐시 55,000, 출력 토큰 200 - DeepSeek V4 Pro — 요청당 입력 750, 캐시 82,000, 출력 토큰 290 - DeepSeek V4 Flash — 요청당 입력 790, 캐시 68,000, 출력 토큰 280 - MiniMax M3 — 요청당 입력 510, 캐시 56,000, 출력 토큰 190 @@ -118,7 +119,7 @@ OpenCode Go에는 다음과 같은 한도가 포함됩니다. | Model | Input | Output | Cached Read | Cached Write | Usage | | ---------------------------- | ------ | ------ | ----------- | ------------ | ----- | -| Grok 4.5 | $2.00 | $6.00 | $0.50 | - | $15 | +| Grok 4.5 | $2.00 | $6.00 | $0.30 | - | $15 | | GLM-5.2 | $1.40 | $4.40 | $0.26 | - | $60 | | GLM-5.1 | $1.40 | $4.40 | $0.26 | - | $60 | | Kimi K3 | $3.00 | $15.00 | $0.30 | - | $15 | diff --git a/packages/web/src/content/docs/ko/zen.mdx b/packages/web/src/content/docs/ko/zen.mdx index ccbb5c6779cb..1d27cd654b9d 100644 --- a/packages/web/src/content/docs/ko/zen.mdx +++ b/packages/web/src/content/docs/ko/zen.mdx @@ -160,8 +160,8 @@ https://opencode.ai/zen/v1/models | Gemini 3.1 Pro (≤ 200K tokens) | $2.00 | $12.00 | $0.20 | - | | Gemini 3.1 Pro (> 200K tokens) | $4.00 | $18.00 | $0.40 | - | | Gemini 3 Flash | $0.50 | $3.00 | $0.05 | - | -| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.50 | - | -| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $1.00 | - | +| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.30 | - | +| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $0.60 | - | | Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - | | GPT 5.6 Sol (≤ 272K tokens) | $5.00 | $30.00 | $0.50 | $6.25 | | GPT 5.6 Sol (> 272K tokens) | $10.00 | $45.00 | $1.00 | $12.50 | @@ -189,7 +189,7 @@ https://opencode.ai/zen/v1/models | GPT 5 Codex | $1.07 | $8.50 | $0.107 | - | | GPT 5 Nano | $0.05 | $0.40 | $0.005 | - | -사용 기록에서 *Claude Haiku 3.5*를 볼 수 있습니다. 이는 세션 제목을 생성할 때 사용되는 [저비용 모델](/docs/config/#models)입니다. +사용 기록에서 Haiku, Nano 또는 Flash와 같은 [저비용 모델](/docs/config/#models)을 볼 수 있습니다. OpenCode는 이러한 모델을 사용해 세션 제목을 생성합니다. :::note 신용카드 수수료는 원가 그대로 전달됩니다(거래당 4.4% + $0.30). 그 외 추가 요금은 부과하지 않습니다. diff --git a/packages/web/src/content/docs/nb/go.mdx b/packages/web/src/content/docs/nb/go.mdx index 6c298a14148c..60be1cc7bbba 100644 --- a/packages/web/src/content/docs/nb/go.mdx +++ b/packages/web/src/content/docs/nb/go.mdx @@ -93,10 +93,10 @@ Tabellen nedenfor gir et estimert antall forespørsler basert på typiske bruksm | Model | forespørsler per 5 timer | forespørsler per uke | forespørsler per måned | | ----------------- | ------------------------ | -------------------- | ---------------------- | -| Grok 4.5 | 80 | 190 | 380 | +| Grok 4.5 | 120 | 300 | 600 | | GLM-5.2 | 880 | 2,150 | 4,300 | | GLM-5.1 | 880 | 2,150 | 4,300 | -| Kimi K3 | 140 | 340 | 680 | +| Kimi K3 | 110 | 250 | 490 | | Kimi K2.7 Code | 1,350 | 4,630 | 9,250 | | Kimi K2.6 | 1,150 | 2,880 | 5,750 | | MiMo-V2.5 | 30,100 | 75,200 | 150,400 | @@ -109,11 +109,12 @@ Tabellen nedenfor gir et estimert antall forespørsler basert på typiske bruksm | DeepSeek V4 Pro | 3,450 | 8,550 | 17,150 | | DeepSeek V4 Flash | 31,650 | 79,050 | 158,150 | -Estimatene er basert på observerte gjennomsnittlige forespørselsmønstre: +Estimatene er basert på observerte forespørselsmønstre: - Grok 4.5 — 1 100 input, 71 500 bufret, 220 output-tokens per forespørsel - GLM-5.2/5.1 — 700 input, 52 000 bufret, 150 output-tokens per forespørsel -- Kimi K3/K2.7/K2.6 — 870 input, 55 000 bufret, 200 output-tokens per forespørsel +- Kimi K3 — 1 050 input, 76 500 bufret, 300 output-tokens per forespørsel +- Kimi K2.7/K2.6 — 870 input, 55 000 bufret, 200 output-tokens per forespørsel - DeepSeek V4 Pro — 750 input, 82 000 bufret, 290 output-tokens per forespørsel - DeepSeek V4 Flash — 790 input, 68 000 bufret, 280 output-tokens per forespørsel - MiniMax M3 — 510 input, 56 000 bufret, 190 output-tokens per forespørsel @@ -128,7 +129,7 @@ Estimatene er også basert på følgende priser per 1M tokens og den månedlige | Model | Input | Output | Cached Read | Cached Write | Bruk | | ---------------------------- | ------ | ------ | ----------- | ------------ | ---- | -| Grok 4.5 | $2.00 | $6.00 | $0.50 | - | $15 | +| Grok 4.5 | $2.00 | $6.00 | $0.30 | - | $15 | | GLM-5.2 | $1.40 | $4.40 | $0.26 | - | $60 | | GLM-5.1 | $1.40 | $4.40 | $0.26 | - | $60 | | Kimi K3 | $3.00 | $15.00 | $0.30 | - | $15 | diff --git a/packages/web/src/content/docs/nb/zen.mdx b/packages/web/src/content/docs/nb/zen.mdx index ee6032c17e67..31b53662595b 100644 --- a/packages/web/src/content/docs/nb/zen.mdx +++ b/packages/web/src/content/docs/nb/zen.mdx @@ -171,8 +171,8 @@ Vi støtter en pay-as-you-go-modell. Nedenfor er prisene **per 1M tokens**. | Gemini 3.1 Pro (≤ 200K tokens) | $2.00 | $12.00 | $0.20 | - | | Gemini 3.1 Pro (> 200K tokens) | $4.00 | $18.00 | $0.40 | - | | Gemini 3 Flash | $0.50 | $3.00 | $0.05 | - | -| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.50 | - | -| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $1.00 | - | +| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.30 | - | +| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $0.60 | - | | Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - | | GPT 5.6 Sol (≤ 272K tokens) | $5.00 | $30.00 | $0.50 | $6.25 | | GPT 5.6 Sol (> 272K tokens) | $10.00 | $45.00 | $1.00 | $12.50 | @@ -200,7 +200,7 @@ Vi støtter en pay-as-you-go-modell. Nedenfor er prisene **per 1M tokens**. | GPT 5 Codex | $1.07 | $8.50 | $0.107 | - | | GPT 5 Nano | $0.05 | $0.40 | $0.005 | - | -Du vil kanskje legge merke til _Claude Haiku 3.5_ i brukshistorikken din. Dette er en [lavprismodell](/docs/config/#models) som brukes til å generere titlene på øktene dine. +Du vil kanskje legge merke til [lavprismodeller](/docs/config/#models), som Haiku, Nano eller Flash, i brukshistorikken din. OpenCode bruker disse modellene til å generere økttitler. :::note Kredittkortgebyrer videreføres til kostpris (4.4% + $0.30 per transaction); vi tar ikke betalt noe utover det. diff --git a/packages/web/src/content/docs/pl/go.mdx b/packages/web/src/content/docs/pl/go.mdx index c974478fc14a..4a867bf0e724 100644 --- a/packages/web/src/content/docs/pl/go.mdx +++ b/packages/web/src/content/docs/pl/go.mdx @@ -87,10 +87,10 @@ Poniższa tabela przedstawia szacunkową liczbę żądań na podstawie typowych | Model | żądania na 5 godzin | żądania na tydzień | żądania na miesiąc | | ----------------- | ------------------- | ------------------ | ------------------ | -| Grok 4.5 | 80 | 190 | 380 | +| Grok 4.5 | 120 | 300 | 600 | | GLM-5.2 | 880 | 2,150 | 4,300 | | GLM-5.1 | 880 | 2,150 | 4,300 | -| Kimi K3 | 140 | 340 | 680 | +| Kimi K3 | 110 | 250 | 490 | | Kimi K2.7 Code | 1,350 | 4,630 | 9,250 | | Kimi K2.6 | 1,150 | 2,880 | 5,750 | | MiMo-V2.5 | 30,100 | 75,200 | 150,400 | @@ -103,11 +103,12 @@ Poniższa tabela przedstawia szacunkową liczbę żądań na podstawie typowych | DeepSeek V4 Pro | 3,450 | 8,550 | 17,150 | | DeepSeek V4 Flash | 31,650 | 79,050 | 158,150 | -Szacunki te opierają się na zaobserwowanych średnich wzorcach żądań: +Szacunki te opierają się na zaobserwowanych wzorcach żądań: - Grok 4.5 — 1 100 tokenów wejściowych, 71 500 w pamięci podręcznej, 220 tokenów wyjściowych na żądanie - GLM-5.2/5.1 — 700 tokenów wejściowych, 52 000 w pamięci podręcznej, 150 tokenów wyjściowych na żądanie -- Kimi K3/K2.7/K2.6 — 870 tokenów wejściowych, 55 000 w pamięci podręcznej, 200 tokenów wyjściowych na żądanie +- Kimi K3 — 1 050 tokenów wejściowych, 76 500 w pamięci podręcznej, 300 tokenów wyjściowych na żądanie +- Kimi K2.7/K2.6 — 870 tokenów wejściowych, 55 000 w pamięci podręcznej, 200 tokenów wyjściowych na żądanie - DeepSeek V4 Pro — 750 tokenów wejściowych, 82 000 w pamięci podręcznej, 290 tokenów wyjściowych na żądanie - DeepSeek V4 Flash — 790 tokenów wejściowych, 68 000 w pamięci podręcznej, 280 tokenów wyjściowych na żądanie - MiniMax M3 — 510 tokenów wejściowych, 56 000 w pamięci podręcznej, 190 tokenów wyjściowych na żądanie @@ -122,7 +123,7 @@ Szacunki opierają się również na następujących cenach za 1M tokenów oraz | Model | Wejście | Wyjście | Odczyt z cache | Zapis do cache | Użycie | | ---------------------------- | ------- | ------- | -------------- | -------------- | ------ | -| Grok 4.5 | $2.00 | $6.00 | $0.50 | - | $15 | +| Grok 4.5 | $2.00 | $6.00 | $0.30 | - | $15 | | GLM-5.2 | $1.40 | $4.40 | $0.26 | - | $60 | | GLM-5.1 | $1.40 | $4.40 | $0.26 | - | $60 | | Kimi K3 | $3.00 | $15.00 | $0.30 | - | $15 | diff --git a/packages/web/src/content/docs/pl/zen.mdx b/packages/web/src/content/docs/pl/zen.mdx index 8ee3647eb202..8f95f102efda 100644 --- a/packages/web/src/content/docs/pl/zen.mdx +++ b/packages/web/src/content/docs/pl/zen.mdx @@ -171,8 +171,8 @@ Obsługujemy model pay-as-you-go. Poniżej znajdują się ceny **za 1M tokenów* | Gemini 3.1 Pro (≤ 200K tokens) | $2.00 | $12.00 | $0.20 | - | | Gemini 3.1 Pro (> 200K tokens) | $4.00 | $18.00 | $0.40 | - | | Gemini 3 Flash | $0.50 | $3.00 | $0.05 | - | -| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.50 | - | -| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $1.00 | - | +| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.30 | - | +| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $0.60 | - | | Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - | | GPT 5.6 Sol (≤ 272K tokens) | $5.00 | $30.00 | $0.50 | $6.25 | | GPT 5.6 Sol (> 272K tokens) | $10.00 | $45.00 | $1.00 | $12.50 | @@ -200,8 +200,7 @@ Obsługujemy model pay-as-you-go. Poniżej znajdują się ceny **za 1M tokenów* | GPT 5 Codex | $1.07 | $8.50 | $0.107 | - | | GPT 5 Nano | $0.05 | $0.40 | $0.005 | - | -Możesz zauważyć _Claude Haiku 3.5_ w historii użycia. To [niedrogi model](/docs/config/#models), -który służy do generowania tytułów Twoich sesji. +W historii użycia możesz zauważyć [niedrogie modele](/docs/config/#models), takie jak Haiku, Nano lub Flash. OpenCode używa tych modeli do generowania tytułów sesji. :::note Opłaty za karty kredytowe są przenoszone po kosztach (4.4% + $0.30 per transaction); nie naliczamy nic ponad to. diff --git a/packages/web/src/content/docs/pt-br/go.mdx b/packages/web/src/content/docs/pt-br/go.mdx index b44adf2d154a..96c1addfcc91 100644 --- a/packages/web/src/content/docs/pt-br/go.mdx +++ b/packages/web/src/content/docs/pt-br/go.mdx @@ -93,10 +93,10 @@ A tabela abaixo fornece uma contagem estimada de requisições com base nos padr | Model | requisições por 5 horas | requisições por semana | requisições por mês | | ----------------- | ----------------------- | ---------------------- | ------------------- | -| Grok 4.5 | 80 | 190 | 380 | +| Grok 4.5 | 120 | 300 | 600 | | GLM-5.2 | 880 | 2,150 | 4,300 | | GLM-5.1 | 880 | 2,150 | 4,300 | -| Kimi K3 | 140 | 340 | 680 | +| Kimi K3 | 110 | 250 | 490 | | Kimi K2.7 Code | 1,350 | 4,630 | 9,250 | | Kimi K2.6 | 1,150 | 2,880 | 5,750 | | MiMo-V2.5 | 30,100 | 75,200 | 150,400 | @@ -109,11 +109,12 @@ A tabela abaixo fornece uma contagem estimada de requisições com base nos padr | DeepSeek V4 Pro | 3,450 | 8,550 | 17,150 | | DeepSeek V4 Flash | 31,650 | 79,050 | 158,150 | -As estimativas se baseiam nos padrões médios de requisições observados: +As estimativas se baseiam nos padrões de requisições observados: - Grok 4.5 — 1.100 tokens de entrada, 71.500 em cache, 220 tokens de saída por requisição - GLM-5.2/5.1 — 700 tokens de entrada, 52.000 em cache, 150 tokens de saída por requisição -- Kimi K3/K2.7/K2.6 — 870 tokens de entrada, 55.000 em cache, 200 tokens de saída por requisição +- Kimi K3 — 1.050 tokens de entrada, 76.500 em cache, 300 tokens de saída por requisição +- Kimi K2.7/K2.6 — 870 tokens de entrada, 55.000 em cache, 200 tokens de saída por requisição - DeepSeek V4 Pro — 750 tokens de entrada, 82.000 em cache, 290 tokens de saída por requisição - DeepSeek V4 Flash — 790 tokens de entrada, 68.000 em cache, 280 tokens de saída por requisição - MiniMax M3 — 510 tokens de entrada, 56.000 em cache, 190 tokens de saída por requisição @@ -128,7 +129,7 @@ As estimativas também se baseiam nos seguintes preços por 1M tokens e no uso m | Modelo | Entrada | Saída | Leitura em cache | Escrita em cache | Uso | | ---------------------------- | ------- | ------ | ---------------- | ---------------- | --- | -| Grok 4.5 | $2.00 | $6.00 | $0.50 | - | $15 | +| Grok 4.5 | $2.00 | $6.00 | $0.30 | - | $15 | | GLM-5.2 | $1.40 | $4.40 | $0.26 | - | $60 | | GLM-5.1 | $1.40 | $4.40 | $0.26 | - | $60 | | Kimi K3 | $3.00 | $15.00 | $0.30 | - | $15 | diff --git a/packages/web/src/content/docs/pt-br/zen.mdx b/packages/web/src/content/docs/pt-br/zen.mdx index ff6b4b4f7753..bb403151147c 100644 --- a/packages/web/src/content/docs/pt-br/zen.mdx +++ b/packages/web/src/content/docs/pt-br/zen.mdx @@ -160,8 +160,8 @@ Oferecemos um modelo pay-as-you-go. Abaixo estão os preços **por 1M tokens**. | Gemini 3.1 Pro (≤ 200K tokens) | $2.00 | $12.00 | $0.20 | - | | Gemini 3.1 Pro (> 200K tokens) | $4.00 | $18.00 | $0.40 | - | | Gemini 3 Flash | $0.50 | $3.00 | $0.05 | - | -| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.50 | - | -| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $1.00 | - | +| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.30 | - | +| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $0.60 | - | | Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - | | GPT 5.6 Sol (≤ 272K tokens) | $5.00 | $30.00 | $0.50 | $6.25 | | GPT 5.6 Sol (> 272K tokens) | $10.00 | $45.00 | $1.00 | $12.50 | @@ -189,7 +189,7 @@ Oferecemos um modelo pay-as-you-go. Abaixo estão os preços **por 1M tokens**. | GPT 5 Codex | $1.07 | $8.50 | $0.107 | - | | GPT 5 Nano | $0.05 | $0.40 | $0.005 | - | -Você pode notar _Claude Haiku 3.5_ no seu histórico de uso. Este é um [low cost model](/docs/config/#models) usado para gerar os títulos das suas sessões. +Você pode notar [modelos de baixo custo](/docs/config/#models), como Haiku, Nano ou Flash, no seu histórico de uso. O OpenCode usa esses modelos para gerar títulos de sessões. :::note As taxas de cartão de crédito são repassadas a preço de custo (4.4% + $0.30 por transação); não cobramos nada além disso. diff --git a/packages/web/src/content/docs/ru/go.mdx b/packages/web/src/content/docs/ru/go.mdx index 8d12fe6baea7..62305fbdb695 100644 --- a/packages/web/src/content/docs/ru/go.mdx +++ b/packages/web/src/content/docs/ru/go.mdx @@ -93,10 +93,10 @@ OpenCode Go включает следующие лимиты: | Model | запросов за 5 часов | запросов в неделю | запросов в месяц | | ----------------- | ------------------- | ----------------- | ---------------- | -| Grok 4.5 | 80 | 190 | 380 | +| Grok 4.5 | 120 | 300 | 600 | | GLM-5.2 | 880 | 2,150 | 4,300 | | GLM-5.1 | 880 | 2,150 | 4,300 | -| Kimi K3 | 140 | 340 | 680 | +| Kimi K3 | 110 | 250 | 490 | | Kimi K2.7 Code | 1,350 | 4,630 | 9,250 | | Kimi K2.6 | 1,150 | 2,880 | 5,750 | | MiMo-V2.5 | 30,100 | 75,200 | 150,400 | @@ -109,11 +109,12 @@ OpenCode Go включает следующие лимиты: | DeepSeek V4 Pro | 3,450 | 8,550 | 17,150 | | DeepSeek V4 Flash | 31,650 | 79,050 | 158,150 | -Эти оценки основаны на наблюдаемых средних показателях запросов: +Эти оценки основаны на наблюдаемых показателях запросов: - Grok 4.5 — 1,100 входных, 71,500 кешированных, 220 выходных токенов на запрос - GLM-5.2/5.1 — 700 входных, 52,000 кешированных, 150 выходных токенов на запрос -- Kimi K3/K2.7/K2.6 — 870 входных, 55,000 кешированных, 200 выходных токенов на запрос +- Kimi K3 — 1,050 входных, 76,500 кешированных, 300 выходных токенов на запрос +- Kimi K2.7/K2.6 — 870 входных, 55,000 кешированных, 200 выходных токенов на запрос - DeepSeek V4 Pro — 750 входных, 82,000 кешированных, 290 выходных токенов на запрос - DeepSeek V4 Flash — 790 входных, 68,000 кешированных, 280 выходных токенов на запрос - MiniMax M3 — 510 входных, 56,000 кешированных, 190 выходных токенов на запрос @@ -128,7 +129,7 @@ OpenCode Go включает следующие лимиты: | Model | Input | Output | Cached Read | Cached Write | Использование | | ---------------------------- | ------ | ------ | ----------- | ------------ | ------------- | -| Grok 4.5 | $2.00 | $6.00 | $0.50 | - | $15 | +| Grok 4.5 | $2.00 | $6.00 | $0.30 | - | $15 | | GLM-5.2 | $1.40 | $4.40 | $0.26 | - | $60 | | GLM-5.1 | $1.40 | $4.40 | $0.26 | - | $60 | | Kimi K3 | $3.00 | $15.00 | $0.30 | - | $15 | diff --git a/packages/web/src/content/docs/ru/zen.mdx b/packages/web/src/content/docs/ru/zen.mdx index e54303a3595e..3b3403b868a4 100644 --- a/packages/web/src/content/docs/ru/zen.mdx +++ b/packages/web/src/content/docs/ru/zen.mdx @@ -171,8 +171,8 @@ https://opencode.ai/zen/v1/models | Gemini 3.1 Pro (≤ 200K tokens) | $2.00 | $12.00 | $0.20 | - | | Gemini 3.1 Pro (> 200K tokens) | $4.00 | $18.00 | $0.40 | - | | Gemini 3 Flash | $0.50 | $3.00 | $0.05 | - | -| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.50 | - | -| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $1.00 | - | +| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.30 | - | +| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $0.60 | - | | Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - | | GPT 5.6 Sol (≤ 272K tokens) | $5.00 | $30.00 | $0.50 | $6.25 | | GPT 5.6 Sol (> 272K tokens) | $10.00 | $45.00 | $1.00 | $12.50 | @@ -200,7 +200,7 @@ https://opencode.ai/zen/v1/models | GPT 5 Codex | $1.07 | $8.50 | $0.107 | - | | GPT 5 Nano | $0.05 | $0.40 | $0.005 | - | -Вы можете заметить _Claude Haiku 3.5_ в истории использования. Это [недорогая модель](/docs/config/#models), которая используется для генерации заголовков ваших сессий. +В истории использования могут появляться [недорогие модели](/docs/config/#models), такие как Haiku, Nano или Flash. OpenCode использует эти модели для создания заголовков сессий. :::note Комиссии по кредитным картам передаются по себестоимости (4.4% + $0.30 за транзакцию); мы ничего не начисляем сверх этого. diff --git a/packages/web/src/content/docs/th/go.mdx b/packages/web/src/content/docs/th/go.mdx index 994999894a45..36036426da43 100644 --- a/packages/web/src/content/docs/th/go.mdx +++ b/packages/web/src/content/docs/th/go.mdx @@ -83,10 +83,10 @@ OpenCode Go มีขีดจำกัดดังต่อไปนี้: | Model | requests ต่อ 5 ชั่วโมง | requests ต่อสัปดาห์ | requests ต่อเดือน | | ----------------- | ---------------------- | ------------------- | ----------------- | -| Grok 4.5 | 80 | 190 | 380 | +| Grok 4.5 | 120 | 300 | 600 | | GLM-5.2 | 880 | 2,150 | 4,300 | | GLM-5.1 | 880 | 2,150 | 4,300 | -| Kimi K3 | 140 | 340 | 680 | +| Kimi K3 | 110 | 250 | 490 | | Kimi K2.7 Code | 1,350 | 4,630 | 9,250 | | Kimi K2.6 | 1,150 | 2,880 | 5,750 | | MiMo-V2.5 | 30,100 | 75,200 | 150,400 | @@ -99,11 +99,12 @@ OpenCode Go มีขีดจำกัดดังต่อไปนี้: | DeepSeek V4 Pro | 3,450 | 8,550 | 17,150 | | DeepSeek V4 Flash | 31,650 | 79,050 | 158,150 | -การประมาณการนี้อ้างอิงจากรูปแบบการใช้งาน request โดยเฉลี่ยที่สังเกตพบ: +การประมาณการนี้อ้างอิงจากรูปแบบการใช้งาน request ที่สังเกตพบ: - Grok 4.5 — 1,100 input, 71,500 cached, 220 output tokens ต่อ request - GLM-5.2/5.1 — 700 input, 52,000 cached, 150 output tokens ต่อ request -- Kimi K3/K2.7/K2.6 — 870 input, 55,000 cached, 200 output tokens ต่อ request +- Kimi K3 — 1,050 input, 76,500 cached, 300 output tokens ต่อ request +- Kimi K2.7/K2.6 — 870 input, 55,000 cached, 200 output tokens ต่อ request - DeepSeek V4 Pro — 750 input, 82,000 cached, 290 output tokens ต่อ request - DeepSeek V4 Flash — 790 input, 68,000 cached, 280 output tokens ต่อ request - MiniMax M3 — 510 input, 56,000 cached, 190 output tokens ต่อ request @@ -118,7 +119,7 @@ OpenCode Go มีขีดจำกัดดังต่อไปนี้: | Model | Input | Output | Cached Read | Cached Write | Usage | | ---------------------------- | ------ | ------ | ----------- | ------------ | ----- | -| Grok 4.5 | $2.00 | $6.00 | $0.50 | - | $15 | +| Grok 4.5 | $2.00 | $6.00 | $0.30 | - | $15 | | GLM-5.2 | $1.40 | $4.40 | $0.26 | - | $60 | | GLM-5.1 | $1.40 | $4.40 | $0.26 | - | $60 | | Kimi K3 | $3.00 | $15.00 | $0.30 | - | $15 | diff --git a/packages/web/src/content/docs/th/zen.mdx b/packages/web/src/content/docs/th/zen.mdx index abf7f97342a2..12899ae0c68e 100644 --- a/packages/web/src/content/docs/th/zen.mdx +++ b/packages/web/src/content/docs/th/zen.mdx @@ -162,8 +162,8 @@ https://opencode.ai/zen/v1/models | Gemini 3.1 Pro (≤ 200K tokens) | $2.00 | $12.00 | $0.20 | - | | Gemini 3.1 Pro (> 200K tokens) | $4.00 | $18.00 | $0.40 | - | | Gemini 3 Flash | $0.50 | $3.00 | $0.05 | - | -| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.50 | - | -| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $1.00 | - | +| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.30 | - | +| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $0.60 | - | | Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - | | GPT 5.6 Sol (≤ 272K tokens) | $5.00 | $30.00 | $0.50 | $6.25 | | GPT 5.6 Sol (> 272K tokens) | $10.00 | $45.00 | $1.00 | $12.50 | @@ -191,7 +191,7 @@ https://opencode.ai/zen/v1/models | GPT 5 Codex | $1.07 | $8.50 | $0.107 | - | | GPT 5 Nano | $0.05 | $0.40 | $0.005 | - | -คุณอาจสังเกตเห็น _Claude Haiku 3.5_ ในประวัติการใช้งานของคุณ นี่คือ [low cost model](/docs/config/#models) ที่ใช้สร้างชื่อ session ของคุณ +คุณอาจสังเกตเห็น[โมเดลต้นทุนต่ำ](/docs/config/#models) เช่น Haiku, Nano หรือ Flash ในประวัติการใช้งานของคุณ OpenCode ใช้โมเดลเหล่านี้เพื่อสร้างชื่อเซสชัน :::note ค่าธรรมเนียมบัตรเครดิตจะถูกส่งต่อในราคาทุน (4.4% + $0.30 ต่อธุรกรรม); เราไม่ได้คิดค่าใช้จ่ายเพิ่มจากนั้น diff --git a/packages/web/src/content/docs/tr/go.mdx b/packages/web/src/content/docs/tr/go.mdx index 2743291c98df..e24ead2959f7 100644 --- a/packages/web/src/content/docs/tr/go.mdx +++ b/packages/web/src/content/docs/tr/go.mdx @@ -83,10 +83,10 @@ Aşağıdaki tablo, tipik Go kullanım modellerine dayalı tahmini bir istek say | Model | 5 saatte bir istek | haftalık istek | aylık istek | | ----------------- | ------------------ | -------------- | ----------- | -| Grok 4.5 | 80 | 190 | 380 | +| Grok 4.5 | 120 | 300 | 600 | | GLM-5.2 | 880 | 2,150 | 4,300 | | GLM-5.1 | 880 | 2,150 | 4,300 | -| Kimi K3 | 140 | 340 | 680 | +| Kimi K3 | 110 | 250 | 490 | | Kimi K2.7 Code | 1,350 | 4,630 | 9,250 | | Kimi K2.6 | 1,150 | 2,880 | 5,750 | | MiMo-V2.5 | 30,100 | 75,200 | 150,400 | @@ -99,11 +99,12 @@ Aşağıdaki tablo, tipik Go kullanım modellerine dayalı tahmini bir istek say | DeepSeek V4 Pro | 3,450 | 8,550 | 17,150 | | DeepSeek V4 Flash | 31,650 | 79,050 | 158,150 | -Tahminler, gözlemlenen ortalama istek modellerine dayanır: +Tahminler, gözlemlenen istek modellerine dayanır: - Grok 4.5 — İstek başına 1.100 girdi, 71.500 önbelleğe alınmış, 220 çıktı token'ı - GLM-5.2/5.1 — İstek başına 700 girdi, 52.000 önbelleğe alınmış, 150 çıktı token'ı -- Kimi K3/K2.7/K2.6 — İstek başına 870 girdi, 55.000 önbelleğe alınmış, 200 çıktı token'ı +- Kimi K3 — İstek başına 1.050 girdi, 76.500 önbelleğe alınmış, 300 çıktı token'ı +- Kimi K2.7/K2.6 — İstek başına 870 girdi, 55.000 önbelleğe alınmış, 200 çıktı token'ı - DeepSeek V4 Pro — İstek başına 750 girdi, 82.000 önbelleğe alınmış, 290 çıktı token'ı - DeepSeek V4 Flash — İstek başına 790 girdi, 68.000 önbelleğe alınmış, 280 çıktı token'ı - MiniMax M3 — İstek başına 510 girdi, 56.000 önbelleğe alınmış, 190 çıktı token'ı @@ -118,7 +119,7 @@ Tahminler ayrıca 1M token başına aşağıdaki fiyatlara ve her modelle birlik | Model | Input | Output | Cached Read | Cached Write | Kullanım | | ---------------------------- | ------ | ------ | ----------- | ------------ | -------- | -| Grok 4.5 | $2.00 | $6.00 | $0.50 | - | $15 | +| Grok 4.5 | $2.00 | $6.00 | $0.30 | - | $15 | | GLM-5.2 | $1.40 | $4.40 | $0.26 | - | $60 | | GLM-5.1 | $1.40 | $4.40 | $0.26 | - | $60 | | Kimi K3 | $3.00 | $15.00 | $0.30 | - | $15 | diff --git a/packages/web/src/content/docs/tr/zen.mdx b/packages/web/src/content/docs/tr/zen.mdx index 6eda6bb8bc97..994c6eb4b4da 100644 --- a/packages/web/src/content/docs/tr/zen.mdx +++ b/packages/web/src/content/docs/tr/zen.mdx @@ -160,8 +160,8 @@ Kullandıkça öde modelini destekliyoruz. Aşağıda **1M token başına** fiya | Gemini 3.1 Pro (≤ 200K tokens) | $2.00 | $12.00 | $0.20 | - | | Gemini 3.1 Pro (> 200K tokens) | $4.00 | $18.00 | $0.40 | - | | Gemini 3 Flash | $0.50 | $3.00 | $0.05 | - | -| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.50 | - | -| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $1.00 | - | +| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.30 | - | +| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $0.60 | - | | Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - | | GPT 5.6 Sol (≤ 272K tokens) | $5.00 | $30.00 | $0.50 | $6.25 | | GPT 5.6 Sol (> 272K tokens) | $10.00 | $45.00 | $1.00 | $12.50 | @@ -189,7 +189,7 @@ Kullandıkça öde modelini destekliyoruz. Aşağıda **1M token başına** fiya | GPT 5 Codex | $1.07 | $8.50 | $0.107 | - | | GPT 5 Nano | $0.05 | $0.40 | $0.005 | - | -Kullanım geçmişinizde _Claude Haiku 3.5_ görebilirsiniz. Bu, oturum başlıklarınızı oluşturmak için kullanılan [düşük maliyetli bir modeldir](/docs/config/#models). +Kullanım geçmişinizde Haiku, Nano veya Flash gibi [düşük maliyetli modeller](/docs/config/#models) görebilirsiniz. OpenCode, oturum başlıklarını oluşturmak için bu modelleri kullanır. :::note Kredi kartı ücretleri maliyet üzerinden yansıtılır (%4.4 + işlem başına $0.30); bunun dışında ekstra bir ücret almıyoruz. diff --git a/packages/web/src/content/docs/zen.mdx b/packages/web/src/content/docs/zen.mdx index aa431553d34f..854bf25f58b1 100644 --- a/packages/web/src/content/docs/zen.mdx +++ b/packages/web/src/content/docs/zen.mdx @@ -171,8 +171,8 @@ We support a pay-as-you-go model. Below are the prices **per 1M tokens**. | Gemini 3.1 Pro (≤ 200K tokens) | $2.00 | $12.00 | $0.20 | - | | Gemini 3.1 Pro (> 200K tokens) | $4.00 | $18.00 | $0.40 | - | | Gemini 3 Flash | $0.50 | $3.00 | $0.05 | - | -| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.50 | - | -| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $1.00 | - | +| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.30 | - | +| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $0.60 | - | | Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - | | GPT 5.6 Sol (≤ 272K tokens) | $5.00 | $30.00 | $0.50 | $6.25 | | GPT 5.6 Sol (> 272K tokens) | $10.00 | $45.00 | $1.00 | $12.50 | @@ -200,7 +200,7 @@ We support a pay-as-you-go model. Below are the prices **per 1M tokens**. | GPT 5 Codex | $1.07 | $8.50 | $0.107 | - | | GPT 5 Nano | $0.05 | $0.40 | $0.005 | - | -You might notice _Claude Haiku 3.5_ in your usage history. This is a [low cost model](/docs/config/#models) that's used to generate the titles of your sessions. +You may notice [low-cost models](/docs/config/#models), such as Haiku, Nano, or Flash, in your usage history. OpenCode uses these models to generate session titles. :::note Credit card fees are passed along at cost (4.4% + $0.30 per transaction); we don't charge anything beyond that. diff --git a/packages/web/src/content/docs/zh-cn/go.mdx b/packages/web/src/content/docs/zh-cn/go.mdx index 4bf34f5f12f2..604b9101593b 100644 --- a/packages/web/src/content/docs/zh-cn/go.mdx +++ b/packages/web/src/content/docs/zh-cn/go.mdx @@ -83,10 +83,10 @@ OpenCode Go 包含以下限制: | Model | 每 5 小时请求数 | 每周请求数 | 每月请求数 | | ----------------- | --------------- | ---------- | ---------- | -| Grok 4.5 | 80 | 190 | 380 | +| Grok 4.5 | 120 | 300 | 600 | | GLM-5.2 | 880 | 2,150 | 4,300 | | GLM-5.1 | 880 | 2,150 | 4,300 | -| Kimi K3 | 140 | 340 | 680 | +| Kimi K3 | 110 | 250 | 490 | | Kimi K2.7 Code | 1,350 | 4,630 | 9,250 | | Kimi K2.6 | 1,150 | 2,880 | 5,750 | | MiMo-V2.5 | 30,100 | 75,200 | 150,400 | @@ -99,11 +99,12 @@ OpenCode Go 包含以下限制: | DeepSeek V4 Pro | 3,450 | 8,550 | 17,150 | | DeepSeek V4 Flash | 31,650 | 79,050 | 158,150 | -预估值基于观察到的平均请求模式: +预估值基于观察到的请求模式: - Grok 4.5 — 每次请求 1,100 个输入 token,71,500 个缓存 token,220 个输出 token - GLM-5.2/5.1 — 每次请求 700 个输入 token,52,000 个缓存 token,150 个输出 token -- Kimi K3/K2.7/K2.6 — 每次请求 870 个输入 token,55,000 个缓存 token,200 个输出 token +- Kimi K3 — 每次请求 1,050 个输入 token,76,500 个缓存 token,300 个输出 token +- Kimi K2.7/K2.6 — 每次请求 870 个输入 token,55,000 个缓存 token,200 个输出 token - DeepSeek V4 Pro — 每次请求 750 个输入 token,82,000 个缓存 token,290 个输出 token - DeepSeek V4 Flash — 每次请求 790 个输入 token,68,000 个缓存 token,280 个输出 token - MiMo-V2.5 — 每次请求 830 个输入 token,71,500 个缓存 token,295 个输出 token @@ -118,7 +119,7 @@ OpenCode Go 包含以下限制: | 模型 | 输入 | 输出 | 缓存读取 | 缓存写入 | 使用额度 | | ---------------------------- | ------ | ------ | --------- | -------- | -------- | -| Grok 4.5 | $2.00 | $6.00 | $0.50 | - | $15 | +| Grok 4.5 | $2.00 | $6.00 | $0.30 | - | $15 | | GLM-5.2 | $1.40 | $4.40 | $0.26 | - | $60 | | GLM-5.1 | $1.40 | $4.40 | $0.26 | - | $60 | | Kimi K3 | $3.00 | $15.00 | $0.30 | - | $15 | diff --git a/packages/web/src/content/docs/zh-cn/zen.mdx b/packages/web/src/content/docs/zh-cn/zen.mdx index 282fc810deb2..5bb1993df0e0 100644 --- a/packages/web/src/content/docs/zh-cn/zen.mdx +++ b/packages/web/src/content/docs/zh-cn/zen.mdx @@ -160,8 +160,8 @@ https://opencode.ai/zen/v1/models | Gemini 3.1 Pro (≤ 200K tokens) | $2.00 | $12.00 | $0.20 | - | | Gemini 3.1 Pro (> 200K tokens) | $4.00 | $18.00 | $0.40 | - | | Gemini 3 Flash | $0.50 | $3.00 | $0.05 | - | -| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.50 | - | -| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $1.00 | - | +| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.30 | - | +| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $0.60 | - | | Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - | | GPT 5.6 Sol (≤ 272K tokens) | $5.00 | $30.00 | $0.50 | $6.25 | | GPT 5.6 Sol (> 272K tokens) | $10.00 | $45.00 | $1.00 | $12.50 | @@ -189,7 +189,7 @@ https://opencode.ai/zen/v1/models | GPT 5 Codex | $1.07 | $8.50 | $0.107 | - | | GPT 5 Nano | $0.05 | $0.40 | $0.005 | - | -你可能会在使用记录中看到 _Claude Haiku 3.5_。这是一个[低成本模型](/docs/config/#models),用于生成会话标题。 +你可能会在使用记录中看到 Haiku、Nano 或 Flash 等[低成本模型](/docs/config/#models)。OpenCode 使用这些模型生成会话标题。 :::note 信用卡手续费按成本转嫁(每笔交易 4.4% + $0.30);除此之外我们不会额外收费。 diff --git a/packages/web/src/content/docs/zh-tw/go.mdx b/packages/web/src/content/docs/zh-tw/go.mdx index 8382c44f9348..6434504a3e05 100644 --- a/packages/web/src/content/docs/zh-tw/go.mdx +++ b/packages/web/src/content/docs/zh-tw/go.mdx @@ -83,10 +83,10 @@ OpenCode Go 包含以下限制: | Model | 每 5 小時請求數 | 每週請求數 | 每月請求數 | | ----------------- | --------------- | ---------- | ---------- | -| Grok 4.5 | 80 | 190 | 380 | +| Grok 4.5 | 120 | 300 | 600 | | GLM-5.2 | 880 | 2,150 | 4,300 | | GLM-5.1 | 880 | 2,150 | 4,300 | -| Kimi K3 | 140 | 340 | 680 | +| Kimi K3 | 110 | 250 | 490 | | Kimi K2.7 Code | 1,350 | 4,630 | 9,250 | | Kimi K2.6 | 1,150 | 2,880 | 5,750 | | MiMo-V2.5 | 30,100 | 75,200 | 150,400 | @@ -99,11 +99,12 @@ OpenCode Go 包含以下限制: | DeepSeek V4 Pro | 3,450 | 8,550 | 17,150 | | DeepSeek V4 Flash | 31,650 | 79,050 | 158,150 | -這些預估值是基於觀察到的平均請求模式: +這些預估值是基於觀察到的請求模式: - Grok 4.5 — 每次請求 1,100 個輸入 token、71,500 個快取 token、220 個輸出 token - GLM-5.2/5.1 — 每次請求 700 個輸入 token、52,000 個快取 token、150 個輸出 token -- Kimi K3/K2.7/K2.6 — 每次請求 870 個輸入 token、55,000 個快取 token、200 個輸出 token +- Kimi K3 — 每次請求 1,050 個輸入 token、76,500 個快取 token、300 個輸出 token +- Kimi K2.7/K2.6 — 每次請求 870 個輸入 token、55,000 個快取 token、200 個輸出 token - DeepSeek V4 Pro — 每次請求 750 個輸入 token、82,000 個快取 token、290 個輸出 token - DeepSeek V4 Flash — 每次請求 790 個輸入 token、68,000 個快取 token、280 個輸出 token - MiniMax M3 — 每次請求 510 個輸入 token、56,000 個快取 token、190 個輸出 token @@ -118,7 +119,7 @@ OpenCode Go 包含以下限制: | 模型 | 輸入 | 輸出 | 快取讀取 | 快取寫入 | 使用量 | | ---------------------------- | ------ | ------ | --------- | -------- | ------ | -| Grok 4.5 | $2.00 | $6.00 | $0.50 | - | $15 | +| Grok 4.5 | $2.00 | $6.00 | $0.30 | - | $15 | | GLM-5.2 | $1.40 | $4.40 | $0.26 | - | $60 | | GLM-5.1 | $1.40 | $4.40 | $0.26 | - | $60 | | Kimi K3 | $3.00 | $15.00 | $0.30 | - | $15 | diff --git a/packages/web/src/content/docs/zh-tw/zen.mdx b/packages/web/src/content/docs/zh-tw/zen.mdx index 36a0f94e0745..61e3a0b99597 100644 --- a/packages/web/src/content/docs/zh-tw/zen.mdx +++ b/packages/web/src/content/docs/zh-tw/zen.mdx @@ -165,8 +165,8 @@ https://opencode.ai/zen/v1/models | Gemini 3.1 Pro (≤ 200K tokens) | $2.00 | $12.00 | $0.20 | - | | Gemini 3.1 Pro (> 200K tokens) | $4.00 | $18.00 | $0.40 | - | | Gemini 3 Flash | $0.50 | $3.00 | $0.05 | - | -| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.50 | - | -| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $1.00 | - | +| Grok 4.5 (≤ 200K tokens) | $2.00 | $6.00 | $0.30 | - | +| Grok 4.5 (> 200K tokens) | $4.00 | $12.00 | $0.60 | - | | Grok Build 0.1 | $1.00 | $2.00 | $0.20 | - | | GPT 5.6 Sol (≤ 272K tokens) | $5.00 | $30.00 | $0.50 | $6.25 | | GPT 5.6 Sol (> 272K tokens) | $10.00 | $45.00 | $1.00 | $12.50 | @@ -194,8 +194,7 @@ https://opencode.ai/zen/v1/models | GPT 5 Codex | $1.07 | $8.50 | $0.107 | - | | GPT 5 Nano | $0.05 | $0.40 | $0.005 | - | -你可能會在使用紀錄中看到 _Claude Haiku 3.5_。這是一個[低成本模型](/docs/config/#models), -會用來產生工作階段的標題。 +你可能會在使用紀錄中看到 Haiku、Nano 或 Flash 等[低成本模型](/docs/config/#models)。OpenCode 使用這些模型產生工作階段標題。 :::note 信用卡手續費會以成本轉嫁(每筆交易 4.4% + $0.30);除此之外,我們不會額外收費。 diff --git a/sdks/vscode/package.json b/sdks/vscode/package.json index 117c227a657f..a5c257f7129b 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.18.3", + "version": "1.18.4", "publisher": "sst-dev", "repository": { "type": "git",