feat: 清除终端标题/provider显示名/TUI 中残留的 opencode
- 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 <noreply@anthropic.com>
This commit is contained in:
@@ -456,24 +456,24 @@ function App(props: { onSnapshot?: () => Promise<string[]> }) {
|
|||||||
if (!terminalTitleEnabled() || Flag.OPENCODE_DISABLE_TERMINAL_TITLE) return
|
if (!terminalTitleEnabled() || Flag.OPENCODE_DISABLE_TERMINAL_TITLE) return
|
||||||
|
|
||||||
if (route.data.type === "home") {
|
if (route.data.type === "home") {
|
||||||
renderer.setTerminalTitle("OpenCode")
|
renderer.setTerminalTitle("zmo")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (route.data.type === "session") {
|
if (route.data.type === "session") {
|
||||||
const session = sync.session.get(route.data.sessionID)
|
const session = sync.session.get(route.data.sessionID)
|
||||||
if (!session || SessionApi.isDefaultTitle(session.title)) {
|
if (!session || SessionApi.isDefaultTitle(session.title)) {
|
||||||
renderer.setTerminalTitle("OpenCode")
|
renderer.setTerminalTitle("zmo")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const title = session.title.length > 40 ? session.title.slice(0, 37) + "..." : session.title
|
const title = session.title.length > 40 ? session.title.slice(0, 37) + "..." : session.title
|
||||||
renderer.setTerminalTitle(`OC | ${title}`)
|
renderer.setTerminalTitle(`zmo | ${title}`)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (route.data.type === "plugin") {
|
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<string[]> }) {
|
|||||||
name: "docs.open",
|
name: "docs.open",
|
||||||
title: "Open docs",
|
title: "Open docs",
|
||||||
run: () => {
|
run: () => {
|
||||||
open("https://opencode.ai/docs").catch(() => {})
|
open("https://github.com/helpLogin/zmo-cli").catch(() => {})
|
||||||
dialog.clear()
|
dialog.clear()
|
||||||
},
|
},
|
||||||
category: "System",
|
category: "System",
|
||||||
@@ -1053,7 +1053,7 @@ function App(props: { onSnapshot?: () => Promise<string[]> }) {
|
|||||||
await DialogAlert.show(
|
await DialogAlert.show(
|
||||||
dialog,
|
dialog,
|
||||||
"Update Complete",
|
"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()
|
void exit()
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ const TITLE_LIMIT = 80
|
|||||||
const MESSAGE_LIMIT = 240
|
const MESSAGE_LIMIT = 240
|
||||||
const BUILTIN_PACK: RegisteredSoundPack = {
|
const BUILTIN_PACK: RegisteredSoundPack = {
|
||||||
id: DEFAULT_PACK_ID,
|
id: DEFAULT_PACK_ID,
|
||||||
name: "OpenCode Default",
|
name: "zmo Default",
|
||||||
builtin: true,
|
builtin: true,
|
||||||
sounds: {
|
sounds: {
|
||||||
default: defaultSoundPath,
|
default: defaultSoundPath,
|
||||||
|
|||||||
@@ -365,22 +365,14 @@ function ApiMethod(props: ApiMethodProps) {
|
|||||||
opencode: (
|
opencode: (
|
||||||
<box gap={1}>
|
<box gap={1}>
|
||||||
<text fg={theme.textMuted}>
|
<text fg={theme.textMuted}>
|
||||||
OpenCode Zen gives you access to all the best coding models at the cheapest prices with a single API
|
Enter your API key to connect this provider.
|
||||||
key.
|
|
||||||
</text>
|
|
||||||
<text fg={theme.text}>
|
|
||||||
Go to <span style={{ fg: theme.primary }}>https://opencode.ai/zen</span> to get a key
|
|
||||||
</text>
|
</text>
|
||||||
</box>
|
</box>
|
||||||
),
|
),
|
||||||
"opencode-go": (
|
"opencode-go": (
|
||||||
<box gap={1}>
|
<box gap={1}>
|
||||||
<text fg={theme.textMuted}>
|
<text fg={theme.textMuted}>
|
||||||
OpenCode Go is a $10 per month subscription that provides reliable access to popular open coding models
|
Enter your API key to connect this provider.
|
||||||
with generous usage limits.
|
|
||||||
</text>
|
|
||||||
<text fg={theme.text}>
|
|
||||||
Go to <span style={{ fg: theme.primary }}>https://opencode.ai/go</span> and enable OpenCode Go
|
|
||||||
</text>
|
</text>
|
||||||
</box>
|
</box>
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { Link } from "@tui/ui/link"
|
|||||||
import { BgPulse } from "./bg-pulse"
|
import { BgPulse } from "./bg-pulse"
|
||||||
import { useBindings } from "../keymap"
|
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_X = 3
|
||||||
const PAD_TOP_OUTER = 1
|
const PAD_TOP_OUTER = 1
|
||||||
const FOREGROUND_ALPHA = 186
|
const FOREGROUND_ALPHA = 186
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ export function DialogStatus() {
|
|||||||
<Match when={item.status === "failed" && item}>{(val) => val().error}</Match>
|
<Match when={item.status === "failed" && item}>{(val) => val().error}</Match>
|
||||||
<Match when={item.status === "disabled"}>Disabled in configuration</Match>
|
<Match when={item.status === "disabled"}>Disabled in configuration</Match>
|
||||||
<Match when={(item.status as string) === "needs_auth"}>
|
<Match when={(item.status as string) === "needs_auth"}>
|
||||||
Needs authentication (run: opencode mcp auth {key})
|
Needs authentication (run: zmo mcp auth {key})
|
||||||
</Match>
|
</Match>
|
||||||
<Match when={(item.status as string) === "needs_client_registration" && item}>
|
<Match when={(item.status as string) === "needs_client_registration" && item}>
|
||||||
{(val) => (val() as { error: string }).error}
|
{(val) => (val() as { error: string }).error}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export function ErrorComponent(props: {
|
|||||||
})
|
})
|
||||||
const [copied, setCopied] = createSignal(false)
|
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
|
// Choose safe fallback colors per mode since theme context may not be available
|
||||||
const isLight = props.mode === "light"
|
const isLight = props.mode === "light"
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ function View(props: { api: TuiPluginApi; sessionID: string }) {
|
|||||||
✕
|
✕
|
||||||
</text>
|
</text>
|
||||||
</box>
|
</box>
|
||||||
<text fg={theme().textMuted}>OpenCode includes free models so you can start immediately.</text>
|
<text fg={theme().textMuted}>zmo works with any model provider — connect your API key to start.</text>
|
||||||
<text fg={theme().textMuted}>
|
<text fg={theme().textMuted}>
|
||||||
Connect from 75+ providers to use other models, including Claude, GPT, Gemini etc
|
Connect from 75+ providers to use other models, including Claude, GPT, Gemini etc
|
||||||
</text>
|
</text>
|
||||||
|
|||||||
@@ -1151,7 +1151,7 @@ export function fromModelsDevProvider(provider: ModelsDev.Provider): Info {
|
|||||||
return {
|
return {
|
||||||
id: ProviderV2.ID.make(provider.id),
|
id: ProviderV2.ID.make(provider.id),
|
||||||
source: "custom",
|
source: "custom",
|
||||||
name: provider.name,
|
name: provider.id === "opencode" ? "Zmo" : provider.name.replace(/OpenCode/gi, "Zmo"),
|
||||||
env: [...(provider.env ?? [])],
|
env: [...(provider.env ?? [])],
|
||||||
options: {},
|
options: {},
|
||||||
models,
|
models,
|
||||||
|
|||||||
Reference in New Issue
Block a user