zcode-pro 1.6.0__tar.gz → 1.6.2__tar.gz

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.
Files changed (68) hide show
  1. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/PKG-INFO +21 -15
  2. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/README.en.md +31 -21
  3. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/README.md +20 -14
  4. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/bin/zcode-pro +23 -4
  5. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/bin/zcode-pro.cmd +34 -17
  6. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/bin/zcode-pro.vbs +3 -1
  7. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/dist/inject.js +9673 -9113
  8. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/package.json +2 -1
  9. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/host/cdp.mjs +13 -3
  10. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/host/helper.mjs +982 -572
  11. zcode_pro-1.6.2/src/host/main.mjs +715 -0
  12. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/host/paths.mjs +17 -9
  13. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/host/pickFolder.mjs +11 -4
  14. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/host/settings.mjs +15 -2
  15. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/host/setup.mjs +54 -15
  16. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/host/skill-stats.mjs +6 -1
  17. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/host/taskIndex.mjs +198 -66
  18. zcode_pro-1.6.2/src/host/taskOrder.mjs +188 -0
  19. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/host/version.mjs +15 -7
  20. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/host/wallpaper.mjs +76 -59
  21. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/host/webdav.mjs +66 -10
  22. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/core.js +184 -113
  23. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/features/alias-migration.js +5 -1
  24. zcode_pro-1.6.2/src/inject/features/auto-rename.js +166 -0
  25. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/features/file-menu.js +6 -2
  26. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/features/idle-reclaim.js +31 -8
  27. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/features/newtab-panels.js +11 -1
  28. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/features/pinned-collapse.js +11 -3
  29. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/features/plugin-card-retry.js +18 -8
  30. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/features/sandbox-reclaim.js +17 -1
  31. zcode_pro-1.6.2/src/inject/features/session-link.js +200 -0
  32. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/features/session-switch.js +57 -23
  33. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/features/settings-dialog.js +243 -191
  34. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/features/status-bar.js +126 -24
  35. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/features/table-copy.js +18 -2
  36. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/features/task-order.js +47 -13
  37. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/features/theme.js +88 -31
  38. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/features/title-gen.js +5 -4
  39. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/features/title-lock.js +13 -8
  40. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/features/turn-usage.js +69 -29
  41. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/features/ws-running.js +26 -11
  42. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/index.js +5 -2
  43. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/provider-fields.js +2 -2
  44. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/ui.js +6 -0
  45. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/zcode_pro/__init__.py +1 -1
  46. zcode_pro-1.6.2/zcode_pro/cli.py +148 -0
  47. zcode_pro-1.6.0/src/host/main.mjs +0 -377
  48. zcode_pro-1.6.0/src/host/taskOrder.mjs +0 -117
  49. zcode_pro-1.6.0/src/inject/features/auto-continue.js +0 -325
  50. zcode_pro-1.6.0/zcode_pro/cli.py +0 -84
  51. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/.gitignore +0 -0
  52. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/LICENSE +0 -0
  53. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/bin/zcode-pro.mjs +0 -0
  54. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/cli.mjs +0 -0
  55. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/pyproject.toml +0 -0
  56. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/features/alias.js +0 -0
  57. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/features/composer-provider.js +0 -0
  58. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/features/copy-path.js +0 -0
  59. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/features/image-menu.js +0 -0
  60. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/features/open-folder.js +0 -0
  61. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/features/plugin-updates.js +0 -0
  62. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/features/project-menu.js +0 -0
  63. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/features/relocate-dialog.js +0 -0
  64. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/features/settings-entry.js +0 -0
  65. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/features/styles.js +0 -0
  66. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/features/toolbar-icons.js +0 -0
  67. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/src/inject/features/ws-rows.js +0 -0
  68. {zcode_pro-1.6.0 → zcode_pro-1.6.2}/zcode_pro/__main__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: zcode-pro
3
- Version: 1.6.0
3
+ Version: 1.6.2
4
4
  Summary: ZCode Pro — ZCode 桌面版增强工具:壁纸引擎(图片/视频/网页)、皮肤主题、会话快捷切换、状态栏统计等二十余项界面与体验增强;不修改客户端文件,用 ZCode Pro 快捷方式启动即可生效。
5
5
  Project-URL: Homepage, https://github.com/duanluan/zcode-pro
6
6
  Project-URL: Repository, https://github.com/duanluan/zcode-pro
@@ -30,7 +30,7 @@ ZCode 桌面版增强工具:壁纸引擎(图片/视频/网页)、皮肤主
30
30
 
31
31
  ## ✨ 功能
32
32
 
33
- 按设置弹窗中的位置分组排列:分类列为弹窗标签页,带 `·` 的(如“行为 · 全局提示词”)为标签页内的二级子标签,顺序与下方“设置界面”的截图一致。
33
+ 按主题分组排列:分类列为设置弹窗的标签页,带 `·` 的(如“行为 · 全局提示词”)为标签页内的二级子标签(表格与截图按主题排,与弹窗内的先后顺序未必一致)。
34
34
 
35
35
  | 分类 | 功能 | 说明 |
36
36
  | --- | --- | --- |
@@ -40,46 +40,46 @@ ZCode 桌面版增强工具:壁纸引擎(图片/视频/网页)、皮肤主
40
40
  | | 会话拖动排序 | 拖动调整置顶、项目与分组中的会话顺序,重启后不变 |
41
41
  | | 会话快捷切换 | `alt+z` 在当前与上次会话间来回切换;按住 `alt` 按 `x`(上移)/ `c`(下移)在最近会话列表中选择(初始 10 条,`c` 到底再加载 5 条),`alt+e` 直接打开最近 10 条,`alt+r` 打开正在运行与运行完未查看的任务;方向键同样可选,`Enter` 或点击行切换;五个入口键可在 设置 → 快捷键 中修改 |
42
42
  | | 重命名会话名锁定 | 手动重命名过的会话不再被自动标题覆盖,侧栏始终显示重命名后的名字 |
43
- | | 已置顶分区可折叠 | 侧边栏“已置顶”标题可点击折叠/展开其任务列表 |
43
+ | | 已置顶分区可折叠 | 侧边栏“已置顶”标题可点击折叠/展开其任务列表,折叠状态会记住 |
44
44
  | | 文件菜单增强 | 会话中文件链接的右键菜单新增“默认应用打开”“打开所在目录” |
45
45
  | | 复制图片 | 右键会话中的图片或放大的预览图,复制到剪贴板 |
46
- | | 插件界面沙箱回收 | 插件卡片沙箱数量达到上限时释放最早创建的(正在查看的排最后),避免 64 个名额耗尽后新卡片打不开;被释放的旧卡片重新打开所在会话即恢复(上限在配置文件 sandboxReclaimBudget 调整) |
46
+ | | 插件界面沙箱回收 | 插件卡片沙箱数量达到上限时释放最早创建的(正在查看的排最后),避免 64 个名额耗尽后新卡片打不开;被释放的旧卡片重新打开所在会话即恢复(回收触发额度在配置文件 sandboxReclaimBudget 调整,默认 60,上限固定 64) |
47
47
  | | 插件卡片自动重试 | 名额腾出后自动补挂因 64 上限失败的插件卡片(自动点“重新加载”) |
48
48
  | | 折叠时任务运行中提示 | 有会话在运行时,折叠的项目与“任务”“已置顶”等分区头显示与任务运行中同款的加载图标,全部结束后消失 |
49
49
  | | 新标签页插件面板入口 | 官方“新标签页”只列官方面板与推荐的官方插件;本功能把第三方市场插件(headroom、rtk 等)的面板卡片加进去,点击在侧边面板打开 |
50
50
  | | 复制表格 | 回答内容表格的工具条新增“复制表格”按钮:以富文本写入剪贴板,粘贴进 Excel / 富文本编辑器即被识别为表格(分列成格、不带边框与背景色);纯文本场景自动降级为 Tab 分列 |
51
+ | | 会话 ID 显示为任务名链接 | 提问与回答里出现的会话 ID(`sess_` / `session_` 开头)显示为任务名,点击切换到该会话,悬停显示原 ID;代码块里的 ID 不处理 |
51
52
  | | 插件更新 | 一键检查并更新 zcode-plugins 市场插件,可选启动时自动更新 |
52
53
  | 快捷键 | 会话快捷键自定义 | 会话快捷切换的五个入口键(默认 `alt+z` / `x` / `c` / `e` / `r`)逐个修改:点“修改”后按下新键位(字母/数字)即生效,键位冲突会提示;可一键重置为默认 |
53
- | 行为 | ZCode CLI | 技能清单检查:统计完整清单字符数并对照注入预算,超出时提示清单被降级为仅名称并给出建议预算;可配置技能系统、清单预算、额外技能目录与功能开关;工作区记忆仍在官方 设置 → Agent 能力 → 记忆 中配置,改动新会话起生效 |
54
+ | 行为 | ZCode CLI | 技能清单检查:统计完整清单字符数并对照注入预算,超出时提示清单被降级为只剩技能名和路径并给出建议预算;可配置技能系统、清单预算、额外技能目录与功能开关;工作区记忆仍在官方 设置 → Agent 能力 → 记忆 中配置,改动新会话起生效 |
54
55
  | | 全局提示词 | 编辑所有项目共享的默认指令,新会话起生效 |
55
- | | 任务名提示词 | 新会话开始作答时按所选供应商与提示词生成任务名(默认跟随当前会话、glm-5.3-flash,提问阶段的多条消息都计入),生成结果按手动重命名保存,官方自动标题不再覆盖;可在设置中选供应商、模型并编辑提示词,附测试按钮 |
56
+ | | 自动重命名 | 新会话开始作答时按所选供应商与提示词生成任务名(默认跟随当前会话、glm-5.3-flash,提问阶段的多条消息都计入),生成结果按手动重命名保存,官方自动标题不再覆盖;可在设置中选供应商、模型并编辑提示词,附测试按钮;任务行悬浮按钮与右键菜单“重命名任务”下可按最近问答手动重命名,入口开关与问答数在设置里 |
56
57
  | 外观 · 样式 | 侧栏菜单并入顶栏 | “新建任务 / 搜索 / 自动化 / 插件市场”收成顶部导航栏的图标按钮,对应界面打开时高亮 |
57
58
  | | 字体调整 | 自定义界面字体(除终端外全部界面文字)、提问字体与回答字体 |
58
59
  | | 侧栏间距调整 | 微调侧边栏项目间距与任务间距 |
59
60
  | | 界面样式调整 | 微调段落间距、内容宽度、各类行高、列表/引用块/表格间距与单元格边距;聚焦输入框时高亮预览受影响区域 |
60
- | 外观 · 状态栏 | 状态栏统计 | 提问输入框右下角和每轮回答最后显示统计项:上下文占用(占用高时变色)、提问次数、今日/累计 token、任务总数,全部取自官方数据;各项的顺序与显隐在 设置 → 外观 → 状态栏 调整 |
61
+ | 外观 · 状态栏 | 状态栏统计 | 提问输入框右下角和每轮回答最后显示统计项:最近输出 tokens/s(60 秒窗口,回答结束后停留在最后速率)、上下文占用(占用高时变色)、提问次数、今日/累计 token、任务总数,以官方数据为主;各项的顺序与显隐在 设置 → 外观 → 状态栏 调整。速率与每轮用量按会话记录统计,子代理是独立的会话记录、不计入 |
61
62
  | | 每轮回答 token 用量 | 在每条回答末尾操作按钮的时间后面显示该轮的输入/输出 token 与缓存命中率(本地记录只保留最近一段,更早的回答不标注) |
62
63
  | 外观 · 主题 | 界面皮肤 | 内置 11 套知名编辑器主题配色(Dracula / Nord / Tokyo Night / Catppuccin / Gruvbox / One Dark / Solarized / Rosé Pine / Everforest / Night Owl / Kanagawa),自动匹配 ZCode 的浅色 / 深色模式;另可自定义主题:浅色、深色各选 5 个颜色生成整套配色,改色实时生效 |
63
- | 外观 · 背景图 | 背景图 | 整窗铺背景,四种来源:无背景 / 本地图库(可传多张、点选当前、可单删)/ 文件夹(原地读取,按间隔定时轮换,可选随机或按文件名顺序)/ 网址(可按间隔定时刷新,配合随机图 API);遮罩不透明度(图片向主题背景色淡化程度)、图片模糊、面板不透明度(左栏、中栏与右栏的不透明程度)三个滑杆调节;左栏 / 中栏 / 右栏透出背景,弹窗与菜单保持不透明保可读;图库随 WebDAV 同步的 zcode-pro 组一起上传(覆盖式,不留历史版本) |
64
+ | 外观 · 壁纸 | 壁纸 | 整窗铺背景,五种来源:无背景 / 本地图库(可传多张、点选当前、可单删)/ 文件夹(原地读取,按间隔定时轮换,可选随机或按文件名顺序)/ 网址(可按间隔定时刷新,配合随机图 API)/ 网页(沙箱 iframe 铺在后方);左栏 / 中栏 / 右栏可分区独立设置(仅静态图,缩放与遮罩可单独调、可跟随全局);遮罩不透明度(图片向主题背景色淡化程度)、图片模糊、面板不透明度(左栏、中栏与右栏的不透明程度)三个滑杆调节,另有转场方式、视频音量/倍速/帧率上限与暂停条件;设置弹窗默认磨砂透出壁纸(可在该页关掉),菜单等浮层保持不透明保可读;图库随 WebDAV 同步的 zcode-pro 组一起上传(覆盖式,不留历史版本) |
64
65
  | 性能 | 空闲项目内存回收 | 长时间未使用且无任务运行的项目自动释放其占用的内存,启动后也会自动回收一次未使用的项目;会话记录不受影响,再次打开时自动恢复(时长可调) |
65
- | 代理 | 软件代理 | 为插件更新安装与本体升级设置 HTTP 代理,附连通性检测 |
66
+ | 代理 | 软件代理 | 为插件更新安装与本体升级设置 HTTP 代理(WebDAV 同步可选走代理,默认关),附连通性检测 |
66
67
  | 同步 | 设置同步 | 手动把 ZCode Pro 设置与模型设置备份到 WebDAV,或在新电脑上恢复;仅在点击时传输 |
67
68
  | Vision | 视觉代理 | 主模型不识图时自动交给视觉模型识别图片,识别描述带给主模型;可视化编辑代理链(zcode-vision 插件) |
68
69
  | Headroom | Headroom 压缩 | 管理压缩设备、省电切换与代理运行状态,headroom 本体检查更新与升级(headroom 插件) |
69
70
  | rtk | rtk 压缩 | 管理改写提醒与命令白名单,rtk 本体检查更新与一键升级(rtk 插件) |
70
- | 自动继续 | 回合失败自动继续 | 回合因请求故障失败(红色报错横幅)时自动发一条继续指令接上任务,重开会话(含重启后)没做完的任务也接上,认证、余额等永久性错误与手动停止不打扰;配置与 auto-continue 插件共用(auto-continue 插件) |
71
71
 
72
72
  各项功能均可在设置弹窗中开关或调整,ZCode 3.16.1 与 3.15.x 均可使用。
73
73
 
74
74
  ## 🎛 设置界面
75
75
 
76
- 右键点击 ZCode 侧边栏底部的设置按钮(齿轮)即可打开设置窗口,各标签页如下:
76
+ 右键点击 ZCode 侧边栏底部的设置按钮(齿轮)即可打开设置窗口,主要标签页如下:
77
77
 
78
78
  | 功能 | 快捷键 | 行为 · 全局提示词 |
79
79
  | --- | --- | --- |
80
80
  | <img src="docs/settings/01-features.png" width="280"> | <img src="docs/settings/02-shortcuts.png" width="280"> | <img src="docs/settings/03-behavior-global-prompt.png" width="280"> |
81
81
 
82
- | 行为 · 任务名提示词 | 外观 · 样式 | 外观 · 状态栏 |
82
+ | 行为 · 自动重命名 | 外观 · 样式 | 外观 · 状态栏 |
83
83
  | --- | --- | --- |
84
84
  | <img src="docs/settings/04-behavior-task-title.png" width="280"> | <img src="docs/settings/05-style-tweaks.png" width="280"> | <img src="docs/settings/06-style-status-bar.png" width="280"> |
85
85
 
@@ -95,7 +95,7 @@ ZCode 桌面版增强工具:壁纸引擎(图片/视频/网页)、皮肤主
95
95
 
96
96
  ## 📦 安装与使用
97
97
 
98
- > **版本匹配**:ZCode ≥ 3.16.1 请使用 **zcode-pro 1.1.0**(npm / PyPI / AUR 最新发布版);ZCode ≤ 3.15.x 请使用 **zcode-pro 0.20.3**(旧版仍可用)。
98
+ > **版本匹配**:ZCode ≥ 3.16.1 请使用 **zcode-pro 1.1.0 及以上**(当前最新 1.6.2);ZCode ≤ 3.15.x 请使用 **zcode-pro 0.20.3**(旧版仍可用)。
99
99
 
100
100
  安装后,通过应用菜单 / 开始菜单中的“ZCode Pro”快捷方式或终端命令 `zcode-pro` 启动 ZCode,增强在该方式下自动生效;使用原有 ZCode 入口启动时不加载增强。
101
101
 
@@ -183,6 +183,12 @@ bin\zcode-pro.cmd
183
183
  bin\zcode-pro.cmd setup
184
184
  ```
185
185
 
186
+ ## 🔒 安全说明
187
+
188
+ - 启动器会以 `--remote-debugging-port`(默认 9333)拉起 ZCode,靠这个调试端口注入增强脚本。该端口没有鉴权,本机任何进程(含其他系统用户)连上后可以在 ZCode 页面里执行任意脚本,只适合在个人电脑上使用;可用 `--cdp-port <端口>` 或环境变量 ZCODEPRO_CDP_PORT 换端口(挡得住随手扫描,挡不住有心的本机进程)。
189
+ - 本机服务只监听 127.0.0.1:47889,所有接口都要随机 token 才能调用;壁纸等媒体文件的直链上也带着同一个 token,外部网页读不走图库文件。
190
+ - WebDAV 密码与起名用的 API Key 明文存在本机配置文件里(文件权限限本人读写),同步上传时这两项只留本机;自定义模型供应商的 API Key 会随“模型设置”组上传到你自己的 WebDAV(这是同步模型配置本身需要的)。
191
+
186
192
  ## 📖 参考
187
193
 
188
194
  命令行选项(`zcode-pro --help` 查看全部):
@@ -195,8 +201,9 @@ bin\zcode-pro.cmd setup
195
201
  | `--inject-only` | 只接管已在运行的实例,不启动新实例 |
196
202
  | `--verbose` | 详细日志 |
197
203
  | `setup [--desktop] [--uninstall]` | 安装/撤销本机快捷方式(`--desktop` 同时加桌面) |
204
+ | `wallpaper <操作>` | 壁纸命令行:list / set / rotate / params / upload / delete(`wallpaper -h` 看详细用法) |
198
205
 
199
- 各选项也可用环境变量 `ZCODEPRO_*` 覆盖。
206
+ 仅 `--cdp-port`、`--helper-port`、`--zcode-path` 三个选项另有对应环境变量 `ZCODEPRO_CDP_PORT`、`ZCODEPRO_HELPER_PORT`、`ZCODEPRO_ZCODE_PATH`,命令行参数优先。
200
207
 
201
208
  配置与数据位置:
202
209
 
@@ -207,7 +214,6 @@ bin\zcode-pro.cmd setup
207
214
  | 全局提示词 | `~/.zcode/AGENTS.md` |
208
215
  | ZCode 行为配置(技能清单预算等) | `~/.zcode/cli/config.json` |
209
216
  | 视觉代理(zcode-vision 插件) | `~/.zcode/zcode-vision.json` |
210
- | 自动继续(auto-continue 插件) | `~/.zcode/auto-continue.json` |
211
217
  | rtk 压缩(rtk 插件) | `~/.zcode-rtk/` |
212
218
  | Headroom(headroom 插件) | `~/.zcode/headroom.json` |
213
219
 
@@ -10,39 +10,40 @@ ZCode Pro is an enhancement pack for the ZCode desktop app: a wallpaper engine (
10
10
 
11
11
  ## ✨ Features
12
12
 
13
- Grouped by where each feature lives in the settings window: the category column is the tab, entries with `·` (e.g. "Behavior · Global prompt") are sub-tabs, in the same order as the screenshots in the Settings section below.
13
+ Grouped by topic: the category column is a settings tab, entries with `·` (e.g. "Behavior · Global prompt") are sub-tabs (the table and screenshots are ordered by topic, not necessarily by their order in the dialog).
14
14
 
15
15
  | Category | Feature | Description |
16
16
  | --- | --- | --- |
17
17
  | Features | Project menu actions (open folder / copy path) | Project "More" menu: open the project directory in the file manager, or copy its path |
18
- | | ~~Custom project alias~~ (retired) | Show a custom name for a project in the sidebar; UI-only, revert anytime; renaming is built into ZCode ≥ 3.16.1 (project menu "Edit project") — the feature disables itself there and offers to migrate existing aliases |
18
+ | | ~~Custom alias~~ (retired) | Show a custom name for a project in the sidebar; UI-only, revert anytime; renaming is built into ZCode ≥ 3.16.1 (project menu "Edit project") — the feature disables itself there and offers to migrate existing aliases |
19
19
  | | ~~Switch project folder~~ (retired) | Point a project at another folder; sidebar, tabs and task history follow. Stop running tasks before switching; historical checkpoints still reference the original path; retired on ZCode ≥ 3.16.1, where a project can hold multiple directories natively |
20
- | | Session drag ordering | Reorder sessions in Pinned, Projects and Groups; persists across refreshes |
20
+ | | Sidebar session drag ordering | Reorder sessions in Pinned, Projects and Groups; persists across refreshes |
21
21
  | | Session quick switch | `alt+z` toggles between the current and the last session; hold `alt` and press `x` (up) / `c` (down) to pick from recent sessions (10 shown initially, pressing `c` at the bottom loads 5 more), `alt+e` opens the last 10 directly, `alt+r` opens running / finished-but-unseen tasks; arrow keys also move the highlight, press `Enter` or click a row to switch; the five trigger keys are customizable in Settings → Shortcuts |
22
22
  | | Keep renamed session titles | Sessions you renamed keep their custom title; auto-generated titles no longer overwrite it in the sidebar |
23
23
  | | Collapsible Pinned section | The sidebar "Pinned" header collapses/expands its task list; the state is remembered |
24
24
  | | File menu actions | Adds "Open with default app" and "Reveal in file manager" to file links in chat |
25
25
  | | Copy image | Right-click an image in chat or the enlarged preview to copy it to the clipboard |
26
- | | Plugin card sandbox reclaim | Releases the oldest plugin-card sandboxes once the cap is hit (the one being viewed goes last), so new cards keep opening after the 64-slot pool fills up; released cards come back when their session is reopened (cap adjustable via the sandboxReclaimBudget config file key) |
27
- | | Plugin card auto-retry | Auto-clicks "Reload" on cards that failed the 64-slot cap, so they recover as soon as a slot frees up |
28
- | | Running indicator while collapsed | While any session is running, collapsed projects and the "Tasks" / "Pinned" section headers show the same loader the running task row uses; it disappears when all finish |
26
+ | | Plugin card sandbox reclaim | Releases the oldest plugin-card sandboxes once the cap is hit (the one being viewed goes last), so new cards keep opening after the 64-slot pool fills up; released cards come back when their session is reopened (reclaim trigger threshold adjustable via the sandboxReclaimBudget config file key, default 60; the 64-slot cap is fixed) |
27
+ | | Plugin card auto-retry | Auto-clicks "Reload" on cards that hit the 64-slot cap, so they recover as soon as a slot frees up |
28
+ | | Running indicator when collapsed | While any session is running, collapsed projects and the "Tasks" / "Pinned" section headers show the same loader the running task row uses; it disappears when all finish |
29
29
  | | Plugin panels on the new tab page | The built-in "new tab page" only lists built-in panels and recommended official plugins; this adds cards for third-party marketplace plugin panels (headroom, rtk, …) that open in the side pane |
30
- | | Copy table | Adds a "Copy table" button to the table toolbar in answers: writes rich text to the clipboard so Excel / rich-text editors paste it as a real table (cells split, no borders or background colors); plain-text targets get tab-separated values |
31
- | | Plugin updates | Check and update zcode-plugins marketplace plugins in one click, optional auto-update on startup |
32
- | Shortcuts | Shortcut customization | Rebind the five session quick switch trigger keys (`alt+z` / `x` / `c` / `e` / `r` by default) one by one: click "Modify" and press a new key (letters/digits only, conflicts rejected); reset all to defaults in one click |
33
- | Behavior · ZCode CLI | ZCode CLI | Skill listing check: counts the full listing against the injection budget, warns when it degrades to names only and suggests a budget; configure the skill system, listing budget, extra skill directories and feature switches; workspace memory stays in the official settings under Settings → Agent capabilities → Memory; changes apply to new sessions |
30
+ | | Copy table | Adds a "Copy table" button to the table toolbar in answers: writes rich text to the clipboard so Excel / rich-text editors paste it as a real table (with separate cells, no borders or background colors); plain-text targets get tab-separated values |
31
+ | | Session ID links | Session IDs (`sess_` / `session_`) in questions and answers render as task names; click to switch to that session, hover for the raw ID; IDs in code blocks are left as-is |
32
+ | | Auto-update | Check and update zcode-plugins marketplace plugins in one click, optional auto-update on startup |
33
+ | Shortcuts | Shortcut customization | Rebind the five session quick switch trigger keys (`alt+z` / `x` / `c` / `e` / `r` by default) one by one: click "Change" and press a new key (a single letter or digit only, conflicts rejected); reset all to defaults in one click |
34
+ | Behavior · ZCode CLI | ZCode CLI | Skill listing check: counts the full listing against the listing budget, warns when it degrades to names and file paths only and suggests a budget; configure the skill system, listing budget, extra skill directories and feature switches; workspace memory stays in the official settings under Settings → Agent capabilities → Memory; changes apply to new sessions |
34
35
  | Behavior · Global prompt | Global prompt | Edit default instructions shared by all projects; applies to new sessions |
35
- | Behavior · Task title prompt | Task name prompt | When a new session starts answering, generates the task name with a provider and prompt you choose (following the current session and glm-5.3-flash by default; every question sent before the first answer counts), saved as a manual rename the built-in auto title never overrides; provider, model and prompt are editable in settings, with a test button |
36
+ | Behavior · Auto rename | Auto rename | When a new session starts answering, generates the task name with a provider and prompt you choose (provider follows the current session, model defaults to glm-5.3-flash; every question sent before the first answer counts), saved as a manual rename the built-in auto title never overrides; provider, model and prompt are editable in settings, with a test button; a hover button on task rows and a context-menu entry under "Rename task" rename manually from the recent Q&A, with toggles for each entry point and the round count in settings |
36
37
  | Appearance · Styles | Sidebar menu in the top bar | Turns "New task / Search / Automations / Plugin store" into icon buttons in the top navigation bar, highlighted while its view is open|
37
38
  | | Font adjustment | Custom UI font (all interface text except the terminal), question font and answer font |
38
39
  | | Sidebar spacing | Fine-tune sidebar project spacing and task spacing |
39
40
  | | UI style adjustments | Fine-tune paragraph spacing, content width, line heights, list/quote/table spacing and cell padding; focusing an input highlights the affected areas |
40
- | Appearance · Status bar | Status bar statistics | Shows statistics at the bottom-right of the input box and at the end of each answer: context usage (color-shifts when high), questions asked, today/total tokens and task count, all from official data; reorder or hide each item under Settings → Appearance → Status bar |
41
- | | Per-turn token usage | Shows that turn's in/out tokens and cache hit rate after the time in each answer's action row (local records keep only a recent window; older answers stay unlabelled) |
42
- | Appearance · Theme | UI skins | Eleven famous editor theme palettes (Dracula / Nord / Tokyo Night / Catppuccin / Gruvbox / One Dark / Solarized / Rosé Pine / Everforest / Night Owl / Kanagawa), auto-matching ZCode's light / dark mode; plus a custom theme: pick 5 colors each for light and dark to derive the whole palette, |
43
- | Appearance · Background | Background image | Window-wide background from four sources: none / local library (upload many, pick the active one, delete freely) / folder (read in place, rotate on a timer, random or by filename) / URL (refresh on a timer for random-image APIs); three sliders — mask opacity (image fading toward the theme background color), image blur, panel opacity (the left, center and right panes); the panes reveal the background while menus and dialogs stay opaque; the library uploads with the zcode-pro WebDAV sync group (overwrite, no history versions) |
41
+ | Appearance · Status bar | Status bar statistics | Shows statistics at the bottom-right of the input box and at the end of each answer: recent output tokens/s (60-second window, holds the last rate after an answer ends), context usage (changes color when high), questions asked, today/total tokens and task count, mostly from official data; reorder or hide each item under Settings → Appearance → Status bar. Rate and per-turn usage are scoped to the session's own records; subagent calls live in separate session records and are not counted |
42
+ | | Per-turn token usage | Shows that turn's in/out tokens and cache hit rate, shown after the timestamp in each answer's action row (local records keep only a recent window; older answers stay unlabeled) |
43
+ | Appearance · Theme | Skins | Eleven well-known editor theme palettes (Dracula / Nord / Tokyo Night / Catppuccin / Gruvbox / One Dark / Solarized / Rosé Pine / Everforest / Night Owl / Kanagawa), auto-matching ZCode's light / dark mode; plus a custom theme: pick 5 colors each for light and dark to derive the whole palette, with live preview |
44
+ | Appearance · Wallpaper | Wallpaper | Window-wide background from five sources: none / local library (upload many, pick the active one, delete freely) / folder (read in place, rotate on a timer, random or by filename) / URL (refresh on a timer for random-image APIs) / web page (sandboxed iframe behind the UI); the left, center and right panes can each get their own background (static images only, fit and mask settable per pane, or follow the global settings); three sliders — mask opacity (image fading toward the theme background color), image blur, panel opacity — plus transition style, video volume/playback rate/FPS cap and pause conditions; the settings window is frosted over the wallpaper by default (can be turned off on that page), menus stay opaque; the library uploads with the zcode-pro WebDAV sync group (overwrite, no history versions) |
44
45
  | Performance | Idle project memory reclaim | Projects unused for a while with no running tasks release their memory automatically, and unused ones are reclaimed once after startup; sessions are untouched and reload when reopened (durations adjustable) |
45
- | Proxy | Software proxy | Set an HTTP proxy for plugin updates/installs and tool upgrades, with connectivity test |
46
+ | Proxy | Software proxy | Set an HTTP proxy for plugin updates/installs and tool upgrades (WebDAV sync can optionally use it, off by default), with connectivity test |
46
47
  | Sync | Settings sync | Manually back up ZCode Pro settings and model settings to WebDAV, or restore them on a new computer; transfers only on click |
47
48
  | Vision | Vision proxy | Automatically hand images to vision models for recognition when the main model cannot see them, and feed the descriptions to the main model; visual chain editor (zcode-vision plugin) |
48
49
  | Headroom | Headroom | Manage compression device, power-save switching and proxy status; check and upgrade the headroom program (headroom plugin) |
@@ -58,7 +59,7 @@ Right-click the settings button (gear) at the bottom of the ZCode sidebar to ope
58
59
  | --- | --- | --- |
59
60
  | <img src="docs/settings/01-features.png" width="280"> | <img src="docs/settings/02-shortcuts.png" width="280"> | <img src="docs/settings/03-behavior-global-prompt.png" width="280"> |
60
61
 
61
- | Behavior · Task title prompt | Appearance · Styles | Appearance · Status bar |
62
+ | Behavior · Auto rename | Appearance · Styles | Appearance · Status bar |
62
63
  | --- | --- | --- |
63
64
  | <img src="docs/settings/04-behavior-task-title.png" width="280"> | <img src="docs/settings/05-style-tweaks.png" width="280"> | <img src="docs/settings/06-style-status-bar.png" width="280"> |
64
65
 
@@ -74,7 +75,7 @@ Right-click the settings button (gear) at the bottom of the ZCode sidebar to ope
74
75
 
75
76
  ## 📦 Installation
76
77
 
77
- > **Version match**: for ZCode ≥ 3.16.1 use **zcode-pro 1.1.0** (latest npm / PyPI / AUR release); for ZCode ≤ 3.15.x use **zcode-pro 0.20.3** (the previous release, still available).
78
+ > **Version match**: for ZCode ≥ 3.16.1 use **zcode-pro 1.1.0 or newer** (the latest is 1.6.2); for ZCode 3.15.x and earlier use **zcode-pro 0.20.3** (the previous release, still available).
78
79
 
79
80
  Once installed, launch ZCode via the "ZCode Pro" shortcut in your app menu / Start menu, or the `zcode-pro` command in a terminal — the enhancements are enabled automatically in this mode; launching ZCode through its original entry does not load them. After launching, right-click the settings button at the bottom of the ZCode sidebar to open the ZCode Pro settings window.
80
81
 
@@ -85,9 +86,11 @@ At runtime the Node runtime bundled with ZCode is preferred; if ZCode cannot be
85
86
  ```bash
86
87
  # Option 1: install/uninstall via npm
87
88
  npm install -g zcode-pro
89
+ zcode-pro setup --uninstall # undo shortcuts first (if you created them)
88
90
  npm uninstall -g zcode-pro
89
91
  # Option 2: install/uninstall via pip
90
92
  pip install zcode-pro
93
+ zcode-pro setup --uninstall # undo shortcuts first (if you created them)
91
94
  pip uninstall zcode-pro
92
95
 
93
96
  # Launch via the command
@@ -145,7 +148,7 @@ If you previously installed via `install.sh`, run `./scripts/install.sh --uninst
145
148
 
146
149
  ### 🚀 Run without installing
147
150
 
148
- No standalone Node.js required: the runtime bundled with ZCode is preferred and used even without a system Node; works whether ZCode is installed in the default or a custom directory (auto-detected, falling back to the registry).
151
+ No standalone Node.js required: the runtime bundled with ZCode is preferred and used even without a system Node; works whether ZCode is installed in the default directory or a custom one (auto-detected, falling back to the registry).
149
152
 
150
153
  ```bash
151
154
  git clone https://github.com/duanluan/zcode-pro.git && cd zcode-pro
@@ -160,6 +163,12 @@ bin\zcode-pro.cmd
160
163
  bin\zcode-pro.cmd setup
161
164
  ```
162
165
 
166
+ ## 🔒 Security notes
167
+
168
+ - The launcher starts ZCode with `--remote-debugging-port` (9333 by default) so the enhancement scripts can be injected. That debug port has no authentication: any local process (including other OS users) that connects to it can run arbitrary scripts inside ZCode pages. Use this on a personal machine only; `--cdp-port <port>` or the ZCODEPRO_CDP_PORT environment variable changes the port (stops casual scanning, not a determined local attacker).
169
+ - The local service listens on 127.0.0.1:47889 only, and every API call requires a random token; direct media links (wallpapers etc.) carry the same token, so external web pages cannot read your media library.
170
+ - The WebDAV password and the Auto rename API key are stored in plaintext in local config files (file permissions limited to the current user) and stay local during sync; custom model provider API keys are uploaded with the model-settings group to your own WebDAV (which is what syncing model configs requires).
171
+
163
172
  ## 📖 Reference
164
173
 
165
174
  Command-line options (see `zcode-pro --help` for all):
@@ -172,8 +181,9 @@ Command-line options (see `zcode-pro --help` for all):
172
181
  | `--inject-only` | Attach to a running instance only; do not launch a new one |
173
182
  | `--verbose` | Verbose logging |
174
183
  | `setup [--desktop] [--uninstall]` | Install/undo local shortcuts (`--desktop` also adds a desktop one) |
184
+ | `wallpaper <op>` | Wallpaper CLI: list / set / rotate / params / upload / delete (see `wallpaper -h`) |
175
185
 
176
- Each option can also be overridden with a `ZCODEPRO_*` environment variable.
186
+ Only `--cdp-port`, `--helper-port` and `--zcode-path` also have a `ZCODEPRO_*` environment variable (`ZCODEPRO_CDP_PORT`, `ZCODEPRO_HELPER_PORT`, `ZCODEPRO_ZCODE_PATH`); the command-line option wins.
177
187
 
178
188
  Configuration and data locations:
179
189
 
@@ -191,7 +201,7 @@ After uninstalling, just start ZCode from the official entry; no system cleanup
191
201
 
192
202
  ## 🔌 Plugin recommendation
193
203
 
194
- [duanluan/zcode-plugins](https://github.com/duanluan/zcode-plugins) is a companion plugin marketplace for ZCode: AI code review, request compression and command-output compression plugins that save tokens. To install: ZCode → Plugin Marketplace → "Add" (top right) → Add plugin marketplace, and enter `duanluan/zcode-plugins`. Installed plugins can be checked and updated from ZCode Pro settings.
204
+ [duanluan/zcode-plugins](https://github.com/duanluan/zcode-plugins) is a companion plugin store for ZCode, with AI code review, request compression and command-output compression plugins that save tokens. To install: ZCode → Plugin Marketplace → "Add" (top right) → Add plugin store, and enter `duanluan/zcode-plugins`. Installed plugins can be checked and updated from ZCode Pro settings.
195
205
 
196
206
  ## 💬 Community
197
207
 
@@ -10,7 +10,7 @@ ZCode 桌面版增强工具:壁纸引擎(图片/视频/网页)、皮肤主
10
10
 
11
11
  ## ✨ 功能
12
12
 
13
- 按设置弹窗中的位置分组排列:分类列为弹窗标签页,带 `·` 的(如“行为 · 全局提示词”)为标签页内的二级子标签,顺序与下方“设置界面”的截图一致。
13
+ 按主题分组排列:分类列为设置弹窗的标签页,带 `·` 的(如“行为 · 全局提示词”)为标签页内的二级子标签(表格与截图按主题排,与弹窗内的先后顺序未必一致)。
14
14
 
15
15
  | 分类 | 功能 | 说明 |
16
16
  | --- | --- | --- |
@@ -20,46 +20,46 @@ ZCode 桌面版增强工具:壁纸引擎(图片/视频/网页)、皮肤主
20
20
  | | 会话拖动排序 | 拖动调整置顶、项目与分组中的会话顺序,重启后不变 |
21
21
  | | 会话快捷切换 | `alt+z` 在当前与上次会话间来回切换;按住 `alt` 按 `x`(上移)/ `c`(下移)在最近会话列表中选择(初始 10 条,`c` 到底再加载 5 条),`alt+e` 直接打开最近 10 条,`alt+r` 打开正在运行与运行完未查看的任务;方向键同样可选,`Enter` 或点击行切换;五个入口键可在 设置 → 快捷键 中修改 |
22
22
  | | 重命名会话名锁定 | 手动重命名过的会话不再被自动标题覆盖,侧栏始终显示重命名后的名字 |
23
- | | 已置顶分区可折叠 | 侧边栏“已置顶”标题可点击折叠/展开其任务列表 |
23
+ | | 已置顶分区可折叠 | 侧边栏“已置顶”标题可点击折叠/展开其任务列表,折叠状态会记住 |
24
24
  | | 文件菜单增强 | 会话中文件链接的右键菜单新增“默认应用打开”“打开所在目录” |
25
25
  | | 复制图片 | 右键会话中的图片或放大的预览图,复制到剪贴板 |
26
- | | 插件界面沙箱回收 | 插件卡片沙箱数量达到上限时释放最早创建的(正在查看的排最后),避免 64 个名额耗尽后新卡片打不开;被释放的旧卡片重新打开所在会话即恢复(上限在配置文件 sandboxReclaimBudget 调整) |
26
+ | | 插件界面沙箱回收 | 插件卡片沙箱数量达到上限时释放最早创建的(正在查看的排最后),避免 64 个名额耗尽后新卡片打不开;被释放的旧卡片重新打开所在会话即恢复(回收触发额度在配置文件 sandboxReclaimBudget 调整,默认 60,上限固定 64) |
27
27
  | | 插件卡片自动重试 | 名额腾出后自动补挂因 64 上限失败的插件卡片(自动点“重新加载”) |
28
28
  | | 折叠时任务运行中提示 | 有会话在运行时,折叠的项目与“任务”“已置顶”等分区头显示与任务运行中同款的加载图标,全部结束后消失 |
29
29
  | | 新标签页插件面板入口 | 官方“新标签页”只列官方面板与推荐的官方插件;本功能把第三方市场插件(headroom、rtk 等)的面板卡片加进去,点击在侧边面板打开 |
30
30
  | | 复制表格 | 回答内容表格的工具条新增“复制表格”按钮:以富文本写入剪贴板,粘贴进 Excel / 富文本编辑器即被识别为表格(分列成格、不带边框与背景色);纯文本场景自动降级为 Tab 分列 |
31
+ | | 会话 ID 显示为任务名链接 | 提问与回答里出现的会话 ID(`sess_` / `session_` 开头)显示为任务名,点击切换到该会话,悬停显示原 ID;代码块里的 ID 不处理 |
31
32
  | | 插件更新 | 一键检查并更新 zcode-plugins 市场插件,可选启动时自动更新 |
32
33
  | 快捷键 | 会话快捷键自定义 | 会话快捷切换的五个入口键(默认 `alt+z` / `x` / `c` / `e` / `r`)逐个修改:点“修改”后按下新键位(字母/数字)即生效,键位冲突会提示;可一键重置为默认 |
33
- | 行为 | ZCode CLI | 技能清单检查:统计完整清单字符数并对照注入预算,超出时提示清单被降级为仅名称并给出建议预算;可配置技能系统、清单预算、额外技能目录与功能开关;工作区记忆仍在官方 设置 → Agent 能力 → 记忆 中配置,改动新会话起生效 |
34
+ | 行为 | ZCode CLI | 技能清单检查:统计完整清单字符数并对照注入预算,超出时提示清单被降级为只剩技能名和路径并给出建议预算;可配置技能系统、清单预算、额外技能目录与功能开关;工作区记忆仍在官方 设置 → Agent 能力 → 记忆 中配置,改动新会话起生效 |
34
35
  | | 全局提示词 | 编辑所有项目共享的默认指令,新会话起生效 |
35
- | | 任务名提示词 | 新会话开始作答时按所选供应商与提示词生成任务名(默认跟随当前会话、glm-5.3-flash,提问阶段的多条消息都计入),生成结果按手动重命名保存,官方自动标题不再覆盖;可在设置中选供应商、模型并编辑提示词,附测试按钮 |
36
+ | | 自动重命名 | 新会话开始作答时按所选供应商与提示词生成任务名(默认跟随当前会话、glm-5.3-flash,提问阶段的多条消息都计入),生成结果按手动重命名保存,官方自动标题不再覆盖;可在设置中选供应商、模型并编辑提示词,附测试按钮;任务行悬浮按钮与右键菜单“重命名任务”下可按最近问答手动重命名,入口开关与问答数在设置里 |
36
37
  | 外观 · 样式 | 侧栏菜单并入顶栏 | “新建任务 / 搜索 / 自动化 / 插件市场”收成顶部导航栏的图标按钮,对应界面打开时高亮 |
37
38
  | | 字体调整 | 自定义界面字体(除终端外全部界面文字)、提问字体与回答字体 |
38
39
  | | 侧栏间距调整 | 微调侧边栏项目间距与任务间距 |
39
40
  | | 界面样式调整 | 微调段落间距、内容宽度、各类行高、列表/引用块/表格间距与单元格边距;聚焦输入框时高亮预览受影响区域 |
40
- | 外观 · 状态栏 | 状态栏统计 | 提问输入框右下角和每轮回答最后显示统计项:上下文占用(占用高时变色)、提问次数、今日/累计 token、任务总数,全部取自官方数据;各项的顺序与显隐在 设置 → 外观 → 状态栏 调整 |
41
+ | 外观 · 状态栏 | 状态栏统计 | 提问输入框右下角和每轮回答最后显示统计项:最近输出 tokens/s(60 秒窗口,回答结束后停留在最后速率)、上下文占用(占用高时变色)、提问次数、今日/累计 token、任务总数,以官方数据为主;各项的顺序与显隐在 设置 → 外观 → 状态栏 调整。速率与每轮用量按会话记录统计,子代理是独立的会话记录、不计入 |
41
42
  | | 每轮回答 token 用量 | 在每条回答末尾操作按钮的时间后面显示该轮的输入/输出 token 与缓存命中率(本地记录只保留最近一段,更早的回答不标注) |
42
43
  | 外观 · 主题 | 界面皮肤 | 内置 11 套知名编辑器主题配色(Dracula / Nord / Tokyo Night / Catppuccin / Gruvbox / One Dark / Solarized / Rosé Pine / Everforest / Night Owl / Kanagawa),自动匹配 ZCode 的浅色 / 深色模式;另可自定义主题:浅色、深色各选 5 个颜色生成整套配色,改色实时生效 |
43
- | 外观 · 背景图 | 背景图 | 整窗铺背景,四种来源:无背景 / 本地图库(可传多张、点选当前、可单删)/ 文件夹(原地读取,按间隔定时轮换,可选随机或按文件名顺序)/ 网址(可按间隔定时刷新,配合随机图 API);遮罩不透明度(图片向主题背景色淡化程度)、图片模糊、面板不透明度(左栏、中栏与右栏的不透明程度)三个滑杆调节;左栏 / 中栏 / 右栏透出背景,弹窗与菜单保持不透明保可读;图库随 WebDAV 同步的 zcode-pro 组一起上传(覆盖式,不留历史版本) |
44
+ | 外观 · 壁纸 | 壁纸 | 整窗铺背景,五种来源:无背景 / 本地图库(可传多张、点选当前、可单删)/ 文件夹(原地读取,按间隔定时轮换,可选随机或按文件名顺序)/ 网址(可按间隔定时刷新,配合随机图 API)/ 网页(沙箱 iframe 铺在后方);左栏 / 中栏 / 右栏可分区独立设置(仅静态图,缩放与遮罩可单独调、可跟随全局);遮罩不透明度(图片向主题背景色淡化程度)、图片模糊、面板不透明度(左栏、中栏与右栏的不透明程度)三个滑杆调节,另有转场方式、视频音量/倍速/帧率上限与暂停条件;设置弹窗默认磨砂透出壁纸(可在该页关掉),菜单等浮层保持不透明保可读;图库随 WebDAV 同步的 zcode-pro 组一起上传(覆盖式,不留历史版本) |
44
45
  | 性能 | 空闲项目内存回收 | 长时间未使用且无任务运行的项目自动释放其占用的内存,启动后也会自动回收一次未使用的项目;会话记录不受影响,再次打开时自动恢复(时长可调) |
45
- | 代理 | 软件代理 | 为插件更新安装与本体升级设置 HTTP 代理,附连通性检测 |
46
+ | 代理 | 软件代理 | 为插件更新安装与本体升级设置 HTTP 代理(WebDAV 同步可选走代理,默认关),附连通性检测 |
46
47
  | 同步 | 设置同步 | 手动把 ZCode Pro 设置与模型设置备份到 WebDAV,或在新电脑上恢复;仅在点击时传输 |
47
48
  | Vision | 视觉代理 | 主模型不识图时自动交给视觉模型识别图片,识别描述带给主模型;可视化编辑代理链(zcode-vision 插件) |
48
49
  | Headroom | Headroom 压缩 | 管理压缩设备、省电切换与代理运行状态,headroom 本体检查更新与升级(headroom 插件) |
49
50
  | rtk | rtk 压缩 | 管理改写提醒与命令白名单,rtk 本体检查更新与一键升级(rtk 插件) |
50
- | 自动继续 | 回合失败自动继续 | 回合因请求故障失败(红色报错横幅)时自动发一条继续指令接上任务,重开会话(含重启后)没做完的任务也接上,认证、余额等永久性错误与手动停止不打扰;配置与 auto-continue 插件共用(auto-continue 插件) |
51
51
 
52
52
  各项功能均可在设置弹窗中开关或调整,ZCode 3.16.1 与 3.15.x 均可使用。
53
53
 
54
54
  ## 🎛 设置界面
55
55
 
56
- 右键点击 ZCode 侧边栏底部的设置按钮(齿轮)即可打开设置窗口,各标签页如下:
56
+ 右键点击 ZCode 侧边栏底部的设置按钮(齿轮)即可打开设置窗口,主要标签页如下:
57
57
 
58
58
  | 功能 | 快捷键 | 行为 · 全局提示词 |
59
59
  | --- | --- | --- |
60
60
  | <img src="docs/settings/01-features.png" width="280"> | <img src="docs/settings/02-shortcuts.png" width="280"> | <img src="docs/settings/03-behavior-global-prompt.png" width="280"> |
61
61
 
62
- | 行为 · 任务名提示词 | 外观 · 样式 | 外观 · 状态栏 |
62
+ | 行为 · 自动重命名 | 外观 · 样式 | 外观 · 状态栏 |
63
63
  | --- | --- | --- |
64
64
  | <img src="docs/settings/04-behavior-task-title.png" width="280"> | <img src="docs/settings/05-style-tweaks.png" width="280"> | <img src="docs/settings/06-style-status-bar.png" width="280"> |
65
65
 
@@ -75,7 +75,7 @@ ZCode 桌面版增强工具:壁纸引擎(图片/视频/网页)、皮肤主
75
75
 
76
76
  ## 📦 安装与使用
77
77
 
78
- > **版本匹配**:ZCode ≥ 3.16.1 请使用 **zcode-pro 1.1.0**(npm / PyPI / AUR 最新发布版);ZCode ≤ 3.15.x 请使用 **zcode-pro 0.20.3**(旧版仍可用)。
78
+ > **版本匹配**:ZCode ≥ 3.16.1 请使用 **zcode-pro 1.1.0 及以上**(当前最新 1.6.2);ZCode ≤ 3.15.x 请使用 **zcode-pro 0.20.3**(旧版仍可用)。
79
79
 
80
80
  安装后,通过应用菜单 / 开始菜单中的“ZCode Pro”快捷方式或终端命令 `zcode-pro` 启动 ZCode,增强在该方式下自动生效;使用原有 ZCode 入口启动时不加载增强。
81
81
 
@@ -163,6 +163,12 @@ bin\zcode-pro.cmd
163
163
  bin\zcode-pro.cmd setup
164
164
  ```
165
165
 
166
+ ## 🔒 安全说明
167
+
168
+ - 启动器会以 `--remote-debugging-port`(默认 9333)拉起 ZCode,靠这个调试端口注入增强脚本。该端口没有鉴权,本机任何进程(含其他系统用户)连上后可以在 ZCode 页面里执行任意脚本,只适合在个人电脑上使用;可用 `--cdp-port <端口>` 或环境变量 ZCODEPRO_CDP_PORT 换端口(挡得住随手扫描,挡不住有心的本机进程)。
169
+ - 本机服务只监听 127.0.0.1:47889,所有接口都要随机 token 才能调用;壁纸等媒体文件的直链上也带着同一个 token,外部网页读不走图库文件。
170
+ - WebDAV 密码与起名用的 API Key 明文存在本机配置文件里(文件权限限本人读写),同步上传时这两项只留本机;自定义模型供应商的 API Key 会随“模型设置”组上传到你自己的 WebDAV(这是同步模型配置本身需要的)。
171
+
166
172
  ## 📖 参考
167
173
 
168
174
  命令行选项(`zcode-pro --help` 查看全部):
@@ -175,8 +181,9 @@ bin\zcode-pro.cmd setup
175
181
  | `--inject-only` | 只接管已在运行的实例,不启动新实例 |
176
182
  | `--verbose` | 详细日志 |
177
183
  | `setup [--desktop] [--uninstall]` | 安装/撤销本机快捷方式(`--desktop` 同时加桌面) |
184
+ | `wallpaper <操作>` | 壁纸命令行:list / set / rotate / params / upload / delete(`wallpaper -h` 看详细用法) |
178
185
 
179
- 各选项也可用环境变量 `ZCODEPRO_*` 覆盖。
186
+ 仅 `--cdp-port`、`--helper-port`、`--zcode-path` 三个选项另有对应环境变量 `ZCODEPRO_CDP_PORT`、`ZCODEPRO_HELPER_PORT`、`ZCODEPRO_ZCODE_PATH`,命令行参数优先。
180
187
 
181
188
  配置与数据位置:
182
189
 
@@ -187,7 +194,6 @@ bin\zcode-pro.cmd setup
187
194
  | 全局提示词 | `~/.zcode/AGENTS.md` |
188
195
  | ZCode 行为配置(技能清单预算等) | `~/.zcode/cli/config.json` |
189
196
  | 视觉代理(zcode-vision 插件) | `~/.zcode/zcode-vision.json` |
190
- | 自动继续(auto-continue 插件) | `~/.zcode/auto-continue.json` |
191
197
  | rtk 压缩(rtk 插件) | `~/.zcode-rtk/` |
192
198
  | Headroom(headroom 插件) | `~/.zcode/headroom.json` |
193
199
 
@@ -5,7 +5,20 @@ set -e
5
5
 
6
6
  # 解析符号链接得到脚本真实路径(如 /usr/bin/zcode-pro → /usr/lib/zcode-pro/bin/zcode-pro),
7
7
  # 否则经 symlink 调用时 $0 目录不是安装目录,找不到 cli.mjs。
8
- SELF=$(readlink -f -- "$0" 2>/dev/null || printf '%s' "$0")
8
+ # readlink -f 不是 POSIX(旧 macOS/BSD 没有),解析不了就逐级跟符号链接;
9
+ # 连 readlink 都没有时保持原路径(与旧行为一致)
10
+ SELF=$0
11
+ _zp_n=0
12
+ while [ -L "$SELF" ]; do
13
+ # 符号链接成环(如 A→B→A)时靠次数上限退出,避免死循环
14
+ _zp_n=$((_zp_n + 1))
15
+ [ "$_zp_n" -le 40 ] || break
16
+ _zp_link=$(readlink -- "$SELF" 2>/dev/null) || break
17
+ case "$_zp_link" in
18
+ /*) SELF=$_zp_link ;;
19
+ *) SELF=$(dirname -- "$SELF")/$_zp_link ;;
20
+ esac
21
+ done
9
22
  SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$SELF")" && pwd)
10
23
  APP_DIR=$(dirname -- "$SCRIPT_DIR")
11
24
  ENTRY="$APP_DIR/cli.mjs"
@@ -40,13 +53,19 @@ find_zcode_binary() {
40
53
 
41
54
  # 优先用 ZCode 内置的 Node 运行时(版本恒与 ZCode 匹配,含 node:sqlite/全局 WebSocket),
42
55
  # 避免系统 node 过旧(<22.5 缺 node:sqlite、<22 缺全局 WebSocket)时启动失败;
43
- # 找不到 ZCode 可执行文件时才退回系统 node。
44
- ZCODE_BIN=$(find_zcode_binary) || {
56
+ # 找不到 ZCode 可执行文件、或运行时预检跑不起来时退回系统 node。
57
+ ZCODE_BIN=$(find_zcode_binary) || ZCODE_BIN=
58
+ # 运行时预检(与 zcode-pro.cmd、zcode_pro/cli.py 同款):PATH 等来源找到的可执行
59
+ # 文件可能不完整(缺 resources/ICU 数据等),以 Node 模式跑不起来就回退系统 node
60
+ if [ -n "$ZCODE_BIN" ]; then
61
+ ELECTRON_RUN_AS_NODE=1 "$ZCODE_BIN" -e "process.exit(0)" >/dev/null 2>&1 || ZCODE_BIN=
62
+ fi
63
+ if [ -z "$ZCODE_BIN" ]; then
45
64
  if command -v node >/dev/null 2>&1; then
46
65
  exec node --no-warnings "$ENTRY" "$@"
47
66
  fi
48
67
  echo "[zcodepro] 未找到 node,也未找到 ZCode 可执行文件。请安装 Node.js >= 22 或设置 ZCODEPRO_ZCODE_PATH。" >&2
49
68
  exit 1
50
- }
69
+ fi
51
70
  # 用 ZCode 内置的 Node 运行时执行启动器(ELECTRON_RUN_AS_NODE 使其表现为纯 Node)
52
71
  ELECTRON_RUN_AS_NODE=1 exec "$ZCODE_BIN" --no-warnings "$ENTRY" "$@"
@@ -1,17 +1,19 @@
1
1
  @echo off
2
2
  rem ZCode Pro 启动器(Windows)
3
- rem 优先用 ZCode 自带的 Node 运行时(ELECTRON_RUN_AS_NODE),无需安装 Node.js。
3
+ rem 优先用 ZCode 自带的 Node 运行时(ELECTRON_RUN_AS_NODE),无需安装 Node.js;
4
+ rem ZCode 找不到或运行时预检跑不起来时回退系统 node(需要 >= 22,旧版缺全局 WebSocket)。
5
+ rem 退出码原样透出(脚本/CI 可靠判断成败),流程用 goto 串,避免括号块里
6
+ rem %errorlevel% 在解析期展开拿不到真实退出码。
4
7
  setlocal
5
8
  set "SCRIPT_DIR=%~dp0"
6
9
  set "APP_DIR=%SCRIPT_DIR%.."
7
10
  set "ENTRY=%APP_DIR%\cli.mjs"
8
11
 
9
- where node >nul 2>nul
10
- if %errorlevel%==0 (
11
- node --no-warnings "%ENTRY%" %*
12
- exit /b %errorlevel%
13
- )
14
-
12
+ rem —— 定位 ZCode 可执行文件(与 src/host/paths.mjs、scripts/install.ps1 的
13
+ rem 推导规则同步,改一处要三处一起改)——
14
+ rem 已知限制:reg query 对 REG_EXPAND_SZ 值返回未展开的 %VAR% 字面量(paths.mjs
15
+ rem 的 valueAfter 会展开)。cmd 里没有可靠的二次展开方式(call set 对本身含 % 的
16
+ rem 路径同样会拆坏),这里不展开;本项目安装脚本写的都是 REG_SZ,不受影响。
15
17
  set "ZCODE_BIN=%ZCODEPRO_ZCODE_PATH%"
16
18
  rem 用户级 ZCODEPRO_ZCODE_PATH(安装脚本 -ZCodePath 写入)不会传播到已运行的资源
17
19
  rem 管理器,进程环境变量缺失时从注册表兜底读取,免去注销/重启(issue #1)。
@@ -27,22 +29,37 @@ if not exist "%ZCODE_BIN%" for /f "tokens=2*" %%A in (
27
29
  ) do if not exist "%ZCODE_BIN%" if exist "%%B" set "ZCODE_BIN=%%B"
28
30
  rem 最后兜底:ZCode 的 NSIS 安装器不写 App Paths、卸载表 DisplayIcon 常指向
29
31
  rem uninstallerIcon.ico,从其所在目录推导 ZCode.exe(win11 虚拟机实测,issue #1)。
30
- rem 逐条验证存在性、取第一个有效命中。src/host/paths.mjs 与 scripts/install.ps1
31
- rem 也各自实现卸载表定位(匹配方式不完全相同),改推导规则需三处同步。
32
+ rem 逐条验证存在性、取第一个有效命中。
32
33
  if not exist "%ZCODE_BIN%" for /f "tokens=2*" %%A in (
33
34
  'reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" /s /v DisplayIcon 2^>nul ^| findstr /i "zcode" ^|^|
34
35
  reg query "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall" /s /v DisplayIcon 2^>nul ^| findstr /i "zcode" ^|^|
35
36
  reg query "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" /s /v DisplayIcon 2^>nul ^| findstr /i "zcode"'
36
37
  ) do if not defined ZCODEPRO_UNINST_DIR if exist "%%~dpBZCode.exe" set "ZCODEPRO_UNINST_DIR=%%~dpB"
37
38
  if defined ZCODEPRO_UNINST_DIR set "ZCODE_BIN=%ZCODEPRO_UNINST_DIR%ZCode.exe"
38
- if not exist "%ZCODE_BIN%" (
39
- echo [zcodepro] neither node nor ZCode executable found. Install Node.js ^>= 22 or set ZCODEPRO_ZCODE_PATH. 1>&2
40
- rem 快捷方式静默启动时看不到控制台输出,同步落盘诊断日志(issue #1);日志超 512KB 轮转
41
- if not exist "%USERPROFILE%\.zcode" mkdir "%USERPROFILE%\.zcode" >nul 2>nul
42
- for %%I in ("%USERPROFILE%\.zcode\zcodepro.log") do if exist "%%~I" if %%~zI GTR 524288 move /y "%%~I" "%%~dpnI.log.old" >nul 2>nul
43
- echo [%DATE% %TIME%] neither node nor ZCode executable found >> "%USERPROFILE%\.zcode\zcodepro.log"
44
- exit /b 1
39
+
40
+ rem —— 优先 ZCode 运行时:预检能跑再正式跑(预检失败说明运行时不可用,回退 node)——
41
+ if exist "%ZCODE_BIN%" (
42
+ set "ELECTRON_RUN_AS_NODE=1"
43
+ "%ZCODE_BIN%" -e "process.exit(0)" >nul 2>nul
44
+ if not errorlevel 1 goto run_zcode
45
45
  )
46
- set "ELECTRON_RUN_AS_NODE=1"
46
+
47
+ where node >nul 2>nul
48
+ if errorlevel 1 goto fail
49
+ node --no-warnings "%ENTRY%" %*
50
+ exit /b %errorlevel%
51
+
52
+ :run_zcode
47
53
  "%ZCODE_BIN%" --no-warnings "%ENTRY%" %*
48
54
  exit /b %errorlevel%
55
+
56
+ :fail
57
+ echo [zcodepro] Neither Node.js nor the ZCode executable was found. Install Node.js ^>= 22 or set ZCODEPRO_ZCODE_PATH. 1>&2
58
+ rem 快捷方式静默启动时看不到控制台输出,同步落盘诊断日志(issue #1);日志超 524KB 轮转。
59
+ rem 日志目录与 src/host/main.mjs 的 winLog 保持一致(ZCODE_DATA_BASE_DIR 可迁移数据根)
60
+ set "ZP_LOGDIR=%ZCODE_DATA_BASE_DIR%\.zcode"
61
+ if "%ZP_LOGDIR%"=="\.zcode" set "ZP_LOGDIR=%USERPROFILE%\.zcode"
62
+ if not exist "%ZP_LOGDIR%" mkdir "%ZP_LOGDIR%" >nul 2>nul
63
+ for %%I in ("%ZP_LOGDIR%\zcodepro.log") do if exist "%%~I" if %%~zI GTR 524288 move /y "%%~I" "%%~dpnI.log.old" >nul 2>nul
64
+ echo [%DATE% %TIME%] neither node nor ZCode executable found >> "%ZP_LOGDIR%\zcodepro.log"
65
+ exit /b 1
@@ -9,7 +9,9 @@ If WScript.Arguments.Count > 0 Then
9
9
  Dim parts()
10
10
  ReDim parts(WScript.Arguments.Count - 1)
11
11
  For i = 0 To WScript.Arguments.Count - 1
12
- parts(i) = """" & WScript.Arguments(i) & """"
12
+ ' 剔除参数里的双引号(Windows 文件名不含引号):带着引号拼进 cmd /c 会提前
13
+ ' 闭合引号,后面的字符被当命令执行(如拖放文件名带引号的场景)
14
+ parts(i) = """" & Replace(WScript.Arguments(i), """", "") & """"
13
15
  Next
14
16
  cmd = cmd & " " & Join(parts, " ")
15
17
  End If