Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/ZHIZI_CLOUD_ENGINE.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ GoAgent 不会把智子 token 写入普通设置文件,也不会在日志中
- `验证码不正确或已过期`:重新发送验证码后再登录。
- `当前没有空闲算力`:GoAgent 会按有限次数自动重试。这通常是 worker 暂时繁忙,不等于账号余额不足。
- VIP 共享返回 `not_enough_credit`:GoAgent 会明确提示“VIP 权益/连接账号未同步”,不会把它误报成独享余额不足。先退出并重新登录;持续失败时请让智子官方检查 VIP 与连接账号的 worker 权益。
- 独享 1x / 3x / 6x 返回 `not_enough_credit`:这是按量档位的余额或档位问题,请在智子官方 App 检查。
- 独享 1x / 3x / 6x 返回 `not_enough_credit`:这是按量档位的余额或档位问题,请在智子官方 App 检查。设置页可直接打开 [智子官方 App 下载页](https://zhizigo.com/download)。
- 官方 Postman 中的 `connectAccount/login` 只用于验证连接账号凭据,不返回 GoAgent 直连所需的 token,也不会替代主账号登录流程。
- `智子云 KataGo 启动超时`:检查 token 是否有效,或在 GoAgent 中重新登录。
- `智子云 GTP 命令失败`:可能是远端引擎尚未 ready、账号状态异常,或智子云当前连接不可用。
Expand Down
6 changes: 5 additions & 1 deletion src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {
} from './services/studentProfile'
import { archiveTeacherSession, createTeacherSession, deleteTeacherSession, getActiveTeacherSession, listTeacherSessions, updateTeacherSessionMessages } from './services/teacherSession'
import { clearTtsCache, inspectTtsAssets, listTtsVoices, synthesizeTts, testTtsSettings } from './services/tts'
import { loginZhiziCloudByCode, loginZhiziCloudByPassword, sendZhiziCloudLoginCode } from './services/zhiziCloudAuth'
import { loginZhiziCloudByCode, loginZhiziCloudByPassword, sendZhiziCloudLoginCode, ZHIZI_OFFICIAL_APP_DOWNLOAD_URL } from './services/zhiziCloudAuth'
import { probeZhiziCloudConnection } from './services/zhiziConnectionProbe'
import { resetZhiziPersistentSession } from './services/zhiziSocketSession'

Expand Down Expand Up @@ -616,6 +616,10 @@ app.whenReady().then(() => {
dashboard: await dashboard()
}
})
ipcMain.handle('zhizi:open-official-app', async () => {
await shell.openExternal(ZHIZI_OFFICIAL_APP_DOWNLOAD_URL)
return { ok: true, url: ZHIZI_OFFICIAL_APP_DOWNLOAD_URL }
})
ipcMain.handle('tts:inspect-assets', async () => inspectTtsAssets())
ipcMain.handle('tts:list-voices', async () => listTtsVoices())
ipcMain.handle('tts:synthesize', async (_event, payload) => synthesizeTts(payload))
Expand Down
2 changes: 2 additions & 0 deletions src/main/services/zhiziCloudAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ const ZHIZI_FAST_LOGIN_URL = 'https://www.zhizigo.com/api/cluster/account/fast-l
const ZHIZI_ME_URL = 'https://www.zhizigo.com/api/cluster/account/me'
const ZHIZI_CONNECT_ACCOUNT_FETCH_URL = 'https://www.zhizigo.com/api/cluster/account/connectAccount/fetch'

export const ZHIZI_OFFICIAL_APP_DOWNLOAD_URL = 'https://zhizigo.com/download'

export interface ZhiziCloudAccountStatus {
tokenValid: boolean
isMembership: boolean
Expand Down
1 change: 1 addition & 0 deletions src/preload/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ const api = {
logoutZhiziCloud: (): Promise<ZhiziCloudLoginResult> => ipcRenderer.invoke('zhizi:logout'),
testZhiziCloudConnection: (): Promise<ZhiziCloudConnectionTestResult> => ipcRenderer.invoke('zhizi:test-connection'),
enableZhiziCloud: (): Promise<ZhiziCloudConnectionTestResult> => ipcRenderer.invoke('zhizi:enable'),
openZhiziOfficialApp: (): Promise<{ ok: boolean; url: string }> => ipcRenderer.invoke('zhizi:open-official-app'),
inspectTtsAssets: (): Promise<TtsAssetStatus> => ipcRenderer.invoke('tts:inspect-assets'),
listTtsVoices: (): Promise<TtsVoice[]> => ipcRenderer.invoke('tts:list-voices'),
synthesizeTts: (payload: TtsSynthesisRequest): Promise<TtsSynthesisResult> => ipcRenderer.invoke('tts:synthesize', payload),
Expand Down
8 changes: 8 additions & 0 deletions src/renderer/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5388,6 +5388,14 @@ function SettingsDrawer({
>
{zhiziTestBusy ? '检测中...' : '只检测连接'}
</button>
<button
className="ghost-button"
type="button"
title={t('zhiziOfficialAppHint')}
onClick={() => void window.goagent.openZhiziOfficialApp()}
>
{t('zhiziOfficialApp')}
</button>
<small>
{zhiziEnabled
? '当前使用智子云分析。切回本机后会立即释放远程连接。'
Expand Down
1 change: 1 addition & 0 deletions src/renderer/src/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ declare global {
logoutZhiziCloud: () => Promise<ZhiziCloudLoginResult>
testZhiziCloudConnection: () => Promise<ZhiziCloudConnectionTestResult>
enableZhiziCloud: () => Promise<ZhiziCloudConnectionTestResult>
openZhiziOfficialApp: () => Promise<{ ok: boolean; url: string }>
inspectTtsAssets: () => Promise<TtsAssetStatus>
listTtsVoices: () => Promise<TtsVoice[]>
synthesizeTts: (payload: TtsSynthesisRequest) => Promise<TtsSynthesisResult>
Expand Down
Loading
Loading