mirror of
https://github.com/qingchencloud/clawpanel.git
synced 2026-06-02 06:09:52 +08:00
refactor(hermes): UX 小白化 - chat.js profile 切换错误用 humanizeError
之前是 toast(err?.message || String(err)),raw error 用户看到一堆英文 traceback。
现在用 humanizeError 自动:
- 分类(NETWORK/TIMEOUT/AUTH/NOT_FOUND/PERMISSION/...)
- 友好文案(中英繁三语)
- 自动加 action button(如「打开设置」「重试」「查看文档」)
## 文件
- chat.js: import humanizeError,profile 切换 catch 改 humanizeError(err, t('engine.chatProfileSwitchFailed'))
- i18n: 新增 chatProfileSwitchFailed × 3 语言
## 范围
仅 profile 切换这个高频操作 — 其他 chat-store 路径错误已通过系统消息气泡展示
(chat-store.js 添加错误消息时本身已经友好),不需要再改。
This commit is contained in:
@@ -557,6 +557,8 @@ export default {
|
||||
hermesOAuthDeviceTimeout: _('登录超时(10 分钟未完成)', 'Login timed out (10 min)', '登入逾時(10 分鐘未完成)'),
|
||||
hermesOAuthDeviceFailed: _('授权失败', 'Authorization failed', '授權失敗'),
|
||||
hermesOAuthDisconnectFailed: _('断开失败', 'Disconnect failed', '中斷失敗'),
|
||||
// Hermes UX 小白化:chat profile 切换错误
|
||||
chatProfileSwitchFailed: _('切换 Profile 失败', 'Switch profile failed', '切換 Profile 失敗'),
|
||||
// Web 模式(远程浏览器)下流式聊天暂不可用
|
||||
chatWebModeStreamingUnsupported: _(
|
||||
'Web 模式暂不支持 Hermes 实时流式聊天(依赖桌面端事件桥)。请打开桌面客户端使用此功能。',
|
||||
|
||||
Reference in New Issue
Block a user