zcode-pro 1.5.1 → 1.6.1
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 +3 -1
- package/README.md +4 -2
- package/dist/inject.js +1261 -268
- package/package.json +2 -2
- package/src/host/helper.mjs +667 -89
- package/src/host/main.mjs +53 -5
- package/src/host/setup.mjs +3 -3
- package/src/host/skill-stats.mjs +158 -0
- package/src/host/wallpaper.mjs +311 -0
- package/src/inject/core.js +142 -36
- package/src/inject/features/alias-migration.js +3 -3
- package/src/inject/features/alias.js +2 -2
- package/src/inject/features/composer-provider.js +82 -63
- package/src/inject/features/copy-path.js +1 -1
- package/src/inject/features/file-menu.js +3 -1
- package/src/inject/features/image-menu.js +2 -2
- package/src/inject/features/newtab-panels.js +2 -2
- package/src/inject/features/project-menu.js +1 -1
- package/src/inject/features/relocate-dialog.js +2 -1
- package/src/inject/features/session-switch.js +4 -4
- package/src/inject/features/settings-dialog.js +343 -89
- package/src/inject/features/task-order.js +1 -1
- package/src/inject/features/theme.js +586 -98
- package/src/inject/features/ws-running.js +6 -0
- package/src/inject/index.js +13 -1
- package/src/inject/ui.js +85 -17
package/src/inject/core.js
CHANGED
|
@@ -122,6 +122,39 @@ const zh = {
|
|
|
122
122
|
tabProxy: '代理',
|
|
123
123
|
tabBehavior: '行为',
|
|
124
124
|
tabAgents: '全局提示词',
|
|
125
|
+
tabZcode: 'ZCode CLI',
|
|
126
|
+
zcodeDesc: 'ZCode 自身的行为配置(写入 ~/.zcode/cli/config.json),保存后对新会话生效。',
|
|
127
|
+
zcodeStatsTitle: '技能清单检查',
|
|
128
|
+
zcodeStatsCounts: '技能 {total} 个(本地 {user} · 插件 {plugin})',
|
|
129
|
+
zcodeStatsChars: '完整清单约 {n} 字符',
|
|
130
|
+
zcodeBudgetDefaultTag: '(默认值)',
|
|
131
|
+
zcodeStatsDegraded: '超出预算:完整清单放不下,降级为仅名称,模型看不到技能描述',
|
|
132
|
+
zcodeStatsOk: '预算充足:清单带完整描述注入新会话',
|
|
133
|
+
zcodeStatsSuggest: '建议预算 {n} 字符(留 20% 余量)',
|
|
134
|
+
zcodeBudgetApply: '用建议值',
|
|
135
|
+
zcodeBudgetApplied: '清单预算已保存',
|
|
136
|
+
zcodeStatsNote: '按当前磁盘状态估算,不含各项目内的技能目录。',
|
|
137
|
+
zcodeSkillEnabled: '技能系统',
|
|
138
|
+
zcodeSkillEnabledDesc: 'skills.enabled:关闭后 ZCode 不再发现与注入任何技能',
|
|
139
|
+
zcodeSkillIncludeInstructions: '技能说明注入',
|
|
140
|
+
zcodeSkillIncludeInstructionsDesc: 'skills.includeInstructions:技能说明是否随清单一起注入',
|
|
141
|
+
zcodeSkillBudget: '技能清单预算(字符)',
|
|
142
|
+
zcodeSkillBudgetDesc: 'skills.metadataBudget:完整清单超过该长度就降级为仅名称,默认 20000',
|
|
143
|
+
zcodeSkillRoots: '额外技能目录',
|
|
144
|
+
zcodeSkillRootsDesc: 'skills.roots:每行一个目录,目录下的技能会被发现(~/.zcode/skills、~/.agents/skills 之外的补充)',
|
|
145
|
+
zcodeSave: '保存',
|
|
146
|
+
zcodeRootsSaved: '技能目录已保存',
|
|
147
|
+
zcodeFeatCompact: '会话压缩',
|
|
148
|
+
zcodeFeatCompactDesc: 'features.compact:上下文过长时压缩早期会话内容',
|
|
149
|
+
zcodeFeatRewind: '会话回溯',
|
|
150
|
+
zcodeFeatRewindDesc: 'features.rewind:回退到较早节点重新继续',
|
|
151
|
+
zcodeFeatSubagent: '子代理',
|
|
152
|
+
zcodeFeatSubagentDesc: 'features.subagent:派出子代理处理子任务',
|
|
153
|
+
zcodeFeatSkill: '技能工具',
|
|
154
|
+
zcodeFeatSkillDesc: 'features.skill:Skill 工具可用(还需开启技能系统)',
|
|
155
|
+
zcodeFeatMcp: 'MCP 工具',
|
|
156
|
+
zcodeFeatMcpDesc: 'features.mcp:使用 MCP 服务器提供的工具',
|
|
157
|
+
zcodeMemoryHint: '记忆不在此处:工作区记忆在官方 设置 → Agent 能力 → 记忆 中开关(含记忆详情查看)。',
|
|
125
158
|
agentsDesc: '写入 ~/.zcode/AGENTS.md,作为默认指令用于所有项目的每次会话;保存后从新会话起生效,项目内的 AGENTS.md 可补充或覆盖。内容超过 100KB 会被应用截断。',
|
|
126
159
|
agentsPlaceholder: '填写希望所有项目默认遵循的指令;清空并保存即移除全局提示词',
|
|
127
160
|
agentsSave: '保存',
|
|
@@ -163,7 +196,7 @@ const zh = {
|
|
|
163
196
|
syncIncludeZcp: 'ZCode Pro 设置',
|
|
164
197
|
syncIncludeZcpDesc: '功能开关、样式调整与代理设置;同步配置与凭据本身不参与同步。项目别名不同步(官方已支持改项目名)。',
|
|
165
198
|
syncIncludeModel: '模型设置',
|
|
166
|
-
syncIncludeModelDesc: '自定义供应商与模型配置(config.json 与 provider_config.json,含 API Key
|
|
199
|
+
syncIncludeModelDesc: '自定义供应商与模型配置(config.json 与 provider_config.json,含 API Key)与 Headroom 供应商映射(headroom.json,key 仅以 keyHash 存储、不含明文)。账号登录的凭据(如 BigModel 订阅)不参与同步,各机器用各自账号登录。',
|
|
167
200
|
syncUpload: '上传到云端',
|
|
168
201
|
syncDownload: '从云端下载',
|
|
169
202
|
syncUploading: '上传中…',
|
|
@@ -281,7 +314,7 @@ const zh = {
|
|
|
281
314
|
featureSandboxReclaimDesc: '沙箱满 64 个时自动释放最早的,新卡片不再打不开;旧卡重新打开所在会话即可恢复。',
|
|
282
315
|
featurePluginCardRetry: '插件卡片自动重试',
|
|
283
316
|
featurePluginCardRetryDesc: '因名额上限加载失败的插件卡片自动点击重新加载,名额空出后自动恢复。',
|
|
284
|
-
visionCardUi: '
|
|
317
|
+
visionCardUi: '思考过程显示 Vision 卡片',
|
|
285
318
|
pinnedToggleAria: '折叠/展开已置顶',
|
|
286
319
|
sidebarProjectSpacingName: '项目间距',
|
|
287
320
|
sidebarProjectSpacingDesc: '侧边栏中相邻项目行之间的视觉间距(含行内留白);设置后各分区(已置顶/项目/任务)之间的间距也统一为该值。',
|
|
@@ -315,7 +348,7 @@ const zh = {
|
|
|
315
348
|
themeBgRegionLeft: '左侧边栏',
|
|
316
349
|
themeBgRegionCenter: '中间区域',
|
|
317
350
|
themeBgRegionRight: '右侧边栏',
|
|
318
|
-
themeBgPane: '
|
|
351
|
+
themeBgPane: '壁纸',
|
|
319
352
|
themeSkinTitle: '皮肤',
|
|
320
353
|
themeSkinDesc: '知名编辑器主题配色,自动匹配 ZCode 的浅色 / 深色模式;默认保持 ZCode 原样,自定义在下方自行调色。',
|
|
321
354
|
themeSkinCustom: '自定义',
|
|
@@ -328,39 +361,55 @@ const zh = {
|
|
|
328
361
|
themeCustomFg: '正文',
|
|
329
362
|
themeCustomMuted: '次级文字',
|
|
330
363
|
themeCustomAccent: '强调色',
|
|
331
|
-
themeBgDesc: '
|
|
332
|
-
themeBgModeNone: '
|
|
364
|
+
themeBgDesc: '壁纸支持图片、视频、网页三类,铺在界面后方;来源可选本地图库、文件夹(定时轮换)、图片网址(定时刷新)或网页地址,左栏 / 中栏 / 右栏可分区独立设置(仅静态图);侧栏、会话流、输入框透出画面,弹窗菜单保持不透明保可读。本地图库随 WebDAV 同步上传(覆盖式,不留历史版本)。',
|
|
365
|
+
themeBgModeNone: '无壁纸',
|
|
333
366
|
themeBgModeLibrary: '本地图库',
|
|
334
367
|
themeBgModeFolder: '文件夹',
|
|
335
|
-
themeBgModeUrl: '
|
|
368
|
+
themeBgModeUrl: '图片网址',
|
|
369
|
+
themeBgModeWeb: '网页',
|
|
336
370
|
themeBgLibrary: '我的图库',
|
|
337
|
-
themeBgUpload: '
|
|
338
|
-
themeBgEmpty: '
|
|
371
|
+
themeBgUpload: '上传图片/视频',
|
|
372
|
+
themeBgEmpty: '还没有上传文件;图片支持 png / jpg / webp / gif / bmp / avif(10MB 以内),视频支持 mp4 / webm / mov(200MB 以内)',
|
|
339
373
|
themeBgDelete: '删除',
|
|
340
|
-
themeBgNoneHint: '
|
|
374
|
+
themeBgNoneHint: '选择一种壁纸来源;图库和文件夹可定时轮换,图片网址可配合随机图 API 定时刷新。',
|
|
341
375
|
themeBgFolderPick: '浏览',
|
|
342
|
-
themeBgFolderPickTitle: '
|
|
343
|
-
themeBgFolderHint: '
|
|
376
|
+
themeBgFolderPickTitle: '选择壁纸文件夹',
|
|
377
|
+
themeBgFolderHint: '选择一个装壁纸的文件夹,文件原地读取不复制。',
|
|
344
378
|
themeBgFolderRandom: '随机顺序',
|
|
345
379
|
themeBgIntervalHint: '切换间隔(分钟)',
|
|
346
380
|
themeBgIntervalUnit: '分钟,0 = 不切换',
|
|
347
|
-
themeBgFolderCount: '文件夹里有 {n}
|
|
348
|
-
themeBgFolderMissing: '
|
|
381
|
+
themeBgFolderCount: '文件夹里有 {n} 个壁纸文件,定时轮换中。',
|
|
382
|
+
themeBgFolderMissing: '文件夹不存在或里面没有壁纸文件。',
|
|
349
383
|
themeBgUrlHint: '定时刷新适合随机图 API(每次请求返回不同图);刷新时带缓存参数避免命中缓存。',
|
|
350
384
|
themeBgUrlIntervalHint: '刷新间隔(分钟)',
|
|
351
385
|
themeBgUrlInvalid: '网址需以 http(s):// 开头',
|
|
386
|
+
themeBgWebHint: '网页壁纸用沙箱 iframe 铺在界面后方,页面需自行播放动画或视频;仅页面自身透明底时能透出壁纸,部分依赖登录态的页面无法显示。',
|
|
352
387
|
themeBgFit: '缩放方式',
|
|
353
388
|
themeBgFitCover: '填满',
|
|
354
389
|
themeBgFitContain: '适应',
|
|
355
390
|
themeBgFitFill: '拉伸',
|
|
356
391
|
themeBgFitTile: '平铺',
|
|
357
392
|
themeBgMask: '遮罩不透明度',
|
|
358
|
-
themeBgMaskHint: '
|
|
359
|
-
themeBgMaskHint2: '
|
|
360
|
-
themeBgBlur: '
|
|
393
|
+
themeBgMaskHint: '数值越高,画面越向主题背景色淡化,文字对比越清晰',
|
|
394
|
+
themeBgMaskHint2: '画面向主题背景色淡化的程度',
|
|
395
|
+
themeBgBlur: '画面模糊',
|
|
361
396
|
themeBgPanel: '面板不透明度',
|
|
362
|
-
themeBgPanelHint: '
|
|
363
|
-
|
|
397
|
+
themeBgPanelHint: '侧栏、面板与标签栏的不透明程度。越低,透出的画面越多。',
|
|
398
|
+
themeBgPlayback: '播放',
|
|
399
|
+
themeBgVolume: '音量',
|
|
400
|
+
themeBgVolumeHint: '视频壁纸的音轨音量,0 = 静音(默认)',
|
|
401
|
+
themeBgRate: '倍速',
|
|
402
|
+
themeBgFps: '帧率上限',
|
|
403
|
+
themeBgFpsOff: '原始帧率',
|
|
404
|
+
themeBgFpsHint: '对视频壁纸重编码抽帧以省资源,需要 ffmpeg;未安装时保持原始帧率。',
|
|
405
|
+
themeBgTransition: '切换转场',
|
|
406
|
+
themeBgTransitionCut: '硬切',
|
|
407
|
+
themeBgTransitionFade: '淡入淡出',
|
|
408
|
+
themeBgPause: '暂停条件',
|
|
409
|
+
themeBgPauseHidden: '窗口最小化时',
|
|
410
|
+
themeBgPauseBlur: '窗口失焦时',
|
|
411
|
+
themeBgPauseBattery: '电池供电时',
|
|
412
|
+
themeBgDeletedActive: '当前壁纸已删除,已自动停用壁纸',
|
|
364
413
|
tableCopyBtn: '复制表格',
|
|
365
414
|
tableCopied: '表格已复制',
|
|
366
415
|
sbItemCtx: '上下文占用',
|
|
@@ -442,7 +491,11 @@ const zh = {
|
|
|
442
491
|
tabVision: 'Vision',
|
|
443
492
|
visionDesc: '主模型不支持图片输入时(如 glm-5.3),自动把消息里的图片交给下面的视觉模型识别,把描述带给主模型(zcode-vision 插件;/vision-* 命令编辑同一配置)。',
|
|
444
493
|
visionEnabled: '启用',
|
|
445
|
-
visionForceIntercept: '
|
|
494
|
+
visionForceIntercept: '主模型',
|
|
495
|
+
visionForceInterceptAuto: '不能识图就使用插件',
|
|
496
|
+
visionForceInterceptTrue: '始终使用插件',
|
|
497
|
+
visionForceInterceptFalse: '不使用插件',
|
|
498
|
+
visionForceInterceptHint: '不能识图就使用插件 = 跟随 ZCode「模型设置」里该模型的图片开关:开 = 模型自看不重复识别,关 = 走识别代理(tool 模式出识别卡片);始终使用插件 = 能看图也强制走识别代理(双重识别换卡片);不使用插件 = 能看图就放行(不能识图的模型仍走识别代理)',
|
|
446
499
|
visionMode: '链模式',
|
|
447
500
|
visionModeFallback: '依次尝试',
|
|
448
501
|
visionModeFallbackDesc: '前一个失败才试下一个,任一成功即止(主力 + 备用)。',
|
|
@@ -633,6 +686,39 @@ const en = {
|
|
|
633
686
|
tabProxy: 'Proxy',
|
|
634
687
|
tabBehavior: 'Behavior',
|
|
635
688
|
tabAgents: 'Global Prompt',
|
|
689
|
+
tabZcode: 'ZCode CLI',
|
|
690
|
+
zcodeDesc: 'ZCode behavior settings (written to ~/.zcode/cli/config.json); takes effect for new sessions.',
|
|
691
|
+
zcodeStatsTitle: 'Skill listing check',
|
|
692
|
+
zcodeStatsCounts: '{total} skills ({user} local · {plugin} plugin)',
|
|
693
|
+
zcodeStatsChars: 'Full listing ≈ {n} characters',
|
|
694
|
+
zcodeBudgetDefaultTag: ' (default)',
|
|
695
|
+
zcodeStatsDegraded: 'Over budget: the listing degrades to names only, so the model cannot see skill descriptions',
|
|
696
|
+
zcodeStatsOk: 'Within budget: the full listing with descriptions is injected into new sessions',
|
|
697
|
+
zcodeStatsSuggest: 'Suggested budget {n} characters (with 20% margin)',
|
|
698
|
+
zcodeBudgetApply: 'Use suggested',
|
|
699
|
+
zcodeBudgetApplied: 'Listing budget saved.',
|
|
700
|
+
zcodeStatsNote: 'Estimated from the current disk state; per-project skill directories are not counted.',
|
|
701
|
+
zcodeSkillEnabled: 'Skill system',
|
|
702
|
+
zcodeSkillEnabledDesc: 'skills.enabled: when off, ZCode discovers and injects no skills',
|
|
703
|
+
zcodeSkillIncludeInstructions: 'Skill instructions injection',
|
|
704
|
+
zcodeSkillIncludeInstructionsDesc: 'skills.includeInstructions: whether skill instructions are injected along with the listing',
|
|
705
|
+
zcodeSkillBudget: 'Skill listing budget (characters)',
|
|
706
|
+
zcodeSkillBudgetDesc: 'skills.metadataBudget: the listing degrades to names only beyond this length; default 20000',
|
|
707
|
+
zcodeSkillRoots: 'Extra skill directories',
|
|
708
|
+
zcodeSkillRootsDesc: 'skills.roots: one directory per line; skills under them are discovered (beyond ~/.zcode/skills and ~/.agents/skills)',
|
|
709
|
+
zcodeSave: 'Save',
|
|
710
|
+
zcodeRootsSaved: 'Skill directories saved.',
|
|
711
|
+
zcodeFeatCompact: 'Compaction',
|
|
712
|
+
zcodeFeatCompactDesc: 'features.compact: compact earlier conversation when the context grows too long',
|
|
713
|
+
zcodeFeatRewind: 'Rewind',
|
|
714
|
+
zcodeFeatRewindDesc: 'features.rewind: roll back to an earlier point and continue from there',
|
|
715
|
+
zcodeFeatSubagent: 'Subagents',
|
|
716
|
+
zcodeFeatSubagentDesc: 'features.subagent: dispatch subagents for subtasks',
|
|
717
|
+
zcodeFeatSkill: 'Skill tool',
|
|
718
|
+
zcodeFeatSkillDesc: 'features.skill: the Skill tool is available (the skill system must also be on)',
|
|
719
|
+
zcodeFeatMcp: 'MCP tools',
|
|
720
|
+
zcodeFeatMcpDesc: 'features.mcp: use tools provided by MCP servers',
|
|
721
|
+
zcodeMemoryHint: 'Memory is not here: workspace memory is toggled in the official settings under Settings → Agent capabilities → Memory (with the memory viewer).',
|
|
636
722
|
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.',
|
|
637
723
|
agentsPlaceholder: 'Instructions followed by all projects by default; save empty to remove the global prompt',
|
|
638
724
|
agentsSave: 'Save',
|
|
@@ -674,7 +760,7 @@ const en = {
|
|
|
674
760
|
syncIncludeZcp: 'ZCode Pro settings',
|
|
675
761
|
syncIncludeZcpDesc: 'Feature toggles, style adjustments and the proxy setting; the sync config and credentials themselves are never synced. Project aliases are not synced (renaming is built in now).',
|
|
676
762
|
syncIncludeModel: 'Model settings',
|
|
677
|
-
syncIncludeModelDesc: 'Custom providers and model config (config.json and provider_config.json, API keys included). Account sign-in credentials (e.g. the BigModel subscription) are not synced; each computer signs in with its own account.',
|
|
763
|
+
syncIncludeModelDesc: 'Custom providers and model config (config.json and provider_config.json, API keys included) and the Headroom provider map (headroom.json; keys are stored as keyHashes, never in plaintext). Account sign-in credentials (e.g. the BigModel subscription) are not synced; each computer signs in with its own account.',
|
|
678
764
|
syncUpload: 'Upload',
|
|
679
765
|
syncDownload: 'Download',
|
|
680
766
|
syncUploading: 'Uploading…',
|
|
@@ -826,9 +912,9 @@ const en = {
|
|
|
826
912
|
themeBgRegionLeft: 'Left sidebar',
|
|
827
913
|
themeBgRegionCenter: 'Center area',
|
|
828
914
|
themeBgRegionRight: 'Right sidebar',
|
|
829
|
-
themeBgPane: '
|
|
915
|
+
themeBgPane: 'Wallpaper',
|
|
830
916
|
themeSkinTitle: 'Skins',
|
|
831
|
-
themeSkinDesc: 'Famous editor theme palettes, auto-matching ZCode
|
|
917
|
+
themeSkinDesc: 'Famous editor theme palettes, auto-matching ZCode’s light / dark mode; "Default" keeps ZCode as-is, "Custom" is tuned below.',
|
|
832
918
|
themeSkinCustom: 'Custom',
|
|
833
919
|
themeCustomTitle: 'Custom theme',
|
|
834
920
|
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.',
|
|
@@ -839,39 +925,55 @@ const en = {
|
|
|
839
925
|
themeCustomFg: 'Text',
|
|
840
926
|
themeCustomMuted: 'Muted text',
|
|
841
927
|
themeCustomAccent: 'Accent',
|
|
842
|
-
themeBgDesc: 'Sources: local library, folder (rotate on a timer)
|
|
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 composer reveal the wallpaper while menus and dialogs stay opaque. The library uploads with the zcode-pro sync group (overwrite, no history versions).',
|
|
843
929
|
themeBgModeNone: 'None',
|
|
844
930
|
themeBgModeLibrary: 'Library',
|
|
845
931
|
themeBgModeFolder: 'Folder',
|
|
846
|
-
themeBgModeUrl: 'URL',
|
|
932
|
+
themeBgModeUrl: 'Image URL',
|
|
933
|
+
themeBgModeWeb: 'Web page',
|
|
847
934
|
themeBgLibrary: 'My library',
|
|
848
|
-
themeBgUpload: 'Upload',
|
|
849
|
-
themeBgEmpty: '
|
|
935
|
+
themeBgUpload: 'Upload images/videos',
|
|
936
|
+
themeBgEmpty: 'Nothing uploaded yet. Images: png / jpg / webp / gif / bmp / avif (up to 10MB); videos: mp4 / webm / mov (up to 200MB)',
|
|
850
937
|
themeBgDelete: 'Delete',
|
|
851
|
-
themeBgNoneHint: 'Pick a
|
|
938
|
+
themeBgNoneHint: 'Pick a wallpaper source; library and folder rotate on a timer, image URLs refresh on a timer for random-image APIs.',
|
|
852
939
|
themeBgFolderPick: 'Browse',
|
|
853
940
|
themeBgFolderPickTitle: 'Choose a wallpaper folder',
|
|
854
|
-
themeBgFolderHint: 'Pick a folder of wallpapers;
|
|
941
|
+
themeBgFolderHint: 'Pick a folder of wallpapers; files are read in place, not copied.',
|
|
855
942
|
themeBgFolderRandom: 'Random order',
|
|
856
943
|
themeBgIntervalHint: 'Switch interval (minutes)',
|
|
857
944
|
themeBgIntervalUnit: 'min, 0 = off',
|
|
858
|
-
themeBgFolderCount: '{n}
|
|
859
|
-
themeBgFolderMissing: 'Folder missing or contains no
|
|
945
|
+
themeBgFolderCount: '{n} wallpaper files in the folder, rotating on the timer.',
|
|
946
|
+
themeBgFolderMissing: 'Folder missing or contains no wallpaper files.',
|
|
860
947
|
themeBgUrlHint: 'Timed refresh suits random-image APIs (each request returns a new image); a cache-buster is appended on refresh.',
|
|
861
948
|
themeBgUrlIntervalHint: 'Refresh interval (minutes)',
|
|
862
949
|
themeBgUrlInvalid: 'URL must start with http(s)://',
|
|
950
|
+
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.',
|
|
863
951
|
themeBgFit: 'Fit',
|
|
864
952
|
themeBgFitCover: 'Fill',
|
|
865
953
|
themeBgFitContain: 'Fit',
|
|
866
954
|
themeBgFitFill: 'Stretch',
|
|
867
955
|
themeBgFitTile: 'Tile',
|
|
868
956
|
themeBgMask: 'Mask opacity',
|
|
869
|
-
themeBgMaskHint: 'Higher values fade the
|
|
870
|
-
themeBgMaskHint2: 'How much the
|
|
871
|
-
themeBgBlur: '
|
|
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
|
+
themeBgBlur: 'Wallpaper blur',
|
|
872
960
|
themeBgPanel: 'Panel opacity',
|
|
873
|
-
themeBgPanelHint: 'Opacity of sidebar, panels and tab bar. Lower reveals more of the
|
|
874
|
-
|
|
961
|
+
themeBgPanelHint: 'Opacity of sidebar, panels and tab bar. Lower reveals more of the wallpaper.',
|
|
962
|
+
themeBgPlayback: 'Playback',
|
|
963
|
+
themeBgVolume: 'Volume',
|
|
964
|
+
themeBgVolumeHint: 'Audio track volume of video wallpapers, 0 = muted (default)',
|
|
965
|
+
themeBgRate: 'Speed',
|
|
966
|
+
themeBgFps: 'FPS cap',
|
|
967
|
+
themeBgFpsOff: 'Native',
|
|
968
|
+
themeBgFpsHint: 'Re-encodes video wallpapers to a lower frame rate to save resources; needs ffmpeg, otherwise the native rate is kept.',
|
|
969
|
+
themeBgTransition: 'Transition',
|
|
970
|
+
themeBgTransitionCut: 'Cut',
|
|
971
|
+
themeBgTransitionFade: 'Fade',
|
|
972
|
+
themeBgPause: 'Pause when',
|
|
973
|
+
themeBgPauseHidden: 'Window minimized',
|
|
974
|
+
themeBgPauseBlur: 'Window unfocused',
|
|
975
|
+
themeBgPauseBattery: 'On battery',
|
|
976
|
+
themeBgDeletedActive: 'Active wallpaper was deleted; wallpaper disabled',
|
|
875
977
|
tableCopyBtn: 'Copy table',
|
|
876
978
|
tableCopied: 'Table copied',
|
|
877
979
|
sbItemCtx: 'Context usage',
|
|
@@ -953,7 +1055,11 @@ const en = {
|
|
|
953
1055
|
tabVision: 'Vision',
|
|
954
1056
|
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).',
|
|
955
1057
|
visionEnabled: 'Enable',
|
|
956
|
-
visionForceIntercept: '
|
|
1058
|
+
visionForceIntercept: 'Main model',
|
|
1059
|
+
visionForceInterceptAuto: "Use plugin only if model can't see images",
|
|
1060
|
+
visionForceInterceptTrue: 'Always use plugin',
|
|
1061
|
+
visionForceInterceptFalse: 'Never use plugin',
|
|
1062
|
+
visionForceInterceptHint: "Use plugin only if model can't 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 plugin = forced double recognition for the card; Never use plugin = let capable models see images (models that can't still go through the plugin)",
|
|
957
1063
|
visionMode: 'Chain mode',
|
|
958
1064
|
visionModeFallback: 'Fallback',
|
|
959
1065
|
visionModeFallbackDesc: 'Try in order until one succeeds (primary + backup).',
|
|
@@ -311,7 +311,7 @@ export function openMigrationDialog() {
|
|
|
311
311
|
clearConfigCache();
|
|
312
312
|
renderList();
|
|
313
313
|
window.dispatchEvent(new CustomEvent('zcodepro:aliases-changed'));
|
|
314
|
-
if (ok === dead.length) showToast(L.aliasMigrateDeadCleared.replace('{n}', String(ok)));
|
|
314
|
+
if (ok === dead.length) showToast(L.aliasMigrateDeadCleared.replace('{n}', String(ok)), 'success');
|
|
315
315
|
else showToast(L.aliasMigrateDeadClearFailed, 'error');
|
|
316
316
|
};
|
|
317
317
|
|
|
@@ -351,9 +351,9 @@ export function openMigrationDialog() {
|
|
|
351
351
|
decide();
|
|
352
352
|
close();
|
|
353
353
|
if (!failed.length) {
|
|
354
|
-
showToast(L.aliasMigrateDone.replace('{n}', String(ok)), '
|
|
354
|
+
showToast(L.aliasMigrateDone.replace('{n}', String(ok)), 'success');
|
|
355
355
|
} else if (ok) {
|
|
356
|
-
showToast(L.aliasMigratePartial.replace('{n}', String(ok)).replace('{m}', String(failed.length)), '
|
|
356
|
+
showToast(L.aliasMigratePartial.replace('{n}', String(ok)).replace('{m}', String(failed.length)), 'warning');
|
|
357
357
|
} else {
|
|
358
358
|
showToast(L.aliasMigrateAllFailed, 'error');
|
|
359
359
|
}
|
|
@@ -174,7 +174,7 @@ export function openAliasDialog(project) {
|
|
|
174
174
|
close();
|
|
175
175
|
clearConfigCache();
|
|
176
176
|
await refreshAliases();
|
|
177
|
-
showToast(name ? L.aliasSaved : L.aliasCleared);
|
|
177
|
+
showToast(name ? L.aliasSaved : L.aliasCleared, 'success');
|
|
178
178
|
return;
|
|
179
179
|
}
|
|
180
180
|
showToast((L.failed) + ': ' + (errText(res) || L.retryHint), 'error');
|
|
@@ -203,7 +203,7 @@ export function openAliasDialog(project) {
|
|
|
203
203
|
close();
|
|
204
204
|
clearConfigCache();
|
|
205
205
|
await refreshAliases();
|
|
206
|
-
showToast(L.aliasCleared);
|
|
206
|
+
showToast(L.aliasCleared, 'success');
|
|
207
207
|
} else showToast((L.failed) + ': ' + (errText(res) || L.retryHint), 'error');
|
|
208
208
|
}));
|
|
209
209
|
}
|
|
@@ -8,86 +8,99 @@ import { t, getConfig } from '../core.js';
|
|
|
8
8
|
let installed = false;
|
|
9
9
|
let enabled = true; // helper features.composerProvider(默认开)
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
//
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
const TRIGGER_SEL = '[data-testid="chat-model-select-trigger"]';
|
|
12
|
+
|
|
13
|
+
// 从 aria-label 拆出 “供应商 / 模型”。label 形态:
|
|
14
|
+
// "<供应商>/<模型名> <附加说明(如 最高)>";有的供应商名本身不含 /、
|
|
15
|
+
// 有的官方项整条没有 /(旧版内置项)——没有 / 时 provider 为 null:
|
|
16
|
+
// 补名没得补(调用方跳过),但还原还认得出模型名
|
|
17
|
+
function labelParts(label) {
|
|
18
|
+
const text = (label || '').trim();
|
|
19
|
+
if (!text) return null;
|
|
20
|
+
const i = text.indexOf('/');
|
|
21
|
+
if (i > 0) {
|
|
22
|
+
const provider = text.slice(0, i).trim();
|
|
23
|
+
const model = text.slice(i + 1).trim().split(/\s+/)[0];
|
|
24
|
+
return provider && model ? { provider, model } : null;
|
|
25
|
+
}
|
|
26
|
+
return { provider: null, model: text.split(/\s+/)[0] };
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// 模型名文本 span:官方结构是 外层 title 容器 > 内层 title 层 > 纯文本 span,
|
|
30
|
+
// 按“在最内层 title 层里、自己不带 title、没有子元素”识别;同级的
|
|
31
|
+
// “最高/开启”说明 span 不在 title 层里,不能碰(首版误把它也替换成全名)。
|
|
32
|
+
// 换模型时旧文本可能还在退场动画里没摘掉,按文本内容认目标:等于模型名
|
|
33
|
+
//(官方原文)、或以 “ / 模型名” 结尾(此前补过供应商名的文本)才算
|
|
34
|
+
function holdersOf(btn, model) {
|
|
35
|
+
const innermost = [...btn.querySelectorAll('span[title]')].filter((sp) => !sp.querySelector('span[title]'));
|
|
36
|
+
const holders = [];
|
|
37
|
+
for (const sp of innermost) {
|
|
38
|
+
for (const el of sp.querySelectorAll('span:not([title])')) {
|
|
39
|
+
if (el.querySelector('span')) continue;
|
|
40
|
+
const text = el.textContent.trim();
|
|
41
|
+
if (!text) continue;
|
|
42
|
+
if (text === model || text.endsWith(` / ${model}`)) holders.push(el);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return holders;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// 改文本优先改文本节点本身:直接 textContent 覆盖会把应用持有的文本节点换成
|
|
49
|
+
// 新节点,它后续的更新就落不到可见文本上了
|
|
50
|
+
function setText(el, text) {
|
|
51
|
+
const node = el.firstChild;
|
|
52
|
+
if (node && node.nodeType === 3 && !node.nextSibling) node.nodeValue = text;
|
|
53
|
+
else el.textContent = text;
|
|
22
54
|
}
|
|
23
55
|
|
|
24
56
|
function apply() {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if (!model) continue;
|
|
35
|
-
for (const sp of btn.querySelectorAll('span[title]')) sp.setAttribute('title', model);
|
|
36
|
-
for (const el of btn.querySelectorAll('span[title] span:not([title])')) {
|
|
37
|
-
if (!el.querySelector('span') && el.textContent.includes('/')) el.textContent = model;
|
|
57
|
+
for (const btn of document.querySelectorAll(TRIGGER_SEL)) {
|
|
58
|
+
const parts = labelParts(btn.getAttribute('aria-label') || '');
|
|
59
|
+
if (!parts) continue;
|
|
60
|
+
const holders = holdersOf(btn, parts.model);
|
|
61
|
+
if (enabled) {
|
|
62
|
+
if (!parts.provider || !holders.length) continue;
|
|
63
|
+
const target = `${parts.provider} / ${parts.model}`;
|
|
64
|
+
for (const el of holders) {
|
|
65
|
+
if (el.textContent.trim() !== target) setText(el, target);
|
|
38
66
|
}
|
|
67
|
+
// title 跟显示文本一致,悬停可见全名
|
|
68
|
+
for (const sp of btn.querySelectorAll('span[title]')) {
|
|
69
|
+
if (sp.getAttribute('title') !== target) sp.setAttribute('title', target);
|
|
70
|
+
}
|
|
71
|
+
btn.dataset.zcodeproProviderShown = '1';
|
|
72
|
+
} else if (btn.dataset.zcodeproProviderShown) {
|
|
73
|
+
// 关闭时把补过的文本与 title 还原为官方模型名,不必等应用重渲染
|
|
74
|
+
for (const el of holders) {
|
|
75
|
+
if (el.textContent.trim() !== parts.model) setText(el, parts.model);
|
|
76
|
+
}
|
|
77
|
+
for (const sp of btn.querySelectorAll('span[title]')) sp.setAttribute('title', parts.model);
|
|
39
78
|
delete btn.dataset.zcodeproProviderShown;
|
|
40
79
|
}
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
for (const btn of document.querySelectorAll('[data-testid="chat-model-select-trigger"]')) {
|
|
44
|
-
// 只处理 a[data-composer-combined-model] 主触发器;aria-label 缺失时跳过
|
|
45
|
-
const label = btn.getAttribute('aria-label') || '';
|
|
46
|
-
const display = labelToDisplay(label);
|
|
47
|
-
if (!display) continue;
|
|
48
|
-
// 显示 span 是嵌套两层的 title 结构(外层裁剪容器 + 内层相对定位层),
|
|
49
|
-
// 文本都在最内层 span;只改文本与 title,不动结构
|
|
50
|
-
// 官方结构:外层 title 容器 > 内层 title 层 > 纯文本 span(模型名)。
|
|
51
|
-
// 只改 title 链内的文本——按“祖先带 title”识别模型名文本;同级的
|
|
52
|
-
// “最高/开启”说明 span(无 title 祖先链上的 title 层)不属于模型名,
|
|
53
|
-
// 不能碰(首版误把它也替换成全名)
|
|
54
|
-
const titleSpans = [...btn.querySelectorAll('span[title]')];
|
|
55
|
-
if (!titleSpans.length) continue;
|
|
56
|
-
const innermost = titleSpans.filter((sp) => !sp.querySelector('span[title]'));
|
|
57
|
-
if (!innermost.length) continue;
|
|
58
|
-
const holders = [];
|
|
59
|
-
for (const sp of innermost) {
|
|
60
|
-
sp.querySelectorAll('span:not([title])').forEach((el) => {
|
|
61
|
-
if (!el.querySelector('span') && el.textContent.trim() && !el.textContent.includes('/')) holders.push(el);
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
if (!holders.length) continue;
|
|
65
|
-
for (const sp of titleSpans) {
|
|
66
|
-
if (sp.getAttribute('title') !== display) sp.setAttribute('title', display);
|
|
67
|
-
}
|
|
68
|
-
for (const el of holders) el.textContent = display;
|
|
69
|
-
btn.dataset.zcodeproProviderShown = '1';
|
|
70
80
|
}
|
|
71
81
|
}
|
|
72
82
|
|
|
73
83
|
export function startComposerProvider() {
|
|
74
84
|
if (installed || typeof document === 'undefined') return;
|
|
75
85
|
installed = true;
|
|
76
|
-
//
|
|
77
|
-
//
|
|
78
|
-
const COMPOSER_SEL = '[data-composer-layout], [data-composer-leading-content], [data-testid="chat-model-select-trigger"]';
|
|
86
|
+
// 先过滤再调度:无关变更直接忽略,连去抖定时器都不排——流式输出的高频
|
|
87
|
+
// 文本变更不会叫醒本模块
|
|
88
|
+
const COMPOSER_SEL = '[data-composer-layout], [data-composer-leading-actions], [data-composer-leading-content], [data-testid="chat-model-select-trigger"]';
|
|
79
89
|
const relevant = (muts) => {
|
|
80
90
|
for (const m of muts) {
|
|
81
91
|
if (m.type === 'childList') {
|
|
82
92
|
for (const n of [...m.addedNodes, ...m.removedNodes]) {
|
|
83
|
-
|
|
93
|
+
// 触发器内部的节点增删也算:换模型、开合下拉都把整段标签换成新节点,
|
|
94
|
+
// 那一批次里没有别的动静,漏掉就等不到下次补名
|
|
95
|
+
if (n instanceof Element && (n.matches?.(COMPOSER_SEL) || n.querySelector?.(COMPOSER_SEL) || n.closest?.(TRIGGER_SEL))) return true;
|
|
84
96
|
}
|
|
97
|
+
} else if (m.type === 'attributes') {
|
|
98
|
+
// 只认触发器按钮身上的属性(换模型就改它的 aria-label /
|
|
99
|
+
// data-model-current-value);同名模型换供应商时文本一动不动,全靠这里
|
|
100
|
+
if (m.target instanceof Element && m.target.closest?.(TRIGGER_SEL)) return true;
|
|
85
101
|
} else if (m.type === 'characterData') {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
if (el.matches?.('[data-composer-layout], [data-composer-leading-actions], [data-composer-leading-content]')) return true;
|
|
89
|
-
el = el.parentElement;
|
|
90
|
-
}
|
|
102
|
+
const el = m.target.parentElement?.closest?.(COMPOSER_SEL);
|
|
103
|
+
if (el) return true;
|
|
91
104
|
}
|
|
92
105
|
}
|
|
93
106
|
return false;
|
|
@@ -107,6 +120,12 @@ export function startComposerProvider() {
|
|
|
107
120
|
}).catch(() => {});
|
|
108
121
|
});
|
|
109
122
|
const observer = new MutationObserver((muts) => { if (enabled && relevant(muts)) schedule(); });
|
|
110
|
-
observer.observe(document.body, {
|
|
123
|
+
observer.observe(document.body, {
|
|
124
|
+
childList: true,
|
|
125
|
+
subtree: true,
|
|
126
|
+
characterData: true,
|
|
127
|
+
attributes: true,
|
|
128
|
+
attributeFilter: ['aria-label', 'data-model-current-value'], // 这两个只有应用会写,不认 title,避免自己改 title 叫醒自己
|
|
129
|
+
});
|
|
111
130
|
apply();
|
|
112
131
|
}
|
|
@@ -28,7 +28,7 @@ export async function appendCopyPathItem(menu, anchorItem, project) {
|
|
|
28
28
|
|
|
29
29
|
async function copyText(text) {
|
|
30
30
|
const L = t();
|
|
31
|
-
if (await copyToClipboard(text)) showToast(L.pathCopied);
|
|
31
|
+
if (await copyToClipboard(text)) showToast(L.pathCopied, 'success');
|
|
32
32
|
else showToast(L.pathCopyFailed, 'error');
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -58,7 +58,9 @@ function pathFromReactFiber(el) {
|
|
|
58
58
|
try {
|
|
59
59
|
const key = Object.keys(el).find((k) => k.startsWith('__reactFiber$'));
|
|
60
60
|
let fiber = key ? el[key] : null;
|
|
61
|
-
|
|
61
|
+
// 层数上限 100:预览卡片“打开 ▾”下拉的触发器到 OpenSplitButton(target.path)实测 41 层,
|
|
62
|
+
// Radix 的 provider/Slot 中间层多,40 会差一层拿不到路径
|
|
63
|
+
for (let i = 0; fiber && i < 100; i++, fiber = fiber.return) {
|
|
62
64
|
const props = fiber.memoizedProps;
|
|
63
65
|
if (!props || typeof props !== 'object') continue;
|
|
64
66
|
for (const k of ['target', 'fileLink', 'row']) {
|
|
@@ -116,11 +116,11 @@ async function copyImage(img, preBlob) {
|
|
|
116
116
|
if (!blob) throw new Error('empty image');
|
|
117
117
|
if (blob.type !== 'image/png') blob = await toPng(blob);
|
|
118
118
|
await navigator.clipboard.write([new ClipboardItem({ 'image/png': blob })]);
|
|
119
|
-
showToast(L.imageCopied);
|
|
119
|
+
showToast(L.imageCopied, 'success');
|
|
120
120
|
} catch {
|
|
121
121
|
// 部分 Electron/Linux 组合上 navigator.clipboard 写图片报 DataError(写文本正常),
|
|
122
122
|
// 回退 execCommand:选中 <img> 后复制,Chromium 会把图片本体写入剪贴板
|
|
123
|
-
if (copyViaSelection(img)) showToast(L.imageCopied);
|
|
123
|
+
if (copyViaSelection(img)) showToast(L.imageCopied, 'success');
|
|
124
124
|
else showToast(L.imageCopyFailed, 'error');
|
|
125
125
|
}
|
|
126
126
|
}
|
|
@@ -171,7 +171,7 @@ async function injectPanels(grid) {
|
|
|
171
171
|
const sc = sessionScope();
|
|
172
172
|
const open = findOpenSidePane();
|
|
173
173
|
if (!sc || !open) {
|
|
174
|
-
showToast(L.ntpNeedSession, '
|
|
174
|
+
showToast(L.ntpNeedSession, 'warning');
|
|
175
175
|
return;
|
|
176
176
|
}
|
|
177
177
|
try {
|
|
@@ -189,7 +189,7 @@ async function injectPanels(grid) {
|
|
|
189
189
|
});
|
|
190
190
|
} catch (e) {
|
|
191
191
|
console.warn('[zcodepro] 打开插件面板失败', e);
|
|
192
|
-
showToast(L.ntpNeedSession, '
|
|
192
|
+
showToast(L.ntpNeedSession, 'warning');
|
|
193
193
|
}
|
|
194
194
|
});
|
|
195
195
|
grid.append(card);
|
|
@@ -211,7 +211,7 @@ async function injectNewMenuItems(content, menuRow) {
|
|
|
211
211
|
wireHighlight(content, copyItem);
|
|
212
212
|
copyItem.addEventListener('click', () => {
|
|
213
213
|
try { content.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', code: 'Escape', bubbles: true, cancelable: true })); } catch { /* ignore */ }
|
|
214
|
-
void copyToClipboard(primary.path).then((ok) => showToast(ok ? L.pathCopied : L.pathCopyFailed, ok ?
|
|
214
|
+
void copyToClipboard(primary.path).then((ok) => showToast(ok ? L.pathCopied : L.pathCopyFailed, ok ? 'success' : 'error'));
|
|
215
215
|
});
|
|
216
216
|
openItem.after(copyItem);
|
|
217
217
|
}
|
|
@@ -123,7 +123,8 @@ export function openRelocateDialog(project) {
|
|
|
123
123
|
submitBtn.removeAttribute('disabled');
|
|
124
124
|
if (res.ok) {
|
|
125
125
|
close();
|
|
126
|
-
showToast(res.indexSynced === false ? L.relocateIndexSkipped : L.relocateSuccess
|
|
126
|
+
showToast(res.indexSynced === false ? L.relocateIndexSkipped : L.relocateSuccess,
|
|
127
|
+
res.indexSynced === false ? 'warning' : 'success');
|
|
127
128
|
setTimeout(() => location.reload(), 900);
|
|
128
129
|
return;
|
|
129
130
|
}
|
|
@@ -397,7 +397,7 @@ export function startSessionSwitch() {
|
|
|
397
397
|
const target = live
|
|
398
398
|
? (mru[0] === current ? mru[1] : mru.find((mk) => mk !== current))
|
|
399
399
|
: mru[0];
|
|
400
|
-
if (!target) { showToast(t().switcherEmpty); return; }
|
|
400
|
+
if (!target) { showToast(t().switcherEmpty, 'warning'); return; }
|
|
401
401
|
void switchTo(target).then((ok) => { if (!ok) showToast(t().switcherFailed, 'error'); });
|
|
402
402
|
return;
|
|
403
403
|
}
|
|
@@ -406,7 +406,7 @@ export function startSessionSwitch() {
|
|
|
406
406
|
if (e.repeat) return;
|
|
407
407
|
closePopup(false);
|
|
408
408
|
if (!attentionList().length) {
|
|
409
|
-
showToast(t().switcherAttentionEmpty);
|
|
409
|
+
showToast(t().switcherAttentionEmpty, 'warning');
|
|
410
410
|
return;
|
|
411
411
|
}
|
|
412
412
|
await openPopup('attention');
|
|
@@ -417,7 +417,7 @@ export function startSessionSwitch() {
|
|
|
417
417
|
// 提示——首次仅开着当前会话时照常打开,列表里就是它这一条
|
|
418
418
|
if (k === hotkeys.switchRecent) {
|
|
419
419
|
if (!e.repeat && !popupEl && !openPopupInflight) {
|
|
420
|
-
if (!mru.length) { showToast(t().switcherEmpty); return; }
|
|
420
|
+
if (!mru.length) { showToast(t().switcherEmpty, 'warning'); return; }
|
|
421
421
|
await openPopup('mru');
|
|
422
422
|
}
|
|
423
423
|
return;
|
|
@@ -430,7 +430,7 @@ export function startSessionSwitch() {
|
|
|
430
430
|
if (openPopupInflight) {
|
|
431
431
|
await openPopupInflight;
|
|
432
432
|
} else if (!popupEl) {
|
|
433
|
-
if (!mru.length) { showToast(t().switcherEmpty); return; }
|
|
433
|
+
if (!mru.length) { showToast(t().switcherEmpty, 'warning'); return; }
|
|
434
434
|
await openPopup('mru');
|
|
435
435
|
}
|
|
436
436
|
// 键位对调:alt+x 上移一位(更靠上/更近的键管向上),alt+c 下移
|