From 324549475bbc18022573e91d93d82de099cce7a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E4=B8=AD=E6=B4=8B?= Date: Fri, 5 Jun 2026 18:44:47 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B8=85=E9=99=A4=E7=BB=88=E7=AB=AF?= =?UTF-8?q?=E6=A0=87=E9=A2=98/provider=E6=98=BE=E7=A4=BA=E5=90=8D/TUI=20?= =?UTF-8?q?=E4=B8=AD=E6=AE=8B=E7=95=99=E7=9A=84=20opencode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - app.tsx: 终端标题 setTerminalTitle 改 zmo(之前改错了 attention 声音通知) - provider.ts: opencode provider 显示名映射为 "Zmo"(修复底栏 OpenCode Zen,源自远程 models.dev 数据) - 删除 dialog-provider 里 OpenCode Zen/Go 付费服务介绍段 - footer/attention声音包名/更新提示/dialog-status/error上报URL/docs链接 → zmo Co-Authored-By: Claude Opus 4.7 --- packages/opencode/src/cli/cmd/tui/app.tsx | 12 ++++++------ packages/opencode/src/cli/cmd/tui/attention.ts | 2 +- .../src/cli/cmd/tui/component/dialog-provider.tsx | 12 ++---------- .../cli/cmd/tui/component/dialog-retry-action.tsx | 2 +- .../src/cli/cmd/tui/component/dialog-status.tsx | 2 +- .../src/cli/cmd/tui/component/error-component.tsx | 2 +- .../cli/cmd/tui/feature-plugins/sidebar/footer.tsx | 2 +- packages/opencode/src/provider/provider.ts | 2 +- 8 files changed, 14 insertions(+), 22 deletions(-) diff --git a/packages/opencode/src/cli/cmd/tui/app.tsx b/packages/opencode/src/cli/cmd/tui/app.tsx index 0cb5a08b2..c25cdb6be 100644 --- a/packages/opencode/src/cli/cmd/tui/app.tsx +++ b/packages/opencode/src/cli/cmd/tui/app.tsx @@ -456,24 +456,24 @@ function App(props: { onSnapshot?: () => Promise }) { if (!terminalTitleEnabled() || Flag.OPENCODE_DISABLE_TERMINAL_TITLE) return if (route.data.type === "home") { - renderer.setTerminalTitle("OpenCode") + renderer.setTerminalTitle("zmo") return } if (route.data.type === "session") { const session = sync.session.get(route.data.sessionID) if (!session || SessionApi.isDefaultTitle(session.title)) { - renderer.setTerminalTitle("OpenCode") + renderer.setTerminalTitle("zmo") return } const title = session.title.length > 40 ? session.title.slice(0, 37) + "..." : session.title - renderer.setTerminalTitle(`OC | ${title}`) + renderer.setTerminalTitle(`zmo | ${title}`) return } if (route.data.type === "plugin") { - renderer.setTerminalTitle(`OC | ${route.data.id}`) + renderer.setTerminalTitle(`zmo | ${route.data.id}`) } }) @@ -809,7 +809,7 @@ function App(props: { onSnapshot?: () => Promise }) { name: "docs.open", title: "Open docs", run: () => { - open("https://opencode.ai/docs").catch(() => {}) + open("https://github.com/helpLogin/zmo-cli").catch(() => {}) dialog.clear() }, category: "System", @@ -1053,7 +1053,7 @@ function App(props: { onSnapshot?: () => Promise }) { await DialogAlert.show( dialog, "Update Complete", - `Successfully updated to OpenCode v${result.data.version}. Please restart the application.`, + `Successfully updated to zmo v${result.data.version}. Please restart the application.`, ) void exit() diff --git a/packages/opencode/src/cli/cmd/tui/attention.ts b/packages/opencode/src/cli/cmd/tui/attention.ts index f66b0e363..0c86e1325 100644 --- a/packages/opencode/src/cli/cmd/tui/attention.ts +++ b/packages/opencode/src/cli/cmd/tui/attention.ts @@ -47,7 +47,7 @@ const TITLE_LIMIT = 80 const MESSAGE_LIMIT = 240 const BUILTIN_PACK: RegisteredSoundPack = { id: DEFAULT_PACK_ID, - name: "OpenCode Default", + name: "zmo Default", builtin: true, sounds: { default: defaultSoundPath, diff --git a/packages/opencode/src/cli/cmd/tui/component/dialog-provider.tsx b/packages/opencode/src/cli/cmd/tui/component/dialog-provider.tsx index 7c1386ae7..60040e8d5 100644 --- a/packages/opencode/src/cli/cmd/tui/component/dialog-provider.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/dialog-provider.tsx @@ -365,22 +365,14 @@ function ApiMethod(props: ApiMethodProps) { opencode: ( - OpenCode Zen gives you access to all the best coding models at the cheapest prices with a single API - key. - - - Go to https://opencode.ai/zen to get a key + Enter your API key to connect this provider. ), "opencode-go": ( - OpenCode Go is a $10 per month subscription that provides reliable access to popular open coding models - with generous usage limits. - - - Go to https://opencode.ai/go and enable OpenCode Go + Enter your API key to connect this provider. ), diff --git a/packages/opencode/src/cli/cmd/tui/component/dialog-retry-action.tsx b/packages/opencode/src/cli/cmd/tui/component/dialog-retry-action.tsx index 6e4db2a21..dc0423840 100644 --- a/packages/opencode/src/cli/cmd/tui/component/dialog-retry-action.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/dialog-retry-action.tsx @@ -7,7 +7,7 @@ import { Link } from "@tui/ui/link" import { BgPulse } from "./bg-pulse" import { useBindings } from "../keymap" -const GO_URL = "https://opencode.ai/go" +const GO_URL = "https://github.com/helpLogin/zmo-cli" const PAD_X = 3 const PAD_TOP_OUTER = 1 const FOREGROUND_ALPHA = 186 diff --git a/packages/opencode/src/cli/cmd/tui/component/dialog-status.tsx b/packages/opencode/src/cli/cmd/tui/component/dialog-status.tsx index ebc65a45b..6d80b8a8f 100644 --- a/packages/opencode/src/cli/cmd/tui/component/dialog-status.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/dialog-status.tsx @@ -80,7 +80,7 @@ export function DialogStatus() { {(val) => val().error} Disabled in configuration - Needs authentication (run: opencode mcp auth {key}) + Needs authentication (run: zmo mcp auth {key}) {(val) => (val() as { error: string }).error} diff --git a/packages/opencode/src/cli/cmd/tui/component/error-component.tsx b/packages/opencode/src/cli/cmd/tui/component/error-component.tsx index e67dc249c..99595b508 100644 --- a/packages/opencode/src/cli/cmd/tui/component/error-component.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/error-component.tsx @@ -20,7 +20,7 @@ export function ErrorComponent(props: { }) const [copied, setCopied] = createSignal(false) - const issueURL = new URL("https://github.com/anomalyco/opencode/issues/new?template=bug-report.yml") + const issueURL = new URL("https://github.com/helpLogin/zmo-cli/issues/new") // Choose safe fallback colors per mode since theme context may not be available const isLight = props.mode === "light" diff --git a/packages/opencode/src/cli/cmd/tui/feature-plugins/sidebar/footer.tsx b/packages/opencode/src/cli/cmd/tui/feature-plugins/sidebar/footer.tsx index 66b6c3735..a67a66fe4 100644 --- a/packages/opencode/src/cli/cmd/tui/feature-plugins/sidebar/footer.tsx +++ b/packages/opencode/src/cli/cmd/tui/feature-plugins/sidebar/footer.tsx @@ -51,7 +51,7 @@ function View(props: { api: TuiPluginApi; sessionID: string }) { ✕ - OpenCode includes free models so you can start immediately. + zmo works with any model provider — connect your API key to start. Connect from 75+ providers to use other models, including Claude, GPT, Gemini etc diff --git a/packages/opencode/src/provider/provider.ts b/packages/opencode/src/provider/provider.ts index 8e71bb3c0..667955b74 100644 --- a/packages/opencode/src/provider/provider.ts +++ b/packages/opencode/src/provider/provider.ts @@ -1151,7 +1151,7 @@ export function fromModelsDevProvider(provider: ModelsDev.Provider): Info { return { id: ProviderV2.ID.make(provider.id), source: "custom", - name: provider.name, + name: provider.id === "opencode" ? "Zmo" : provider.name.replace(/OpenCode/gi, "Zmo"), env: [...(provider.env ?? [])], options: {}, models,