zcode-pro 1.6.1 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +31 -21
- package/README.md +20 -12
- package/dist/inject.js +10431 -8836
- package/package.json +2 -1
- package/src/host/cdp.mjs +13 -3
- package/src/host/helper.mjs +1287 -488
- package/src/host/main.mjs +368 -30
- package/src/host/paths.mjs +17 -9
- package/src/host/pickFolder.mjs +11 -4
- package/src/host/settings.mjs +15 -2
- package/src/host/setup.mjs +54 -15
- package/src/host/skill-stats.mjs +6 -1
- package/src/host/taskIndex.mjs +464 -66
- package/src/host/taskOrder.mjs +128 -57
- package/src/host/version.mjs +15 -7
- package/src/host/wallpaper.mjs +76 -59
- package/src/host/webdav.mjs +66 -10
- package/src/inject/core.js +228 -103
- package/src/inject/features/alias-migration.js +5 -1
- package/src/inject/features/auto-rename.js +166 -0
- package/src/inject/features/file-menu.js +6 -2
- package/src/inject/features/idle-reclaim.js +31 -8
- package/src/inject/features/newtab-panels.js +11 -1
- package/src/inject/features/pinned-collapse.js +11 -3
- package/src/inject/features/plugin-card-retry.js +18 -8
- package/src/inject/features/plugin-updates.js +58 -0
- package/src/inject/features/sandbox-reclaim.js +17 -1
- package/src/inject/features/session-link.js +202 -0
- package/src/inject/features/session-switch.js +67 -30
- package/src/inject/features/settings-dialog.js +323 -124
- package/src/inject/features/status-bar.js +150 -28
- package/src/inject/features/subagent-icon.js +473 -0
- package/src/inject/features/table-copy.js +18 -2
- package/src/inject/features/task-order.js +47 -13
- package/src/inject/features/theme.js +88 -31
- package/src/inject/features/title-gen.js +5 -4
- package/src/inject/features/title-lock.js +13 -8
- package/src/inject/features/turn-usage.js +99 -47
- package/src/inject/features/ws-running.js +28 -13
- package/src/inject/index.js +7 -0
- package/src/inject/provider-fields.js +2 -2
- package/src/inject/ui.js +14 -0
package/src/inject/core.js
CHANGED
|
@@ -27,28 +27,33 @@ export function rpc(path, options = {}) {
|
|
|
27
27
|
|
|
28
28
|
// 配置缓存:菜单每次打开时拉取,保证设置弹窗里的开关即时生效。
|
|
29
29
|
// 并发合并:config-changed 事件的多个监听方会同时 getConfig(true)(绕过
|
|
30
|
-
// 缓存),不合并时一次保存触发 N 个并发全量拉取(每个都是 helper
|
|
30
|
+
// 缓存),不合并时一次保存触发 N 个并发全量拉取(每个都是 helper 读盘+序列化)。
|
|
31
|
+
// force 不并入在途请求:保存后的刷新必须拿到保存后的内容,并入保存前发起的
|
|
32
|
+
// 请求会拿到旧值、还会把旧值写回缓存
|
|
31
33
|
let configCache = { value: null, at: 0 };
|
|
32
34
|
let configInflight = null;
|
|
35
|
+
let configGen = 0; // clearConfigCache 时 +1,作废在途请求写缓存的资格
|
|
33
36
|
export async function getConfig(force = false) {
|
|
34
37
|
const now = Date.now();
|
|
35
38
|
if (!force && configCache.value && now - configCache.at < 3000) return configCache.value;
|
|
36
|
-
if (configInflight) return configInflight;
|
|
37
|
-
|
|
39
|
+
if (!force && configInflight) return configInflight;
|
|
40
|
+
const gen = configGen;
|
|
41
|
+
const p = (async () => {
|
|
38
42
|
try {
|
|
39
43
|
const res = await rpc('/config');
|
|
40
44
|
if (res.ok && res.config) {
|
|
41
|
-
configCache = { value: res.config, at: Date.now() };
|
|
45
|
+
if (gen === configGen) configCache = { value: res.config, at: Date.now() };
|
|
42
46
|
return res.config;
|
|
43
47
|
}
|
|
44
48
|
return configCache.value || { features: {} };
|
|
45
49
|
} finally {
|
|
46
|
-
configInflight = null;
|
|
50
|
+
if (configInflight === p) configInflight = null;
|
|
47
51
|
}
|
|
48
52
|
})();
|
|
49
|
-
|
|
53
|
+
configInflight = p;
|
|
54
|
+
return p;
|
|
50
55
|
}
|
|
51
|
-
export function clearConfigCache() { configCache = { value: null, at: 0 }; }
|
|
56
|
+
export function clearConfigCache() { configCache = { value: null, at: 0 }; configGen++; }
|
|
52
57
|
|
|
53
58
|
// 会话快捷切换的默认键位(按住 alt 再按);settings 的“快捷键”标签页可改,
|
|
54
59
|
// 配置存在 config.shortcuts,未写的项回退到这里
|
|
@@ -62,21 +67,25 @@ export const DEFAULT_SHORTCUTS = {
|
|
|
62
67
|
|
|
63
68
|
// 状态栏任务统计项的两个组:会话级跟随当前会话,全局级始终显示;
|
|
64
69
|
// 设置里两节各自排序,保存时归一化为会话组在前(状态栏两组间一道竖线)
|
|
65
|
-
export const STATUS_SESSION_IDS = new Set(['ctx', '
|
|
66
|
-
export const STATUS_GLOBAL_IDS = new Set(['todayTokens', '
|
|
70
|
+
export const STATUS_SESSION_IDS = new Set(['ctx', 'questions', 'tokRate', 'inOut', 'avgHit']);
|
|
71
|
+
export const STATUS_GLOBAL_IDS = new Set(['todayTokens', 'totalTokens', 'tasks']);
|
|
67
72
|
|
|
68
73
|
// 状态栏统计项的默认清单(顺序即默认显示顺序);设置 → 外观 → 状态栏里
|
|
69
74
|
// 可调顺序与显隐,配置存在 config.statusBar.items(整表覆盖)
|
|
70
|
-
// 每轮回答统计项(turn-usage.js
|
|
75
|
+
// 每轮回答统计项(turn-usage.js):回答末尾标注的四段,各自可显隐(顺序固定)
|
|
71
76
|
export const DEFAULT_TURN_ITEMS = [
|
|
72
77
|
{ id: 'turnIn', on: true }, // 输入
|
|
73
78
|
{ id: 'turnOut', on: true }, // 输出
|
|
79
|
+
{ id: 'turnTps', on: true }, // TPS(输出 ÷ 净生成秒数,官方口径)
|
|
74
80
|
{ id: 'turnCache', on: true }, // 缓存命中率
|
|
75
81
|
];
|
|
76
82
|
|
|
77
83
|
export const DEFAULT_STATUS_ITEMS = [
|
|
84
|
+
{ id: 'tokRate', on: true }, // 最近输出 tokens/s(60 秒窗口,本会话)
|
|
85
|
+
{ id: 'avgHit', on: true }, // 平均缓存命中率(本会话)
|
|
86
|
+
{ id: 'inOut', on: true }, // 累计输入/输出(本会话主轮请求)
|
|
78
87
|
{ id: 'ctx', on: true }, // 上下文占用
|
|
79
|
-
{ id: 'questions', on: true }, //
|
|
88
|
+
{ id: 'questions', on: true }, // 主请求数(官方 model_usage 口径)
|
|
80
89
|
{ id: 'todayTokens', on: true }, // 今日 token(今天的会话记录完整,数据准确)
|
|
81
90
|
{ id: 'totalTokens', on: true }, // 累计 token(官方使用统计,全历史)
|
|
82
91
|
{ id: 'tasks', on: true }, // 任务总数
|
|
@@ -84,16 +93,20 @@ export const DEFAULT_STATUS_ITEMS = [
|
|
|
84
93
|
|
|
85
94
|
// —— ZCode 版本判断(按官方版本启用/停用功能)——
|
|
86
95
|
// 版本来源:启动器从 app.asar 读出后写进 bootstrap(window.__ZCODEPRO__.zcodeVersion),
|
|
87
|
-
// helper 的 /config
|
|
96
|
+
// 只经注入 bootstrap 传进页面(helper 的 /config 响应不带这个字段)。读不到时为空串,
|
|
97
|
+
// 各判断保持旧行为。
|
|
88
98
|
export function zcodeAppVersion() {
|
|
89
99
|
const v = liveBoot().zcodeVersion;
|
|
90
100
|
return typeof v === 'string' && v ? v : '';
|
|
91
101
|
}
|
|
92
102
|
|
|
93
103
|
export function zcodeVersionGte(version, major, minor, patch = 0) {
|
|
94
|
-
|
|
104
|
+
// 允许两段式版本("3.17")与前缀 v,缺省段按 0;预发布号(-rc.1 等)截在正式
|
|
105
|
+
// 版段后不参与比较、按正式版处理——取舍:预发布版也按新版启用功能,比误判回
|
|
106
|
+
// 老版本少丢功能
|
|
107
|
+
const m = String(version || '').match(/^v?(\d+)(?:\.(\d+))?(?:\.(\d+))?/);
|
|
95
108
|
if (!m) return false;
|
|
96
|
-
const a = Number(m[1]), b = Number(m[2]), c = Number(m[3]);
|
|
109
|
+
const a = Number(m[1]), b = Number(m[2] || 0), c = Number(m[3] || 0);
|
|
97
110
|
return a > major || (a === major && (b > minor || (b === minor && c >= patch)));
|
|
98
111
|
}
|
|
99
112
|
|
|
@@ -128,7 +141,7 @@ const zh = {
|
|
|
128
141
|
zcodeStatsCounts: '技能 {total} 个(本地 {user} · 插件 {plugin})',
|
|
129
142
|
zcodeStatsChars: '完整清单约 {n} 字符',
|
|
130
143
|
zcodeBudgetDefaultTag: '(默认值)',
|
|
131
|
-
zcodeStatsDegraded: '
|
|
144
|
+
zcodeStatsDegraded: '超出预算:完整清单放不下,降级为只剩技能名和路径,模型看不到技能描述',
|
|
132
145
|
zcodeStatsOk: '预算充足:清单带完整描述注入新会话',
|
|
133
146
|
zcodeStatsSuggest: '建议预算 {n} 字符(留 20% 余量)',
|
|
134
147
|
zcodeBudgetApply: '用建议值',
|
|
@@ -139,7 +152,7 @@ const zh = {
|
|
|
139
152
|
zcodeSkillIncludeInstructions: '技能说明注入',
|
|
140
153
|
zcodeSkillIncludeInstructionsDesc: 'skills.includeInstructions:技能说明是否随清单一起注入',
|
|
141
154
|
zcodeSkillBudget: '技能清单预算(字符)',
|
|
142
|
-
zcodeSkillBudgetDesc: 'skills.metadataBudget
|
|
155
|
+
zcodeSkillBudgetDesc: 'skills.metadataBudget:完整清单超过该长度就降级为只剩技能名和路径,默认 20000',
|
|
143
156
|
zcodeSkillRoots: '额外技能目录',
|
|
144
157
|
zcodeSkillRootsDesc: 'skills.roots:每行一个目录,目录下的技能会被发现(~/.zcode/skills、~/.agents/skills 之外的补充)',
|
|
145
158
|
zcodeSave: '保存',
|
|
@@ -164,7 +177,7 @@ const zh = {
|
|
|
164
177
|
proxyPlaceholder: 'http://127.0.0.1:7890',
|
|
165
178
|
proxySave: '保存',
|
|
166
179
|
proxySaved: '代理设置已保存',
|
|
167
|
-
proxyHint: '
|
|
180
|
+
proxyHint: '留空保存即清除手填代理:Windows 跟随系统代理,其他平台直连。',
|
|
168
181
|
proxyTest: '检测',
|
|
169
182
|
proxyTesting: '检测中…',
|
|
170
183
|
proxyTestEmpty: '请先输入代理地址',
|
|
@@ -236,6 +249,8 @@ const zh = {
|
|
|
236
249
|
devReload: '重载 ZCode Pro',
|
|
237
250
|
devReloading: '重载中…',
|
|
238
251
|
devReloadDesc: '点击后约 2-3 秒内所有 ZCode 窗口自动刷新一次并加载新脚本。',
|
|
252
|
+
devToolsSwitch: '开发者工具',
|
|
253
|
+
devToolsSwitchDesc: '官方侧栏的“开发者工具”面板(Token 调试 / 网络状态),默认关闭。改动写入官方每秒轮询的开关,1 秒内生效。',
|
|
239
254
|
rowGapName: '段落间距',
|
|
240
255
|
rowGapDesc: '会话中段落等文本块之间的垂直间距(回合之间、答案内部)。',
|
|
241
256
|
listSpacingName: '列表上下边距',
|
|
@@ -265,10 +280,10 @@ const zh = {
|
|
|
265
280
|
featureTaskOrder: '侧边栏会话拖动排序',
|
|
266
281
|
featureTaskOrderDesc: '拖动调整置顶、项目与分组中的会话顺序,重启后不变。',
|
|
267
282
|
featureSessionSwitch: '会话快捷切换',
|
|
268
|
-
featureSessionSwitchDesc: '{last}
|
|
283
|
+
featureSessionSwitchDesc: '{last} 来回上次会话;按 alt+字母打开切换弹窗,弹窗里用方向键或快捷键选择;键位可改',
|
|
269
284
|
featureTitleLock: '重命名会话名锁定',
|
|
270
285
|
featureTitleLockDesc: '手动重命名过的会话不被自动标题覆盖,侧栏始终显示重命名后的名字。',
|
|
271
|
-
tabTitleGen: '
|
|
286
|
+
tabTitleGen: '自动重命名',
|
|
272
287
|
titleGenShortDesc: '新会话开始作答时,按所选供应商与提示词生成任务名并按手动重命名保存,官方自动标题不再覆盖。',
|
|
273
288
|
titleGenEnabled: '启用',
|
|
274
289
|
titleGenProvider: '供应商',
|
|
@@ -292,8 +307,23 @@ const zh = {
|
|
|
292
307
|
titleGenTesting: '生成中…',
|
|
293
308
|
titleGenTestOk: '生成结果:',
|
|
294
309
|
titleGenTestFailed: '生成失败',
|
|
310
|
+
// 手动“自动重命名”(任务行悬浮按钮 / 右键菜单入口)与其开关
|
|
311
|
+
titleGenManual: '手动重命名',
|
|
312
|
+
titleGenHoverBtn: '任务行悬浮按钮',
|
|
313
|
+
titleGenHoverBtnDesc: '鼠标悬停任务行时,在归档按钮旁显示“自动重命名”按钮。',
|
|
314
|
+
titleGenMenuEntry: '右键菜单项',
|
|
315
|
+
titleGenMenuEntryDesc: '任务右键菜单“重命名任务”下方显示“自动重命名”。',
|
|
316
|
+
titleGenRecentQa: '最近问答数',
|
|
317
|
+
titleGenRecentQaDesc: '手动重命名取会话最近几轮问答作为起名素材。',
|
|
318
|
+
autoRenameItem: '自动重命名',
|
|
319
|
+
autoRenameWorking: '正在生成任务名…',
|
|
320
|
+
autoRenameDone: '已重命名:',
|
|
295
321
|
featureWsRunning: '折叠时任务运行中提示',
|
|
296
322
|
featureWsRunningDesc: '有会话运行时,折叠的项目与任务分区头显示加载图标,全部结束消失。',
|
|
323
|
+
featureSubagentIcon: '子代理运行中提示',
|
|
324
|
+
featureSubagentIconDesc: '后台子代理在跑显机器人、后台终端命令在跑显终端图标(同时在跑机器人优先);未读圆点让位到行尾常显;会话运行中始终显示转圈图标;项目未读徽标忽略错误行。',
|
|
325
|
+
subagentRobotTip: '子代理运行中',
|
|
326
|
+
subagentTermTip: '后台命令运行中',
|
|
297
327
|
tabPerformance: '性能',
|
|
298
328
|
perfDesc: 'ZCode 为每个打开过的项目常驻一个会话进程,应用自身不会回收,项目多了内存占用就高。开启后,长时间未使用且没有任务在跑的项目会被自动释放:会话记录不受影响,再次打开时自动恢复,仅首次回复有几秒等待。正在使用的项目、运行中的会话与后台命令、定时任务都不会被回收。后台命令检测依赖系统进程信息(Linux / macOS / Windows 各走系统自带工具),检测不可用时功能自动停用。',
|
|
299
329
|
featureIdleReclaim: '空闲项目内存回收',
|
|
@@ -339,12 +369,13 @@ const zh = {
|
|
|
339
369
|
featureNewtabPanelsDesc: '新标签页加入第三方插件(headroom、rtk 等)的面板卡片,点击在侧边面板打开。',
|
|
340
370
|
ntpDescSuffix: '插件面板',
|
|
341
371
|
ntpNeedSession: '先打开一个任务会话,再从新标签页打开插件面板',
|
|
372
|
+
ntpOpenMissing: '当前界面没有打开插件面板的入口,无法从新标签页打开插件面板',
|
|
342
373
|
featureStatusBarDesc: '提问输入框右下角和每轮回答最后显示统计项。',
|
|
343
374
|
tabStylesPane: '样式',
|
|
344
375
|
tabStatusPane: '状态栏',
|
|
345
376
|
themeColorsPane: '主题',
|
|
346
377
|
themeBgRegions: '分区背景',
|
|
347
|
-
themeBgRegionFollow: '
|
|
378
|
+
themeBgRegionFollow: '默认(全局壁纸)',
|
|
348
379
|
themeBgRegionLeft: '左侧边栏',
|
|
349
380
|
themeBgRegionCenter: '中间区域',
|
|
350
381
|
themeBgRegionRight: '右侧边栏',
|
|
@@ -361,7 +392,7 @@ const zh = {
|
|
|
361
392
|
themeCustomFg: '正文',
|
|
362
393
|
themeCustomMuted: '次级文字',
|
|
363
394
|
themeCustomAccent: '强调色',
|
|
364
|
-
themeBgDesc: '
|
|
395
|
+
themeBgDesc: '壁纸支持图片、视频、网页三类,铺在界面后方;来源可选本地图库(单选一张)、文件夹(定时轮换)、图片网址(定时刷新)或网页地址;左栏 / 中栏 / 右栏可分区独立设置(仅静态图,缩放与遮罩可单独调)。侧栏、会话流、输入框和设置弹窗都可透出画面——设置弹窗是磨砂玻璃,磨砂效果可在本页关掉;右键菜单与其他弹窗保持不透明保可读。本地图库随 WebDAV 同步上传(覆盖式,不留历史版本)。',
|
|
365
396
|
themeBgModeNone: '无壁纸',
|
|
366
397
|
themeBgModeLibrary: '本地图库',
|
|
367
398
|
themeBgModeFolder: '文件夹',
|
|
@@ -371,31 +402,34 @@ const zh = {
|
|
|
371
402
|
themeBgUpload: '上传图片/视频',
|
|
372
403
|
themeBgEmpty: '还没有上传文件;图片支持 png / jpg / webp / gif / bmp / avif(10MB 以内),视频支持 mp4 / webm / mov(200MB 以内)',
|
|
373
404
|
themeBgDelete: '删除',
|
|
374
|
-
themeBgNoneHint: '
|
|
405
|
+
themeBgNoneHint: '选择一种壁纸来源;文件夹可定时轮换,图片网址可配合随机图 API 定时刷新。',
|
|
375
406
|
themeBgFolderPick: '浏览',
|
|
376
407
|
themeBgFolderPickTitle: '选择壁纸文件夹',
|
|
377
408
|
themeBgFolderHint: '选择一个装壁纸的文件夹,文件原地读取不复制。',
|
|
378
409
|
themeBgFolderRandom: '随机顺序',
|
|
379
|
-
themeBgIntervalHint: '
|
|
380
|
-
themeBgIntervalUnit: '
|
|
410
|
+
themeBgIntervalHint: '轮换间隔(分钟)',
|
|
411
|
+
themeBgIntervalUnit: '分钟后轮换,设为 0 不轮换',
|
|
381
412
|
themeBgFolderCount: '文件夹里有 {n} 个壁纸文件,定时轮换中。',
|
|
413
|
+
themeBgFolderCountIdle: '文件夹里有 {n} 个壁纸文件,当前不轮换。',
|
|
382
414
|
themeBgFolderMissing: '文件夹不存在或里面没有壁纸文件。',
|
|
383
|
-
|
|
384
|
-
themeBgUrlIntervalHint: '刷新间隔(分钟)',
|
|
415
|
+
themeBgUrlIntervalUnit: '分钟后刷新,设为 0 不刷新',
|
|
385
416
|
themeBgUrlInvalid: '网址需以 http(s):// 开头',
|
|
386
417
|
themeBgWebHint: '网页壁纸用沙箱 iframe 铺在界面后方,页面需自行播放动画或视频;仅页面自身透明底时能透出壁纸,部分依赖登录态的页面无法显示。',
|
|
418
|
+
themeBgSource: '来源',
|
|
419
|
+
themeBgImage: '画面',
|
|
387
420
|
themeBgFit: '缩放方式',
|
|
388
421
|
themeBgFitCover: '填满',
|
|
389
422
|
themeBgFitContain: '适应',
|
|
390
423
|
themeBgFitFill: '拉伸',
|
|
391
424
|
themeBgFitTile: '平铺',
|
|
392
425
|
themeBgMask: '遮罩不透明度',
|
|
393
|
-
themeBgMaskHint: '数值越高,画面越向主题背景色淡化,文字对比越清晰',
|
|
394
|
-
themeBgMaskHint2: '画面向主题背景色淡化的程度',
|
|
395
426
|
themeBgBlur: '画面模糊',
|
|
396
427
|
themeBgPanel: '面板不透明度',
|
|
397
|
-
|
|
398
|
-
|
|
428
|
+
themeBgDialogFrost: '设置弹窗磨砂',
|
|
429
|
+
themeBgMisc: '其他',
|
|
430
|
+
themeBgFollowGlobal: '跟随全局',
|
|
431
|
+
themeBgRegionsHint: '来源选“默认(全局壁纸)”即该区不单独设置、直接显示全局壁纸;每行的缩放、遮罩可单独设置,选“跟随全局”即跟随“画面”的值;模糊、转场、播放仅作用于全局壁纸(分区只能铺图,不能播视频)。分区用文件夹时,轮换间隔与随机顺序沿用全局设置。',
|
|
432
|
+
themeBgPlayback: '播放(视频壁纸)',
|
|
399
433
|
themeBgVolume: '音量',
|
|
400
434
|
themeBgVolumeHint: '视频壁纸的音轨音量,0 = 静音(默认)',
|
|
401
435
|
themeBgRate: '倍速',
|
|
@@ -403,7 +437,7 @@ const zh = {
|
|
|
403
437
|
themeBgFpsOff: '原始帧率',
|
|
404
438
|
themeBgFpsHint: '对视频壁纸重编码抽帧以省资源,需要 ffmpeg;未安装时保持原始帧率。',
|
|
405
439
|
themeBgTransition: '切换转场',
|
|
406
|
-
themeBgTransitionCut: '
|
|
440
|
+
themeBgTransitionCut: '直接切换',
|
|
407
441
|
themeBgTransitionFade: '淡入淡出',
|
|
408
442
|
themeBgPause: '暂停条件',
|
|
409
443
|
themeBgPauseHidden: '窗口最小化时',
|
|
@@ -413,7 +447,10 @@ const zh = {
|
|
|
413
447
|
tableCopyBtn: '复制表格',
|
|
414
448
|
tableCopied: '表格已复制',
|
|
415
449
|
sbItemCtx: '上下文占用',
|
|
416
|
-
|
|
450
|
+
sbItemTokRate: '最近输出 tokens/s',
|
|
451
|
+
sbItemQuestions: '主请求数(本会话)',
|
|
452
|
+
sbItemInOut: '累计输入/输出(本会话主轮请求)',
|
|
453
|
+
sbItemHit: '平均缓存命中率(本会话)',
|
|
417
454
|
sbMaster: '启用统计',
|
|
418
455
|
sbMasterDesc: '总开关:关闭后输入框右下角的统计行与每轮回答的用量标注一起停用。',
|
|
419
456
|
sbGroupSession: '会话统计(跟随当前会话)',
|
|
@@ -422,8 +459,11 @@ const zh = {
|
|
|
422
459
|
sbLabelIn: '输入',
|
|
423
460
|
sbLabelOut: '输出',
|
|
424
461
|
sbLabelCache: '缓存',
|
|
462
|
+
sbLabelTps: '输出 tok/s',
|
|
463
|
+
sbLabelInOut: '输入/输出',
|
|
464
|
+
sbLabelHit: '平均命中',
|
|
425
465
|
turnUsageTitle: '本轮 token',
|
|
426
|
-
sbLabelQuestions: '
|
|
466
|
+
sbLabelQuestions: '主请求数',
|
|
427
467
|
sbItemTodayTokens: '今日 token',
|
|
428
468
|
sbItemTasks: '任务总数',
|
|
429
469
|
sbLabelCtx: '上下文',
|
|
@@ -466,6 +506,8 @@ const zh = {
|
|
|
466
506
|
featureComposerProvider: '模型名显示供应商',
|
|
467
507
|
featureImageCopyDesc: '右键会话中的图片或点击放大的预览图,可将图片复制到剪贴板。',
|
|
468
508
|
featureTableCopyDesc: '表格工具条新增复制表格,粘贴进 Excel / 富文本编辑器即为干净表格。',
|
|
509
|
+
featureSessionLink: '会话 ID 显示为任务名链接',
|
|
510
|
+
featureSessionLinkDesc: '提问与回答里的会话 ID(sess_ / session_ 开头)显示为任务名,点击切换到该会话,悬停可看原始 ID。',
|
|
469
511
|
featureComposerProviderDesc: '模型名前显示供应商名(如 BigModel-Max1 / glm-5.3),区分同名模型。',
|
|
470
512
|
imageCopy: '复制图片',
|
|
471
513
|
imageCopied: '图片已复制到剪贴板',
|
|
@@ -477,6 +519,10 @@ const zh = {
|
|
|
477
519
|
pathCopyFailed: '复制路径失败',
|
|
478
520
|
fileOpenDefault: '默认应用打开',
|
|
479
521
|
fileReveal: '打开所在目录',
|
|
522
|
+
fileActionFailed: '{label}失败:{err}',
|
|
523
|
+
unknownError: '未知错误',
|
|
524
|
+
pluginLabel: '插件',
|
|
525
|
+
manualInput: '(手动输入)',
|
|
480
526
|
featureAutoUpdatePlugins: '自动更新',
|
|
481
527
|
featureAutoUpdatePluginsRepo: 'duanluan/zcode-plugins',
|
|
482
528
|
featureAutoUpdatePluginsDesc: '',
|
|
@@ -495,7 +541,7 @@ const zh = {
|
|
|
495
541
|
visionForceInterceptAuto: '不能识图就使用插件',
|
|
496
542
|
visionForceInterceptTrue: '始终使用插件',
|
|
497
543
|
visionForceInterceptFalse: '不使用插件',
|
|
498
|
-
visionForceInterceptHint: '不能识图就使用插件 = 跟随 ZCode
|
|
544
|
+
visionForceInterceptHint: '不能识图就使用插件 = 跟随 ZCode“模型设置”里该模型的图片开关:开 = 模型自看不重复识别,关 = 走识别代理(tool 模式出识别卡片);始终使用插件 = 能看图也强制走识别代理(双重识别换卡片);不使用插件 = 能看图就放行(不能识图的模型仍走识别代理)',
|
|
499
545
|
visionMode: '链模式',
|
|
500
546
|
visionModeFallback: '依次尝试',
|
|
501
547
|
visionModeFallbackDesc: '前一个失败才试下一个,任一成功即止(主力 + 备用)。',
|
|
@@ -523,6 +569,7 @@ const zh = {
|
|
|
523
569
|
visionCompressKB: '压缩阈值 KB',
|
|
524
570
|
visionCompressKBHint: '超过该大小的图先压缩再识别(最长边 2000、JPEG);0 = 不压缩',
|
|
525
571
|
visionLoadFailed: '读取视觉代理配置失败',
|
|
572
|
+
titleGenLoadFailed: '读取自动重命名配置失败',
|
|
526
573
|
tabRtk: 'rtk',
|
|
527
574
|
rtkDesc: 'rtk 插件:把常见开发命令的输出压缩 60-90% 再进入上下文(/rtk-* 命令编辑同一配置)。',
|
|
528
575
|
rtkEnabled: '启用',
|
|
@@ -605,6 +652,10 @@ const zh = {
|
|
|
605
652
|
headroomInterval: '监视间隔',
|
|
606
653
|
headroomIntervalDesc: '省电监视器轮询电源状态的间隔(10–3600 秒,默认 60);保存后从下一轮巡检起生效。',
|
|
607
654
|
headroomSecUnit: '秒',
|
|
655
|
+
serenaSwitch: 'Serena 语义检索',
|
|
656
|
+
serenaSwitchDesc: '注册 Serena MCP:用符号定位、引用查找等语义工具代替整文件读取,省 token。写入 ZCode MCP 配置,重启会话后生效。',
|
|
657
|
+
serenaEnabled: '已开启 Serena,重启会话后生效',
|
|
658
|
+
serenaDisabled: '已关闭 Serena,重启会话后移除',
|
|
608
659
|
upgradeCheck: '检查更新',
|
|
609
660
|
upgradeChecking: '检查中…',
|
|
610
661
|
upgradeUpToDate: '已是最新({v})',
|
|
@@ -664,7 +715,7 @@ const zh = {
|
|
|
664
715
|
relocateTitle: '切换文件夹',
|
|
665
716
|
relocateDesc: '将该项目指向另一个文件夹:侧边栏、已打开标签页与本地任务历史一并迁移,目录本身不会被移动,会话记录不会丢失。',
|
|
666
717
|
relocateNewPathLabel: '新文件夹',
|
|
667
|
-
relocateConfirm: '
|
|
718
|
+
relocateConfirm: '切换',
|
|
668
719
|
relocateHint: '目标文件夹需已存在,可输入路径或点击“浏览”选择;完成后界面将自动刷新。',
|
|
669
720
|
relocateSuccess: '已切换文件夹,正在刷新界面…',
|
|
670
721
|
relocateIndexSkipped: '已切换文件夹;任务历史未能同步(本机缺少 SQLite 支持),旧任务条目可能仍指向旧路径。',
|
|
@@ -689,10 +740,10 @@ const en = {
|
|
|
689
740
|
tabZcode: 'ZCode CLI',
|
|
690
741
|
zcodeDesc: 'ZCode behavior settings (written to ~/.zcode/cli/config.json); takes effect for new sessions.',
|
|
691
742
|
zcodeStatsTitle: 'Skill listing check',
|
|
692
|
-
zcodeStatsCounts: '{total} skills ({user} local · {plugin}
|
|
743
|
+
zcodeStatsCounts: '{total} skills ({user} local · {plugin} from plugins)',
|
|
693
744
|
zcodeStatsChars: 'Full listing ≈ {n} characters',
|
|
694
745
|
zcodeBudgetDefaultTag: ' (default)',
|
|
695
|
-
zcodeStatsDegraded: 'Over budget: the listing degrades to names only, so the model cannot see skill descriptions',
|
|
746
|
+
zcodeStatsDegraded: 'Over budget: the listing degrades to names and file paths only, so the model cannot see skill descriptions',
|
|
696
747
|
zcodeStatsOk: 'Within budget: the full listing with descriptions is injected into new sessions',
|
|
697
748
|
zcodeStatsSuggest: 'Suggested budget {n} characters (with 20% margin)',
|
|
698
749
|
zcodeBudgetApply: 'Use suggested',
|
|
@@ -703,7 +754,7 @@ const en = {
|
|
|
703
754
|
zcodeSkillIncludeInstructions: 'Skill instructions injection',
|
|
704
755
|
zcodeSkillIncludeInstructionsDesc: 'skills.includeInstructions: whether skill instructions are injected along with the listing',
|
|
705
756
|
zcodeSkillBudget: 'Skill listing budget (characters)',
|
|
706
|
-
zcodeSkillBudgetDesc: 'skills.metadataBudget: the listing degrades to names only beyond this length; default 20000',
|
|
757
|
+
zcodeSkillBudgetDesc: 'skills.metadataBudget: the listing degrades to names and file paths only beyond this length; default 20000',
|
|
707
758
|
zcodeSkillRoots: 'Extra skill directories',
|
|
708
759
|
zcodeSkillRootsDesc: 'skills.roots: one directory per line; skills under them are discovered (beyond ~/.zcode/skills and ~/.agents/skills)',
|
|
709
760
|
zcodeSave: 'Save',
|
|
@@ -718,9 +769,9 @@ const en = {
|
|
|
718
769
|
zcodeFeatSkillDesc: 'features.skill: the Skill tool is available (the skill system must also be on)',
|
|
719
770
|
zcodeFeatMcp: 'MCP tools',
|
|
720
771
|
zcodeFeatMcpDesc: 'features.mcp: use tools provided by MCP servers',
|
|
721
|
-
zcodeMemoryHint: '
|
|
772
|
+
zcodeMemoryHint: 'Workspace memory is not configured here; toggle it in the official settings under Settings → Agent capabilities → Memory (with the memory viewer).',
|
|
722
773
|
agentsDesc: 'Written to ~/.zcode/AGENTS.md and used as default instructions in every session across all projects. Takes effect for new sessions; per-project AGENTS.md can extend or override it. Content over 100 KB is truncated by the app.',
|
|
723
|
-
agentsPlaceholder: 'Instructions followed by all projects by default;
|
|
774
|
+
agentsPlaceholder: 'Instructions followed by all projects by default; leave empty and save to remove the global prompt',
|
|
724
775
|
agentsSave: 'Save',
|
|
725
776
|
agentsSaved: 'Global prompt saved.',
|
|
726
777
|
agentsLoadFailed: 'Failed to load the global prompt',
|
|
@@ -728,7 +779,7 @@ const en = {
|
|
|
728
779
|
proxyPlaceholder: 'http://127.0.0.1:7890',
|
|
729
780
|
proxySave: 'Save',
|
|
730
781
|
proxySaved: 'Proxy settings saved.',
|
|
731
|
-
proxyHint: 'Save empty to clear the proxy.',
|
|
782
|
+
proxyHint: 'Save empty to clear the manual proxy; Windows then follows the system proxy, other platforms connect directly.',
|
|
732
783
|
proxyTest: 'Test',
|
|
733
784
|
proxyTesting: 'Testing…',
|
|
734
785
|
proxyTestEmpty: 'Enter a proxy address first',
|
|
@@ -741,7 +792,7 @@ const en = {
|
|
|
741
792
|
proxyScopeSyncDesc: 'WebDAV upload and download go through the proxy.',
|
|
742
793
|
tabSync: 'Sync',
|
|
743
794
|
tabDebug: 'Debug',
|
|
744
|
-
testNoSessionHint: 'With
|
|
795
|
+
testNoSessionHint: 'With "Follow current session" selected, the provider and model of the last session are used (the label shows the model name in brackets).',
|
|
745
796
|
syncDesc: 'Manually back up ZCode Pro settings and model settings to WebDAV, or restore them on a new computer. The two items are stored as separate files, so you can upload or overwrite either one alone; every upload also keeps a timestamped history version (how many to keep is set in the "History" row; older ones are removed automatically after upload) and download lets you pick any of them. Data moves only when you click, never automatically.',
|
|
746
797
|
syncUrlPlaceholder: 'https://dav.example.com/dav/',
|
|
747
798
|
syncDir: 'Folder',
|
|
@@ -754,7 +805,7 @@ const en = {
|
|
|
754
805
|
syncPruned: 'removed {n} older history versions',
|
|
755
806
|
syncSave: 'Save',
|
|
756
807
|
syncSaved: 'Sync settings saved.',
|
|
757
|
-
syncFormHint: 'Sync files go inside the folder (default zcode-pro, multi-level allowed, created automatically): zcodepro.json and model.json
|
|
808
|
+
syncFormHint: 'Sync files go inside the folder (default zcode-pro, multi-level allowed, created automatically): zcodepro.json and model.json always hold the latest version; timestamped history versions are kept alongside.',
|
|
758
809
|
syncRecLink: 'Jianguoyun WebDAV',
|
|
759
810
|
syncRecSuffix: ' — use the app password, not your account password.',
|
|
760
811
|
syncIncludeZcp: 'ZCode Pro settings',
|
|
@@ -764,7 +815,7 @@ const en = {
|
|
|
764
815
|
syncUpload: 'Upload',
|
|
765
816
|
syncDownload: 'Download',
|
|
766
817
|
syncUploading: 'Uploading…',
|
|
767
|
-
syncUploaded: 'Uploaded to the server
|
|
818
|
+
syncUploaded: 'Uploaded to the server',
|
|
768
819
|
syncDownloaded: 'Restored from the server.',
|
|
769
820
|
syncLastPush: 'Last upload',
|
|
770
821
|
syncLastPull: 'Last download',
|
|
@@ -772,7 +823,7 @@ const en = {
|
|
|
772
823
|
syncConfirmTitle: 'Download from the server',
|
|
773
824
|
syncConfirmDesc: 'The selected file will overwrite the matching local section (a .zcodepro-backup copy is kept next to each file); your local sync config and credentials stay untouched. Restarting ZCode is recommended after restoring model settings. Import now?',
|
|
774
825
|
syncConfirmGo: 'Import',
|
|
775
|
-
syncPickDesc: 'Fixed names
|
|
826
|
+
syncPickDesc: 'Fixed names always hold the latest version; timestamped files are the history each upload leaves behind. Import overwrites the matching local section.',
|
|
776
827
|
syncVerDeleteLatestNote: 'Note: this is the "latest" file that older zcode-pro installs download from; deleting it breaks their download. Timestamped history versions are not affected.',
|
|
777
828
|
syncHint: 'Sync credentials are stored locally in zcodepro.json only; model settings contain the API keys of custom providers and go to your own WebDAV only.',
|
|
778
829
|
syncTest: 'Test',
|
|
@@ -798,6 +849,8 @@ const en = {
|
|
|
798
849
|
syncVerSaved: 'Saved to',
|
|
799
850
|
devModeDesc: 'For development: after changing zcode-pro code, click "Reload ZCode Pro" instead of restarting ZCode. It builds automatically (when running from the source repo), restarts the ZCode Pro launcher process (fresh helper and injected script), and every ZCode window refreshes and re-injects. The ZCode app itself and all sessions stay untouched.',
|
|
800
851
|
devReload: 'Reload ZCode Pro',
|
|
852
|
+
devToolsSwitch: 'Developer tools',
|
|
853
|
+
devToolsSwitchDesc: 'The official "Developer tools" side pane (Token debug / Network status), off by default. The change goes to the flag the official app polls every second.',
|
|
801
854
|
devReloading: 'Reloading…',
|
|
802
855
|
devReloadDesc: 'Every ZCode window refreshes automatically within 2-3 seconds to load the new script.',
|
|
803
856
|
rowGapName: 'Paragraph spacing',
|
|
@@ -817,11 +870,11 @@ const en = {
|
|
|
817
870
|
lineHeightName: 'Answer line height',
|
|
818
871
|
lineHeightDesc: 'Line height of answer text (multiplier).',
|
|
819
872
|
thinkingLineHeightName: 'Work-log line height',
|
|
820
|
-
thinkingLineHeightDesc: 'Line height of the
|
|
873
|
+
thinkingLineHeightDesc: 'Line height of the "worked for…" history panel (tool entries and reasoning, multiplier).',
|
|
821
874
|
userLineHeightName: 'Question line height',
|
|
822
875
|
userLineHeightDesc: 'Line height of question text (multiplier).',
|
|
823
876
|
contentWidthName: 'Content width',
|
|
824
|
-
contentWidthDesc: 'Max width of conversation content; accepts px or % (e.g. 900px, 85%).',
|
|
877
|
+
contentWidthDesc: 'Max width of conversation content; accepts px or % (e.g. 900px, 85%). Shows the current actual width by default; % is relative to the session area.',
|
|
825
878
|
defaultValue: 'default',
|
|
826
879
|
resetDefault: 'Reset to default',
|
|
827
880
|
featureProjectMenu: 'Project menu actions',
|
|
@@ -829,37 +882,51 @@ const en = {
|
|
|
829
882
|
featureTaskOrder: 'Sidebar session drag ordering',
|
|
830
883
|
featureTaskOrderDesc: 'Drag to reorder sessions in Pinned, Projects and Groups; survives restarts.',
|
|
831
884
|
featureSessionSwitch: 'Session quick switch',
|
|
832
|
-
featureSessionSwitchDesc: '{last} toggles
|
|
885
|
+
featureSessionSwitchDesc: '{last} toggles between the current and the last session; alt + letter opens the switcher popup, pick with arrows or hotkeys inside; keys remappable',
|
|
833
886
|
featureTitleLock: 'Keep renamed session titles',
|
|
834
887
|
featureTitleLockDesc: 'Sessions you renamed keep their custom title in the sidebar.',
|
|
835
|
-
tabTitleGen: '
|
|
836
|
-
titleGenShortDesc: 'When a new session starts answering, generates the task name with the chosen provider and prompt and saves it as a manual rename the built-in title never overrides.',
|
|
888
|
+
tabTitleGen: 'Auto rename',
|
|
889
|
+
titleGenShortDesc: 'When a new session starts answering, generates the task name with the chosen provider and prompt and saves it as a manual rename that the built-in title never overrides.',
|
|
837
890
|
titleGenEnabled: 'Enable',
|
|
838
891
|
titleGenProvider: 'Provider',
|
|
839
892
|
titleGenProviderNone: 'Custom endpoint (no provider)',
|
|
840
893
|
titleGenProviderSession: 'Follow current session',
|
|
841
894
|
titleGenProviderDeleted: ' (deleted)',
|
|
842
895
|
titleGenModel: 'Model',
|
|
843
|
-
titleGenModelHint: 'Pick from the list, or type a model
|
|
896
|
+
titleGenModelHint: 'Pick from the list, or type a model ID',
|
|
844
897
|
titleGenModelEmpty: '(not set)',
|
|
845
898
|
titleGenModelSessionHint: 'Pick from the list; the first entry follows the session model',
|
|
846
899
|
titleGenModelFollowSession: 'Follow the session model',
|
|
847
|
-
titleGenModelManualHint: 'Type a model
|
|
900
|
+
titleGenModelManualHint: 'Type a model ID',
|
|
848
901
|
titleGenBaseUrl: 'Base URL',
|
|
849
902
|
titleGenApiKey: 'API Key',
|
|
850
903
|
titleGenFormat: 'Protocol',
|
|
851
904
|
titleGenPrompt: 'Prompt',
|
|
852
|
-
titleGenPromptPlaceholder: 'Leave empty for the built-in default prompt (button below shows it)',
|
|
905
|
+
titleGenPromptPlaceholder: 'Leave empty for the built-in default prompt (the button below shows it)',
|
|
853
906
|
titleGenPromptReset: 'Use default prompt',
|
|
854
907
|
titleGenSample: 'Test message',
|
|
855
908
|
titleGenTest: 'Test',
|
|
856
909
|
titleGenTesting: 'Generating…',
|
|
857
910
|
titleGenTestOk: 'Result: ',
|
|
858
911
|
titleGenTestFailed: 'Generation failed',
|
|
912
|
+
titleGenManual: 'Manual rename',
|
|
913
|
+
titleGenHoverBtn: 'Task row hover button',
|
|
914
|
+
titleGenHoverBtnDesc: 'Show an "Auto rename" button next to the archive button when hovering a task row.',
|
|
915
|
+
titleGenMenuEntry: 'Context menu item',
|
|
916
|
+
titleGenMenuEntryDesc: 'Show "Auto rename" below "Rename task" in the task context menu.',
|
|
917
|
+
titleGenRecentQa: 'Recent Q&A rounds',
|
|
918
|
+
titleGenRecentQaDesc: 'Manual rename uses the last N Q&A rounds as input.',
|
|
919
|
+
autoRenameItem: 'Auto rename',
|
|
920
|
+
autoRenameWorking: 'Generating title…',
|
|
921
|
+
autoRenameDone: 'Renamed: ',
|
|
859
922
|
featureWsRunning: 'Running indicator when collapsed',
|
|
860
923
|
featureWsRunningDesc: 'Collapsed project and task headers show a loader while sessions run.',
|
|
924
|
+
featureSubagentIcon: 'Subagent running indicator',
|
|
925
|
+
featureSubagentIconDesc: 'Task rows show a robot icon while subagents run and a terminal icon while background commands run (robot wins when both); the unread dot moves to the row end; running sessions always show a spinner; project unread badges ignore error rows.',
|
|
926
|
+
subagentRobotTip: 'Subagents running',
|
|
927
|
+
subagentTermTip: 'Background commands running',
|
|
861
928
|
tabPerformance: 'Performance',
|
|
862
|
-
perfDesc: 'ZCode keeps a session process resident for every project you have opened and never reclaims it, so memory grows with projects. When enabled, projects unused for a while with nothing running release their memory automatically: sessions are untouched and reload when reopened, with a few seconds wait on the first reply. The project in use, running sessions, background commands and scheduled tasks are never reclaimed. Background-command detection reads system process info via built-in tools (Linux / macOS / Windows); when unavailable, the feature disables itself.',
|
|
929
|
+
perfDesc: 'ZCode keeps a session process resident for every project you have opened and never reclaims it, so memory grows with projects. When enabled, projects unused for a while with nothing running release their memory automatically: sessions are untouched and reload when reopened, with a few seconds\' wait on the first reply. The project in use, running sessions, background commands and scheduled tasks are never reclaimed. Background-command detection reads system process info via built-in tools (Linux / macOS / Windows); when unavailable, the feature disables itself.',
|
|
863
930
|
featureIdleReclaim: 'Idle project memory reclaim',
|
|
864
931
|
featureIdleReclaimDesc: 'Qualifying projects release their memory; sessions are untouched and reload when reopened.',
|
|
865
932
|
idleReclaimMinutesLabel: 'Idle minutes before reclaim',
|
|
@@ -875,9 +942,9 @@ const en = {
|
|
|
875
942
|
featurePinnedCollapse: 'Collapsible Pinned section',
|
|
876
943
|
featurePinnedCollapseDesc: 'The Pinned header collapses/expands its task list.',
|
|
877
944
|
featureSandboxReclaim: 'Plugin card sandbox reclaim',
|
|
878
|
-
featureSandboxReclaimDesc: 'Reclaims the oldest sandboxes
|
|
945
|
+
featureSandboxReclaimDesc: 'Reclaims the oldest sandboxes when the 64-slot cap is hit so new cards keep opening; released cards come back when their session is reopened.',
|
|
879
946
|
featurePluginCardRetry: 'Plugin card auto-retry',
|
|
880
|
-
featurePluginCardRetryDesc: 'Auto-clicks "Reload" on cards that
|
|
947
|
+
featurePluginCardRetryDesc: 'Auto-clicks "Reload" on cards that hit the slot cap; they recover as soon as a slot frees up.',
|
|
881
948
|
visionCardUi: 'Vision cards',
|
|
882
949
|
pinnedToggleAria: 'Collapse/expand Pinned',
|
|
883
950
|
sidebarProjectSpacingName: 'Project spacing',
|
|
@@ -903,18 +970,19 @@ const en = {
|
|
|
903
970
|
featureNewtabPanelsDesc: "Adds third-party plugin panels (headroom, rtk, ...) to the new tab page; click to open in the side pane.",
|
|
904
971
|
ntpDescSuffix: 'plugin panel',
|
|
905
972
|
ntpNeedSession: 'Open a task session first, then open plugin panels from the new tab page',
|
|
973
|
+
ntpOpenMissing: 'No plugin-panel opener in this UI; cannot open plugin panels from the new tab page',
|
|
906
974
|
featureStatusBarDesc: 'Shows statistics at the bottom-right of the input box and at the end of each answer.',
|
|
907
975
|
tabStylesPane: 'Styles',
|
|
908
976
|
tabStatusPane: 'Status bar',
|
|
909
977
|
themeColorsPane: 'Theme',
|
|
910
978
|
themeBgRegions: 'Regional backgrounds',
|
|
911
|
-
themeBgRegionFollow: '
|
|
979
|
+
themeBgRegionFollow: 'Default (global)',
|
|
912
980
|
themeBgRegionLeft: 'Left sidebar',
|
|
913
981
|
themeBgRegionCenter: 'Center area',
|
|
914
982
|
themeBgRegionRight: 'Right sidebar',
|
|
915
983
|
themeBgPane: 'Wallpaper',
|
|
916
984
|
themeSkinTitle: 'Skins',
|
|
917
|
-
themeSkinDesc: '
|
|
985
|
+
themeSkinDesc: 'Well-known editor theme palettes, auto-matching ZCode\'s light / dark mode; "Default" keeps ZCode as-is, "Custom" is tuned below.',
|
|
918
986
|
themeSkinCustom: 'Custom',
|
|
919
987
|
themeCustomTitle: 'Custom theme',
|
|
920
988
|
themeCustomHint: 'Color changes apply live (auto-switches to the custom skin); set light and dark separately — pick 5 colors and the whole palette is derived.',
|
|
@@ -925,7 +993,7 @@ const en = {
|
|
|
925
993
|
themeCustomFg: 'Text',
|
|
926
994
|
themeCustomMuted: 'Muted text',
|
|
927
995
|
themeCustomAccent: 'Accent',
|
|
928
|
-
themeBgDesc: 'Wallpapers can be images, videos or web pages, rendered behind the UI. Sources: local library, folder (rotate on a timer), image URL (refresh on a timer) or a web page; left / center / right regions can each have their own (static images only). Sidebar, chat and
|
|
996
|
+
themeBgDesc: 'Wallpapers can be images, videos or web pages, rendered behind the UI. Sources: local library (pick one image), folder (rotate on a timer), image URL (refresh on a timer) or a web page; left / center / right regions can each have their own background (static images only, with their own fit and mask). Sidebar, chat, composer and the settings window reveal the wallpaper — the settings window is frosted; the frosting can be turned off here; context menus and other dialogs stay opaque for readability. The library uploads over WebDAV with the zcode-pro sync group (overwrite, no history versions).',
|
|
929
997
|
themeBgModeNone: 'None',
|
|
930
998
|
themeBgModeLibrary: 'Library',
|
|
931
999
|
themeBgModeFolder: 'Folder',
|
|
@@ -935,31 +1003,34 @@ const en = {
|
|
|
935
1003
|
themeBgUpload: 'Upload images/videos',
|
|
936
1004
|
themeBgEmpty: 'Nothing uploaded yet. Images: png / jpg / webp / gif / bmp / avif (up to 10MB); videos: mp4 / webm / mov (up to 200MB)',
|
|
937
1005
|
themeBgDelete: 'Delete',
|
|
938
|
-
themeBgNoneHint: 'Pick a wallpaper source;
|
|
1006
|
+
themeBgNoneHint: 'Pick a wallpaper source; folders rotate on a timer, image URLs refresh on a timer for random-image APIs.',
|
|
939
1007
|
themeBgFolderPick: 'Browse',
|
|
940
1008
|
themeBgFolderPickTitle: 'Choose a wallpaper folder',
|
|
941
1009
|
themeBgFolderHint: 'Pick a folder of wallpapers; files are read in place, not copied.',
|
|
942
1010
|
themeBgFolderRandom: 'Random order',
|
|
943
|
-
themeBgIntervalHint: '
|
|
944
|
-
themeBgIntervalUnit: '
|
|
1011
|
+
themeBgIntervalHint: 'Rotation interval (minutes)',
|
|
1012
|
+
themeBgIntervalUnit: 'minutes between rotations; 0 = no rotation',
|
|
945
1013
|
themeBgFolderCount: '{n} wallpaper files in the folder, rotating on the timer.',
|
|
1014
|
+
themeBgFolderCountIdle: '{n} wallpaper files in the folder, rotation off.',
|
|
946
1015
|
themeBgFolderMissing: 'Folder missing or contains no wallpaper files.',
|
|
947
|
-
|
|
948
|
-
themeBgUrlIntervalHint: 'Refresh interval (minutes)',
|
|
1016
|
+
themeBgUrlIntervalUnit: 'minutes between refreshes; 0 = no refresh',
|
|
949
1017
|
themeBgUrlInvalid: 'URL must start with http(s)://',
|
|
950
1018
|
themeBgWebHint: 'Web wallpapers render behind the UI in a sandboxed iframe; the page plays its own animation or video. Only pages with their own transparent background reveal the wallpaper; pages that need a login session may not show.',
|
|
1019
|
+
themeBgSource: 'Source',
|
|
1020
|
+
themeBgImage: 'Display',
|
|
951
1021
|
themeBgFit: 'Fit',
|
|
952
1022
|
themeBgFitCover: 'Fill',
|
|
953
1023
|
themeBgFitContain: 'Fit',
|
|
954
1024
|
themeBgFitFill: 'Stretch',
|
|
955
1025
|
themeBgFitTile: 'Tile',
|
|
956
1026
|
themeBgMask: 'Mask opacity',
|
|
957
|
-
themeBgMaskHint: 'Higher values fade the wallpaper toward the theme background color for clearer text',
|
|
958
|
-
themeBgMaskHint2: 'How much the wallpaper fades toward the theme background color',
|
|
959
1027
|
themeBgBlur: 'Wallpaper blur',
|
|
960
1028
|
themeBgPanel: 'Panel opacity',
|
|
961
|
-
|
|
962
|
-
|
|
1029
|
+
themeBgDialogFrost: 'Frosted settings window',
|
|
1030
|
+
themeBgMisc: 'Other',
|
|
1031
|
+
themeBgFollowGlobal: 'Follow global',
|
|
1032
|
+
themeBgRegionsHint: '"Default (global)" means the region is not set on its own and just shows the global wallpaper. Fit and mask can be set per row; "Follow global" uses the Display values. Blur, transition and playback apply only to the global wallpaper (regions are static images, no video). Region folders reuse the global rotation interval and order settings.',
|
|
1033
|
+
themeBgPlayback: 'Playback (video)',
|
|
963
1034
|
themeBgVolume: 'Volume',
|
|
964
1035
|
themeBgVolumeHint: 'Audio track volume of video wallpapers, 0 = muted (default)',
|
|
965
1036
|
themeBgRate: 'Speed',
|
|
@@ -967,7 +1038,7 @@ const en = {
|
|
|
967
1038
|
themeBgFpsOff: 'Native',
|
|
968
1039
|
themeBgFpsHint: 'Re-encodes video wallpapers to a lower frame rate to save resources; needs ffmpeg, otherwise the native rate is kept.',
|
|
969
1040
|
themeBgTransition: 'Transition',
|
|
970
|
-
themeBgTransitionCut: '
|
|
1041
|
+
themeBgTransitionCut: 'Instant',
|
|
971
1042
|
themeBgTransitionFade: 'Fade',
|
|
972
1043
|
themeBgPause: 'Pause when',
|
|
973
1044
|
themeBgPauseHidden: 'Window minimized',
|
|
@@ -977,18 +1048,24 @@ const en = {
|
|
|
977
1048
|
tableCopyBtn: 'Copy table',
|
|
978
1049
|
tableCopied: 'Table copied',
|
|
979
1050
|
sbItemCtx: 'Context usage',
|
|
980
|
-
|
|
1051
|
+
sbItemTokRate: 'Recent output tokens/s',
|
|
1052
|
+
sbItemQuestions: 'Main requests (this session)',
|
|
1053
|
+
sbItemInOut: 'Total input/output (main requests, this session)',
|
|
1054
|
+
sbItemHit: 'Average cache hit rate (this session)',
|
|
981
1055
|
sbMaster: 'Enable statistics',
|
|
982
1056
|
sbMasterDesc: 'Master switch: turning this off disables both the input-box statistics and per-turn labels.',
|
|
983
|
-
sbGroupSession: 'Session statistics (follows current session)',
|
|
1057
|
+
sbGroupSession: 'Session statistics (follows the current session)',
|
|
984
1058
|
sbGroupGlobal: 'Global statistics',
|
|
985
1059
|
sbGroupTurn: 'Per-turn statistics (answer rows)',
|
|
986
1060
|
sbLabelIn: 'in',
|
|
987
1061
|
sbLabelOut: 'out',
|
|
988
1062
|
sbLabelCache: 'cache',
|
|
1063
|
+
sbLabelTps: 'out tok/s',
|
|
1064
|
+
sbLabelInOut: 'in/out',
|
|
1065
|
+
sbLabelHit: 'avg hit',
|
|
989
1066
|
turnUsageTitle: 'Turn tokens',
|
|
990
|
-
sbLabelQuestions: '
|
|
991
|
-
sbItemTodayTokens: '
|
|
1067
|
+
sbLabelQuestions: 'reqs',
|
|
1068
|
+
sbItemTodayTokens: 'Tokens today',
|
|
992
1069
|
sbItemTasks: 'Tasks',
|
|
993
1070
|
sbLabelCtx: 'ctx',
|
|
994
1071
|
sbLabelTurns: 'calls',
|
|
@@ -1003,8 +1080,8 @@ const en = {
|
|
|
1003
1080
|
tabShortcuts: 'Shortcuts',
|
|
1004
1081
|
hkTitle: 'Session quick switch',
|
|
1005
1082
|
hkAltZ: 'Toggle between the current and the last-used session',
|
|
1006
|
-
hkAltX: 'Move the highlight up (earlier
|
|
1007
|
-
hkAltC: 'Move the highlight down (recent
|
|
1083
|
+
hkAltX: 'Move the highlight up (earlier tasks) in the popup',
|
|
1084
|
+
hkAltC: 'Move the highlight down (more recent tasks); at the bottom it loads 5 more and highlights the first newly loaded entry',
|
|
1008
1085
|
hkAltE: 'Open the last 10 tasks',
|
|
1009
1086
|
hkAltR: 'Open running / finished-but-unseen tasks',
|
|
1010
1087
|
hkArrow: 'Move the highlight while the popup is open (same rules as alt + {prev} / alt + {next})',
|
|
@@ -1025,11 +1102,13 @@ const en = {
|
|
|
1025
1102
|
hkResetDone: 'Shortcuts reset to defaults',
|
|
1026
1103
|
featureFileActions: 'File menu actions',
|
|
1027
1104
|
featureFileActionsDesc: 'Adds "Open with default app" and "Reveal in file manager" to the right-click menu of file links in chat.',
|
|
1028
|
-
featureImageCopy: '
|
|
1105
|
+
featureImageCopy: 'Copy image',
|
|
1029
1106
|
featureTableCopy: 'Copy table',
|
|
1030
1107
|
featureComposerProvider: 'Provider in model name',
|
|
1031
1108
|
featureImageCopyDesc: 'Right-click an image in chat or the enlarged preview to copy it to the clipboard.',
|
|
1032
1109
|
featureTableCopyDesc: 'Copy-table button on the table toolbar; pastes into Excel / editors as a clean table.',
|
|
1110
|
+
featureSessionLink: 'Session ID links',
|
|
1111
|
+
featureSessionLinkDesc: 'Shows session IDs (sess_ / session_) in chat as task names; click to switch to that session, hover for the raw ID.',
|
|
1033
1112
|
featureComposerProviderDesc: 'Shows the provider before the model name (e.g. BigModel-Max1 / glm-5.3).',
|
|
1034
1113
|
imageCopy: 'Copy image',
|
|
1035
1114
|
imageCopied: 'Image copied to the clipboard.',
|
|
@@ -1041,6 +1120,10 @@ const en = {
|
|
|
1041
1120
|
pathCopyFailed: 'Failed to copy the path.',
|
|
1042
1121
|
fileOpenDefault: 'Open with default app',
|
|
1043
1122
|
fileReveal: 'Reveal in file manager',
|
|
1123
|
+
fileActionFailed: '{label} failed: {err}',
|
|
1124
|
+
unknownError: 'Unknown error',
|
|
1125
|
+
pluginLabel: 'Plugin',
|
|
1126
|
+
manualInput: ' (manual input)',
|
|
1044
1127
|
featureAutoUpdatePlugins: 'Auto-update',
|
|
1045
1128
|
featureAutoUpdatePluginsRepo: 'duanluan/zcode-plugins',
|
|
1046
1129
|
featureAutoUpdatePluginsDesc: '',
|
|
@@ -1056,10 +1139,10 @@ const en = {
|
|
|
1056
1139
|
visionDesc: 'When the main model cannot see images (e.g. glm-5.3), images in messages are recognized by the vision models below and passed to the main model as text (zcode-vision plugin; /vision-* commands edit the same file).',
|
|
1057
1140
|
visionEnabled: 'Enable',
|
|
1058
1141
|
visionForceIntercept: 'Main model',
|
|
1059
|
-
visionForceInterceptAuto: "Use plugin only if model
|
|
1060
|
-
visionForceInterceptTrue: 'Always use plugin',
|
|
1061
|
-
visionForceInterceptFalse: 'Never use plugin',
|
|
1062
|
-
visionForceInterceptHint: "Use plugin only if model
|
|
1142
|
+
visionForceInterceptAuto: "Use the plugin only if the model cannot see images",
|
|
1143
|
+
visionForceInterceptTrue: 'Always use the plugin',
|
|
1144
|
+
visionForceInterceptFalse: 'Never use the plugin',
|
|
1145
|
+
visionForceInterceptHint: "Use the plugin only if the model cannot see images = follow the image toggle in ZCode model settings: on = the model sees images itself (no duplicate recognition), off = route through the vision proxy (tool mode shows the result card); Always use the plugin = forced double recognition for the card; Never use the plugin = let capable models see images (models that can't still go through the plugin)",
|
|
1063
1146
|
visionMode: 'Chain mode',
|
|
1064
1147
|
visionModeFallback: 'Fallback',
|
|
1065
1148
|
visionModeFallbackDesc: 'Try in order until one succeeds (primary + backup).',
|
|
@@ -1073,10 +1156,10 @@ const en = {
|
|
|
1073
1156
|
visionUseProvider: 'Provider',
|
|
1074
1157
|
visionSkipAfterFailures: 'Skip after failures',
|
|
1075
1158
|
visionSkipAfterFailuresHint: 'After this many consecutive failures a proxy is skipped and the next one is tried; 0 = never skip',
|
|
1076
|
-
visionSkipMinutes: 'Skip minutes',
|
|
1159
|
+
visionSkipMinutes: 'Skip for (minutes)',
|
|
1077
1160
|
visionSkipMinutesHint: 'How long a skipped proxy rests before being retried; any success resets the counter',
|
|
1078
1161
|
visionResetChain: 'Reset default chain',
|
|
1079
|
-
visionResetChainConfirm: 'Reset chain mode and the proxy list to the default single-level chain (session
|
|
1162
|
+
visionResetChainConfirm: 'Reset chain mode and the proxy list to the default single-level chain (the "session" entry follows the session\'s provider and model)? Current proxy edits will be lost. Continue?',
|
|
1080
1163
|
visionBaseUrl: 'API URL',
|
|
1081
1164
|
visionModel: 'Model',
|
|
1082
1165
|
visionApiKey: 'API Key',
|
|
@@ -1084,9 +1167,10 @@ const en = {
|
|
|
1084
1167
|
visionTest: 'Test',
|
|
1085
1168
|
visionTesting: 'Testing…',
|
|
1086
1169
|
visionTestFailed: 'Vision proxy test failed',
|
|
1087
|
-
visionCompressKB: '
|
|
1170
|
+
visionCompressKB: 'Compression threshold (KB)',
|
|
1088
1171
|
visionCompressKBHint: 'Images above this size are compressed first (max edge 2000, JPEG); 0 = never',
|
|
1089
1172
|
visionLoadFailed: 'Failed to load the vision config',
|
|
1173
|
+
titleGenLoadFailed: 'Failed to load the auto-rename config',
|
|
1090
1174
|
tabRtk: 'rtk',
|
|
1091
1175
|
rtkDesc: 'rtk plugin: compresses common dev command output by 60-90% before it reaches the context (/rtk-* commands edit the same files).',
|
|
1092
1176
|
rtkEnabled: 'Enable',
|
|
@@ -1095,15 +1179,15 @@ const en = {
|
|
|
1095
1179
|
rtkBinInstalled: 'rtk installed; PATH takes effect for sessions after signing out and back in — the plugin hook works immediately',
|
|
1096
1180
|
rtkWhitelistTitle: 'Whitelist (pass through without compression)',
|
|
1097
1181
|
rtkBuiltinLabel: 'Built-in exemptions (read-only, follow plugin updates):',
|
|
1098
|
-
rtkWhitelistDesc: 'Each entry is name (e.g. docker) or git:name (e.g. git:clone); added commands skip compression. Built-ins (git add/commit/push, mkdir/cp, …) cannot be removed.',
|
|
1182
|
+
rtkWhitelistDesc: 'Each entry is a name (e.g. docker) or git:name (e.g. git:clone); added commands skip compression. Built-ins (git add/commit/push, mkdir/cp, …) cannot be removed.',
|
|
1099
1183
|
rtkWhitelistPlaceholder: 'name or git:name, press Enter to add',
|
|
1100
1184
|
rtkWhitelistAdd: 'Add',
|
|
1101
1185
|
rtkWhitelistClear: 'Clear',
|
|
1102
1186
|
rtkWhitelistCleared: 'Whitelist cleared',
|
|
1103
|
-
rtkWhitelistInvalid: 'Entry must be name or git:name',
|
|
1187
|
+
rtkWhitelistInvalid: 'Entry must be a name or git:name',
|
|
1104
1188
|
rtkLoadFailed: 'Failed to load the rtk config',
|
|
1105
1189
|
tabHeadroom: 'Headroom',
|
|
1106
|
-
headroomDesc: 'Headroom plugin: a local compression proxy on 127.0.0.1 (port 8787 by default) that compresses context sent to the model to save tokens (/hr-* commands edit the same file). Switching the device restarts the proxy, so requests in progress may be interrupted once.',
|
|
1190
|
+
headroomDesc: 'Headroom plugin: a local compression proxy on 127.0.0.1 (port 8787 by default) that compresses context sent to the model to save tokens (/hr-* commands edit the same file). Switching the compression device restarts the proxy, so requests in progress may be interrupted once.',
|
|
1107
1191
|
headroomBinMissing: 'The headroom program was not found, so the proxy cannot start. The settings below take effect once it is installed.',
|
|
1108
1192
|
hrInstallBin: 'Install headroom binary',
|
|
1109
1193
|
hrBinInstalled: 'headroom installed; reopen the app or a session and the proxy will start automatically',
|
|
@@ -1145,7 +1229,7 @@ const en = {
|
|
|
1145
1229
|
headroomWatcher: 'Watcher',
|
|
1146
1230
|
headroomWatcherOn: 'Running',
|
|
1147
1231
|
headroomWatcherOff: 'Stopped',
|
|
1148
|
-
headroomSaverDetect: 'Power-
|
|
1232
|
+
headroomSaverDetect: 'Power-save detection',
|
|
1149
1233
|
headroomRefresh: 'Refresh',
|
|
1150
1234
|
headroomStart: 'Start',
|
|
1151
1235
|
headroomRestart: 'Restart',
|
|
@@ -1155,28 +1239,32 @@ const en = {
|
|
|
1155
1239
|
headroomStoppedWarn: 'Proxy stopped; providers pointing at 127.0.0.1 cannot connect.',
|
|
1156
1240
|
headroomBackend: 'Compression device',
|
|
1157
1241
|
headroomBackendAuto: 'Auto · GPU first',
|
|
1158
|
-
headroomBackendCpu: 'Power
|
|
1242
|
+
headroomBackendCpu: 'Power-save · CPU first',
|
|
1159
1243
|
headroomBackendNative: ' (native)',
|
|
1160
|
-
headroomBackendDesc: 'Auto lets headroom pick the fastest device (CUDA/MPS); CPU forces CPU compression (power saving, no VRAM). Native headroom values (onnx, pytorch_mps, …) also work. Switching restarts the proxy to apply.',
|
|
1244
|
+
headroomBackendDesc: 'Auto lets headroom pick the fastest device (CUDA/MPS); CPU forces CPU compression (power saving, no VRAM). Native headroom values (onnx, pytorch_mps, …) also work. Switching restarts the proxy to apply the change.',
|
|
1161
1245
|
headroomPower: 'Power-save auto switch',
|
|
1162
1246
|
headroomPowerOff: 'Off',
|
|
1163
1247
|
headroomPowerOffDesc: 'No auto switching; always follow the compression device.',
|
|
1164
1248
|
headroomPowerBattery: 'On battery',
|
|
1165
1249
|
headroomPowerBatteryDesc: 'On battery (discharging) → CPU; switches back when plugged in.',
|
|
1166
|
-
headroomPowerSaver: 'Power
|
|
1167
|
-
headroomPowerSaverDesc: 'Only the system power
|
|
1250
|
+
headroomPowerSaver: 'Power saver',
|
|
1251
|
+
headroomPowerSaverDesc: 'Only the system power saver mode → CPU; back when it exits.',
|
|
1168
1252
|
hrCpuPinnedHint: 'The compression device is pinned to CPU, so power-save switching no longer changes anything.',
|
|
1169
1253
|
headroomInterval: 'Watch interval',
|
|
1170
1254
|
headroomIntervalDesc: 'Seconds between power checks (10–3600, default 60); applies from the next round.',
|
|
1171
1255
|
headroomSecUnit: 's',
|
|
1172
|
-
|
|
1256
|
+
serenaSwitch: 'Serena semantic search',
|
|
1257
|
+
serenaSwitchDesc: 'Registers the Serena MCP: symbol lookup and reference search instead of reading whole files, saving tokens. Written to the ZCode MCP config; takes effect after restarting the session.',
|
|
1258
|
+
serenaEnabled: 'Serena enabled; takes effect after restarting the session',
|
|
1259
|
+
serenaDisabled: 'Serena disabled; removed after restarting the session',
|
|
1260
|
+
upgradeCheck: 'Check for updates',
|
|
1173
1261
|
upgradeChecking: 'Checking…',
|
|
1174
1262
|
upgradeUpToDate: 'Up to date ({v})',
|
|
1175
1263
|
upgradeFound: '{v} available',
|
|
1176
1264
|
upgradeNow: 'Update',
|
|
1177
1265
|
upgradeRunning: 'Updating…',
|
|
1178
1266
|
upgradeStop: 'Stop',
|
|
1179
|
-
upgradeStopped: '
|
|
1267
|
+
upgradeStopped: 'Update stopped',
|
|
1180
1268
|
upgradeDone: 'Updated to {v}',
|
|
1181
1269
|
upgradeFinished: 'Update finished',
|
|
1182
1270
|
upgradeCheckFailed: 'Update check failed',
|
|
@@ -1193,9 +1281,9 @@ const en = {
|
|
|
1193
1281
|
aliasSaved: 'Alias updated.',
|
|
1194
1282
|
aliasCleared: 'Real name restored.',
|
|
1195
1283
|
aliasHint: 'The directory name on disk is unchanged: terminals, file managers and other path-based UI still show the real name.',
|
|
1196
|
-
featureProjectMenuDescNew: 'Open folder and copy path in the project "More" menu. Renaming is built
|
|
1284
|
+
featureProjectMenuDescNew: 'Open folder and copy path in the project "More" menu. Renaming is built into ZCode ≥ 3.16.1 ("Edit project"), so the custom alias is retired.',
|
|
1197
1285
|
aliasMigrateTitle: 'Migrate project aliases',
|
|
1198
|
-
aliasMigrateDesc: 'This ZCode supports renaming projects (project "More" menu → Edit project), so the custom alias feature is retired.
|
|
1286
|
+
aliasMigrateDesc: 'This ZCode supports renaming projects (project "More" menu → Edit project), so the custom alias feature is retired. Apply your saved aliases to the official project names by picking the projects below; only the project name changes, folders on disk are untouched.',
|
|
1199
1287
|
aliasMigrateItemHint: 'The alias becomes the project name (re-editable anytime via "Edit project"). Only unmarked entries can be checked; migrated, merged, deleted, not-on-this-machine and manually-renamed ones cannot — to rename those projects, use "Edit project" in the project "More" menu directly.',
|
|
1200
1288
|
aliasMigrateStateDone: 'Migrated',
|
|
1201
1289
|
aliasMigrateStateMerged: 'Merged into "{name}"',
|
|
@@ -1228,7 +1316,7 @@ const en = {
|
|
|
1228
1316
|
relocateTitle: 'Switch folder',
|
|
1229
1317
|
relocateDesc: 'Points this project at another folder: the sidebar, open tabs and local task history move along. The directory itself is not moved and no sessions are lost.',
|
|
1230
1318
|
relocateNewPathLabel: 'New folder',
|
|
1231
|
-
relocateConfirm: '
|
|
1319
|
+
relocateConfirm: 'Switch',
|
|
1232
1320
|
relocateHint: 'The target folder must already exist. Enter a path or use Browse; the UI refreshes automatically afterwards.',
|
|
1233
1321
|
relocateSuccess: 'Folder switched. Refreshing…',
|
|
1234
1322
|
relocateIndexSkipped: 'Folder switched, but the task history was not synced (SQLite support missing); old entries may still point to the old path.',
|
|
@@ -1265,12 +1353,18 @@ export function startLocaleResolver() {
|
|
|
1265
1353
|
.catch(() => { /* 取回失败:沿用 navigator.language 兜底 */ });
|
|
1266
1354
|
}
|
|
1267
1355
|
|
|
1356
|
+
let zhCache = { at: 0, v: null };
|
|
1268
1357
|
export function isZhLocale() {
|
|
1358
|
+
// 结果缓存 3 秒:一轮渲染里要调十几次,localStorage 每次读有成本;
|
|
1359
|
+
// 语言切换本来就会重载界面,短缓存跟得上
|
|
1360
|
+
if (zhCache.v != null && Date.now() - zhCache.at < 3000) return zhCache.v;
|
|
1269
1361
|
let pref = null;
|
|
1270
1362
|
try { pref = window.localStorage.getItem('zcode-locale-preference'); } catch { /* ignore */ }
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1363
|
+
const v = (pref === 'zh-CN' || pref === 'en-US') ? pref === 'zh-CN'
|
|
1364
|
+
: cachedSystemLocale ? cachedSystemLocale === 'zh-CN'
|
|
1365
|
+
: /^zh/i.test(navigator.language || 'zh-CN');
|
|
1366
|
+
zhCache = { at: Date.now(), v };
|
|
1367
|
+
return v;
|
|
1274
1368
|
}
|
|
1275
1369
|
|
|
1276
1370
|
export function t() {
|
|
@@ -1287,7 +1381,6 @@ const errEn = {
|
|
|
1287
1381
|
'agents-read': 'Failed to read AGENTS.md',
|
|
1288
1382
|
'agents-write': 'Failed to write AGENTS.md',
|
|
1289
1383
|
'config-save': 'Failed to save config',
|
|
1290
|
-
'settings-write': 'Failed to update setting.json',
|
|
1291
1384
|
'workspace-empty': 'Workspace not found or has no sessions',
|
|
1292
1385
|
'order-write': 'Failed to persist ordering',
|
|
1293
1386
|
'group-not-found': 'No group contains these sessions',
|
|
@@ -1301,10 +1394,10 @@ const errEn = {
|
|
|
1301
1394
|
'vision-read': 'Failed to read zcode-vision.json',
|
|
1302
1395
|
'vision-write': 'Failed to write zcode-vision.json',
|
|
1303
1396
|
'vision-test': 'Vision test failed',
|
|
1304
|
-
'proxy-invalid': '
|
|
1397
|
+
'proxy-invalid': 'The proxy must be a URL like http://127.0.0.1:7890, or be empty',
|
|
1305
1398
|
'proxy-not-set': 'Set the proxy address first',
|
|
1306
1399
|
'rtk-invalid': 'Invalid rtk config',
|
|
1307
|
-
'rtk-update': 'Failed to check rtk updates (GitHub Releases unreachable? Set a proxy in the Proxy tab)',
|
|
1400
|
+
'rtk-update': 'Failed to check for rtk updates (GitHub Releases unreachable? Set a proxy in the Proxy tab)',
|
|
1308
1401
|
'rtk-write': 'Failed to write the rtk config',
|
|
1309
1402
|
'headroom-read': 'Failed to read headroom.json',
|
|
1310
1403
|
'headroom-write': 'Failed to write headroom.json',
|
|
@@ -1313,9 +1406,13 @@ const errEn = {
|
|
|
1313
1406
|
'headroom-sh': 'sh not found; cannot run the headroom plugin script',
|
|
1314
1407
|
'headroom-action': 'The headroom action failed',
|
|
1315
1408
|
'headroom-status': 'Failed to read the headroom status',
|
|
1316
|
-
'headroom-
|
|
1409
|
+
'headroom-update': 'headroom update failed',
|
|
1410
|
+
'serena-config-unreadable': 'ZCode config is unparseable; aborted writing',
|
|
1411
|
+
'ZCODE_NOT_FOUND': 'ZCode executable not found',
|
|
1317
1412
|
'plugins-status': 'Failed to read the plugin list',
|
|
1318
1413
|
'plugins-update': 'Failed to update plugins',
|
|
1414
|
+
'plugins-market-git': 'Git is missing and GitHub is unreachable. Install Git or set a proxy in ZCode Pro → Proxy, then retry.',
|
|
1415
|
+
'plugins-market-network': 'Cannot reach GitHub. If your network needs a proxy, set it in ZCode Pro → Proxy, then retry.',
|
|
1319
1416
|
'sync-invalid': 'Invalid sync settings',
|
|
1320
1417
|
'sync-not-configured': 'Set the sync type to WebDAV and save the config first',
|
|
1321
1418
|
'sync-remote-missing': 'No synced data on the server yet; upload from another computer first',
|
|
@@ -1324,6 +1421,34 @@ const errEn = {
|
|
|
1324
1421
|
'sync-run': 'Sync failed',
|
|
1325
1422
|
'sync-file-invalid': 'Invalid backup file name',
|
|
1326
1423
|
'sync-export': 'Failed to save the backup to disk',
|
|
1424
|
+
// 壁纸(bg-*)
|
|
1425
|
+
'bg-folder': 'Invalid or unreadable wallpaper folder path',
|
|
1426
|
+
'bg-name': 'Invalid file name (must end with a supported extension and include no path separators)',
|
|
1427
|
+
'bg-data': 'Image data must be a data:image/*;base64 URL (upload videos via /bg/upload)',
|
|
1428
|
+
'bg-size': 'The file is too large',
|
|
1429
|
+
'bg-count': 'The wallpaper library is full; delete some files first',
|
|
1430
|
+
'bg-magic': 'The file content does not match its extension',
|
|
1431
|
+
'bg-write': 'Failed to write the wallpaper file',
|
|
1432
|
+
'bg-delete': 'Failed to delete the wallpaper file',
|
|
1433
|
+
// 视频转码
|
|
1434
|
+
'transcode-src': 'Invalid source video for transcoding',
|
|
1435
|
+
'transcode-fps': 'Unsupported frame-rate cap',
|
|
1436
|
+
'transcode-busy': 'The transcode queue is full; retry later',
|
|
1437
|
+
'no-ffmpeg': 'ffmpeg not found; the frame-rate cap is unavailable',
|
|
1438
|
+
// 配置/文件读写
|
|
1439
|
+
'config-unreadable': 'zcodepro.json is unreadable or corrupted; fix the config file first',
|
|
1440
|
+
'zcode-config-unreadable': 'The ZCode config is unparseable; write aborted',
|
|
1441
|
+
'read-error': 'Failed to read the file',
|
|
1442
|
+
'cli-not-found': 'ZCode CLI not found (resources/glm/zcode.cjs)',
|
|
1443
|
+
// 重定位(relocate)
|
|
1444
|
+
'new-not-found': 'The target folder does not exist',
|
|
1445
|
+
'protected-path': 'Refused: the path points inside the ZCode data directory',
|
|
1446
|
+
'same-path': 'The new location is the same as the current one',
|
|
1447
|
+
'export-cancelled': 'Canceled',
|
|
1448
|
+
// 其他
|
|
1449
|
+
'no-content': 'This session has no Q&A content yet',
|
|
1450
|
+
'title-gen-disabled': 'Auto rename is not enabled',
|
|
1451
|
+
'headroom-provider-config': 'ZCode provider config not found (v2/config.json)',
|
|
1327
1452
|
};
|
|
1328
1453
|
|
|
1329
1454
|
export function errText(res) {
|