zcode-pro 1.11.0 → 1.12.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 +11 -4
- package/README.md +11 -4
- package/dist/inject.js +1895 -482
- package/package.json +2 -2
- package/src/host/helper.mjs +2412 -184
- package/src/host/hot-swap.mjs +76 -0
- package/src/host/main.mjs +35 -13
- package/src/host/prompt-inject.mjs +174 -0
- package/src/host/provider-proxy.mjs +298 -72
- package/src/host/proxy-chain.mjs +137 -0
- package/src/host/setup.mjs +39 -14
- package/src/host/taskIndex.mjs +7 -2
- package/src/host/tool-name-check.mjs +43 -12
- package/src/host/translate-lib.mjs +1 -1
- package/src/inject/core.js +240 -19
- package/src/inject/features/auto-continue.js +17 -15
- package/src/inject/features/hr-notice.js +70 -20
- package/src/inject/features/proxy-chain-notice.js +215 -0
- package/src/inject/features/settings-dialog.js +769 -338
- package/src/inject/features/status-bar.js +17 -6
- package/src/inject/features/turn-usage.js +22 -3
- package/src/inject/index.js +3 -0
- package/src/inject/locales/ja.js +121 -6
- package/src/inject/locales/ko.js +121 -6
- package/src/inject/locales/ru.js +121 -6
- package/src/inject/provider-model-thinking.js +142 -0
- package/src/inject/thinking-levels.js +12 -6
- package/src/inject/ui.js +113 -3
package/README.en.md
CHANGED
|
@@ -33,9 +33,11 @@ Grouped by topic: the category column is a settings tab, entries with `·` (e.g.
|
|
|
33
33
|
| | Session import | Copy sessions from Codex, Claude Code, dsh and pi into ZCode tasks: per-source tabs, search, project filter, multi-select import; the import is a snapshot that keeps text, thinking, tool calls and images without changing the source session |
|
|
34
34
|
| | Auto-update | Check and update zcode-plugins marketplace plugins in one click; can be set to update automatically when the settings window is opened |
|
|
35
35
|
| 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 |
|
|
36
|
-
| Behavior ·
|
|
36
|
+
| Behavior · Runtime | 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 |
|
|
37
|
+
| | Tool name check | Some model services cap MCP tool names; exceeding the cap fails the whole request: over-long server keys are shortened (the mapping is editable). ZCode upgrades and plugin updates restore long names, so they are shortened again on every launch; read-only files (e.g. root-owned files in the system install folder) are skipped while the rest are handled, with a corner notice carrying a one-line command to grant write permission |
|
|
37
38
|
| Behavior · Global prompt | Global prompt | Edit default instructions shared by all projects; applies to new sessions |
|
|
38
|
-
|
|
|
39
|
+
| | Prompt injection | Appends a block of text to the end of the system prompt on every turn; saving takes effect on the next turn. Unlike the global prompt it lives in the system layer, so later conversation does not dilute it. Only takes effect on providers checked under “Proxy · Proxy chains” — checking is the switch: there is no separate on/off for this feature, and it never enables forwarding for providers on its own. Can also inject into subagents. No length cap on the text; past 20,000 characters a hint warns it will eat into the conversation context |
|
|
40
|
+
| 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; on failure a corner notice shows the provider, model and reason |
|
|
39
41
|
| 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 |
|
|
40
42
|
| | Font adjustment | Custom UI font (all interface text except the terminal), question font and answer font |
|
|
41
43
|
| | Sidebar spacing | Fine-tune sidebar project spacing and task spacing |
|
|
@@ -45,6 +47,7 @@ Grouped by topic: the category column is a settings tab, entries with `·` (e.g.
|
|
|
45
47
|
| 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 |
|
|
46
48
|
| 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); four sliders — mask opacity (image fading toward the theme background color), image blur, panel opacity, plugin card veil (theme-colored layer behind plugin cards while the wallpaper shows through) — 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) |
|
|
47
49
|
| 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) |
|
|
50
|
+
| Proxy | Proxy chains | Chains compression (headroom), prompt injection and egress proxies together: checking a provider sends it through zcode-pro (compression → injection → egress), sharing one configuration and one forwarder; unchecking restores a direct connection and keeps it. The master switch restores every provider to direct at once (same as the `zcode-pro restore` command, for emergencies). While checked, the provider address is managed by the chain: change it in ZCode (or sync a new one in from another device) and the provider leaves the chain automatically, keeps the changed address, and a corner notice appears; deleting a chain asks for confirmation. Put egress proxies (clash and the like) last — ordinary proxies do not forward to local ports, so before headroom they fail. ZCode’s bundled plan providers (Start Plan etc.) do not take part. Includes an OpenCode Go compatibility switch (on by default). A health check runs every 30 seconds over forwarders, compression instances and the compression router; anything down is brought back automatically with a corner notice |
|
|
48
51
|
| Proxy | Software proxy | Set an HTTP proxy for marketplace updates/installs and for installing/upgrading headroom and rtk (WebDAV sync can optionally use it, off by default), with connectivity test |
|
|
49
52
|
| 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 |
|
|
50
53
|
| 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) |
|
|
@@ -61,7 +64,7 @@ Right-click the settings button (gear) at the bottom of the ZCode sidebar to ope
|
|
|
61
64
|
| --- | --- | --- |
|
|
62
65
|
| <img src="docs/settings/01-features.png" width="280"> | <img src="docs/settings/02-appearance-wallpaper.png" width="280"> | <img src="docs/settings/03-appearance-theme.png" width="280"> |
|
|
63
66
|
|
|
64
|
-
| Appearance · Styles | Appearance · Status bar | Behavior ·
|
|
67
|
+
| Appearance · Styles | Appearance · Status bar | Behavior · Runtime |
|
|
65
68
|
| --- | --- | --- |
|
|
66
69
|
| <img src="docs/settings/04-appearance-styles.png" width="280"> | <img src="docs/settings/05-appearance-status-bar.png" width="280"> | <img src="docs/settings/06-behavior-zcode-cli.png" width="280"> |
|
|
67
70
|
|
|
@@ -89,6 +92,10 @@ Right-click the settings button (gear) at the bottom of the ZCode sidebar to ope
|
|
|
89
92
|
|
|
90
93
|
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.
|
|
91
94
|
|
|
95
|
+
### 🧯 Emergency restore
|
|
96
|
+
|
|
97
|
+
After an unclean exit (kill, power loss) the provider addresses may be left pointing at local ports, and starting plain ZCode from its own entry then cannot reach models. Run `zcode-pro restore` in a terminal to restore everything at once: chain-managed provider addresses go back to their real upstreams, the chain exit records in headroom are cleared, and the master switch is turned off. Turning the master switch off under Settings → Proxy → Proxy chains does the same thing.
|
|
98
|
+
|
|
92
99
|
### 📦 npm / PyPI
|
|
93
100
|
|
|
94
101
|
At runtime the Node runtime bundled with ZCode is preferred; if ZCode cannot be found, system Node.js (≥ 22) is used.
|
|
@@ -201,7 +208,7 @@ Configuration and data locations:
|
|
|
201
208
|
| --- | --- |
|
|
202
209
|
| Feature switches, appearance (theme / wallpaper / styles), shortcuts, proxy and sync settings | `~/.zcode/zcodepro.json` |
|
|
203
210
|
| Startup diagnostics log | `~/.zcode/zcodepro.log` |
|
|
204
|
-
| Global prompt | `~/.zcode/AGENTS.md` |
|
|
211
|
+
| Global prompt, prompt injection | `~/.zcode/AGENTS.md`, `~/.zcode/zcodepro.json` |
|
|
205
212
|
| ZCode behavior settings (skill listing budget etc.) | `~/.zcode/cli/config.json` |
|
|
206
213
|
| Wallpaper library | `~/.zcode/backgrounds/` |
|
|
207
214
|
| Vision proxy (zcode-vision plugin) | `~/.zcode/zcode-vision.json` |
|
package/README.md
CHANGED
|
@@ -33,9 +33,11 @@ ZCode Pro 是 ZCode 桌面版的增强包:壁纸引擎(图片/视频/网页
|
|
|
33
33
|
| | 导入会话 | 把 Codex、Claude Code、dsh、pi 的历史会话复制成 ZCode 任务:按来源分标签,可搜索、按项目筛选、多选导入;导入是快照,保留文字、思考、工具调用和图片,不改变源会话 |
|
|
34
34
|
| | 插件自动更新 | 一键检查并更新 zcode-plugins 市场插件,可设为打开设置时自动更新 |
|
|
35
35
|
| 快捷键 | 会话快捷键自定义 | 会话快捷切换的五个入口键(默认 `alt+z` / `x` / `c` / `e` / `r`)逐个修改:点“修改”后按下新键位(字母/数字)即生效,键位冲突会提示;可一键重置为默认 |
|
|
36
|
-
| 行为 ·
|
|
36
|
+
| 行为 · 运行时 | ZCode CLI | 技能清单检查:统计完整清单字符数并对照注入预算,超出时提示清单被降级为只剩技能名和路径并给出建议预算;可配置技能系统、清单预算、额外技能目录与功能开关;工作区记忆仍在官方 设置 → Agent 能力 → 记忆 中配置,改动新会话起生效 |
|
|
37
|
+
| | 工具名合规检查 | 有的模型服务限制 MCP 工具名长度,超长会让整次请求失败:把过长的服务器键名改短(映射可编辑)。ZCode 升级或插件更新会改回长名,每次启动自动改短;只读文件(如系统安装目录里 root 的文件)跳过、继续处理别的,右下角提示一键加写权限的命令 |
|
|
37
38
|
| 行为 · 全局提示词 | 全局提示词 | 编辑所有项目共享的默认指令,新会话起生效 |
|
|
38
|
-
|
|
|
39
|
+
| | 提示词注入 | 把一段文字追加到每一轮请求的系统提示词末尾,保存后下一轮即生效;与全局提示词不同,它进系统层而不是对话层,不会被后续对话稀释。只对在“代理 · 代理链”里勾选的供应商生效——勾选就是开关,本功能没有单独的启停开关,也不会自动为供应商开启转发;可设为同时注入子代理;正文不设长度上限,超过两万字时提示会占用对话上下文 |
|
|
40
|
+
| 行为 · 自动重命名 | 自动重命名 | 新会话开始作答时按所选供应商与提示词生成任务名(默认跟随当前会话、glm-5.3-flash,提问阶段的多条消息都计入),生成结果按手动重命名保存,官方自动标题不再覆盖;可在设置中选供应商、模型并编辑提示词,附测试按钮;任务行悬浮按钮与右键菜单“重命名任务”下可按最近问答手动重命名,入口开关与问答数在设置里;起名失败时右下角提示供应商、模型与原因 |
|
|
39
41
|
| 外观 · 样式 | 侧栏菜单并入顶栏 | “新建任务 / 搜索 / 自动化 / 插件市场”收成顶部导航栏的图标按钮,对应界面打开时高亮 |
|
|
40
42
|
| | 字体调整 | 自定义界面字体(除终端外全部界面文字)、提问字体与回答字体 |
|
|
41
43
|
| | 侧栏间距调整 | 微调侧边栏项目间距与任务间距 |
|
|
@@ -45,6 +47,7 @@ ZCode Pro 是 ZCode 桌面版的增强包:壁纸引擎(图片/视频/网页
|
|
|
45
47
|
| 外观 · 主题 | 界面皮肤 | 内置 11 套知名编辑器主题配色(Dracula / Nord / Tokyo Night / Catppuccin / Gruvbox / One Dark / Solarized / Rosé Pine / Everforest / Night Owl / Kanagawa),自动匹配 ZCode 的浅色 / 深色模式;另可自定义主题:浅色、深色各选 5 个颜色生成整套配色,改色实时生效 |
|
|
46
48
|
| 外观 · 壁纸 | 壁纸 | 整窗铺背景,五种来源:无背景 / 本地图库(可传多张、点选当前、可单删)/ 文件夹(原地读取,按间隔定时轮换,可选随机或按文件名顺序)/ 网址(可按间隔定时刷新,配合随机图 API)/ 网页(沙箱 iframe 铺在后方);左栏 / 中栏 / 右栏可分区独立设置(仅静态图,缩放与遮罩可单独调、可跟随全局);遮罩不透明度(图片向主题背景色淡化程度)、图片模糊、面板不透明度(左栏、中栏与右栏的不透明程度)、插件卡片遮罩(插件卡片透出壁纸时垫在卡片底下的主题色遮罩)四个滑杆调节,另有转场方式、视频音量/倍速/帧率上限与暂停条件;设置弹窗默认磨砂透出壁纸(可在该页关掉),菜单等浮层保持不透明保可读;图库随 WebDAV 同步的 zcode-pro 组一起上传(覆盖式,不留历史版本) |
|
|
47
49
|
| 性能 | 空闲项目内存回收 | 长时间未使用且无任务运行的项目自动释放其占用的内存,启动后也会自动回收一次未使用的项目;会话记录不受影响,再次打开时自动恢复(时长可调) |
|
|
50
|
+
| 代理 | 代理链 | 把压缩(headroom)、提示词注入、出网代理串成一条链:勾选供应商即经过 zcode-pro(压缩 → 注入 → 出网),共用一份配置与一个转发器;取消勾选即还原为直连并保持直连。总开关一键把全部供应商还原为直连(命令行 `zcode-pro restore` 同款,救急用)。勾选期间供应商地址由链管理:在 ZCode 里改了地址(或从别的设备同步来新地址)会自动退出链、保持改后地址,并在右下角提示;删除链需确认。出网代理(如 clash)建议放在链的最后——普通代理不转发本机端口,放在 headroom 之前会失败。ZCode 自带的套餐供应商(Start Plan 等)不参与。附 OpenCode Go 兼容开关(默认开)。每 30 秒巡检转发器、压缩实例与压缩路由,掉了自动补起并在右下角提示 |
|
|
48
51
|
| 代理 | 软件代理 | 为插件市场更新安装、headroom 与 rtk 的安装升级设置 HTTP 代理(WebDAV 同步可选走代理,默认关),附连通性检测 |
|
|
49
52
|
| 同步 | 设置同步 | 手动把 ZCode Pro 设置与模型设置备份到 WebDAV,或在新电脑上恢复;仅在点击时传输 |
|
|
50
53
|
| Vision | 视觉代理 | 主模型不识图时自动交给视觉模型识别图片,识别描述带给主模型;可视化编辑代理链(zcode-vision 插件) |
|
|
@@ -61,7 +64,7 @@ ZCode Pro 是 ZCode 桌面版的增强包:壁纸引擎(图片/视频/网页
|
|
|
61
64
|
| --- | --- | --- |
|
|
62
65
|
| <img src="docs/settings/01-features.png" width="280"> | <img src="docs/settings/02-appearance-wallpaper.png" width="280"> | <img src="docs/settings/03-appearance-theme.png" width="280"> |
|
|
63
66
|
|
|
64
|
-
| 外观 · 样式 | 外观 · 状态栏 | 行为 ·
|
|
67
|
+
| 外观 · 样式 | 外观 · 状态栏 | 行为 · 运行时 |
|
|
65
68
|
| --- | --- | --- |
|
|
66
69
|
| <img src="docs/settings/04-appearance-styles.png" width="280"> | <img src="docs/settings/05-appearance-status-bar.png" width="280"> | <img src="docs/settings/06-behavior-zcode-cli.png" width="280"> |
|
|
67
70
|
|
|
@@ -89,6 +92,10 @@ ZCode Pro 是 ZCode 桌面版的增强包:壁纸引擎(图片/视频/网页
|
|
|
89
92
|
|
|
90
93
|
安装后,通过应用菜单 / 开始菜单中的“ZCode Pro”快捷方式或终端命令 `zcode-pro` 启动 ZCode,增强在该方式下自动生效;使用原有 ZCode 入口启动时不加载增强。
|
|
91
94
|
|
|
95
|
+
### 🧯 救急还原
|
|
96
|
+
|
|
97
|
+
异常退出(强杀、断电)时来不及清理,供应商地址可能停在本机端口,之后直接用原生 ZCode 入口启动会连不上模型。在终端跑 `zcode-pro restore` 一键还原:把代理链管理过的供应商地址改回真实上游、清掉 headroom 登记里的链出口、关闭代理链总开关。设置 → 代理 → 代理链 里关总开关做的是同一件事。
|
|
98
|
+
|
|
92
99
|
### 📦 npm / PyPI
|
|
93
100
|
|
|
94
101
|
运行时优先复用 ZCode 自带的运行时;未找到 ZCode 时回退系统 Node.js(≥ 22)。
|
|
@@ -201,7 +208,7 @@ bin\zcode-pro.cmd setup
|
|
|
201
208
|
| --- | --- |
|
|
202
209
|
| 功能开关、外观(主题/壁纸/样式)、快捷键、代理与同步配置 | `~/.zcode/zcodepro.json` |
|
|
203
210
|
| 启动诊断日志 | `~/.zcode/zcodepro.log` |
|
|
204
|
-
|
|
|
211
|
+
| 全局提示词、提示词注入 | `~/.zcode/AGENTS.md`、`~/.zcode/zcodepro.json` |
|
|
205
212
|
| ZCode 行为配置(技能清单预算等) | `~/.zcode/cli/config.json` |
|
|
206
213
|
| 壁纸图库 | `~/.zcode/backgrounds/` |
|
|
207
214
|
| 视觉代理(zcode-vision 插件) | `~/.zcode/zcode-vision.json` |
|