zcode-pro 1.8.0__tar.gz → 1.8.1__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 (72) hide show
  1. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/PKG-INFO +3 -3
  2. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/README.en.md +2 -2
  3. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/README.md +2 -2
  4. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/dist/inject.js +96 -12
  5. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/package.json +1 -1
  6. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/host/helper.mjs +6 -0
  7. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/host/wallpaper.mjs +3 -1
  8. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/core.js +4 -0
  9. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/settings-dialog.js +5 -0
  10. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/styles.js +28 -8
  11. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/theme.js +43 -12
  12. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/ui.js +10 -0
  13. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/zcode_pro/__init__.py +1 -1
  14. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/.gitignore +0 -0
  15. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/LICENSE +0 -0
  16. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/bin/zcode-pro +0 -0
  17. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/bin/zcode-pro.cmd +0 -0
  18. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/bin/zcode-pro.mjs +0 -0
  19. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/bin/zcode-pro.vbs +0 -0
  20. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/cli.mjs +0 -0
  21. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/pyproject.toml +0 -0
  22. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/host/cdp.mjs +0 -0
  23. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/host/main.mjs +0 -0
  24. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/host/mcp-bridge.mjs +0 -0
  25. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/host/paths.mjs +0 -0
  26. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/host/pickFolder.mjs +0 -0
  27. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/host/session-import/index.mjs +0 -0
  28. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/host/session-import/sources.mjs +0 -0
  29. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/host/session-import/util.mjs +0 -0
  30. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/host/session-import/write.mjs +0 -0
  31. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/host/session-import/zstd.mjs +0 -0
  32. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/host/settings.mjs +0 -0
  33. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/host/setup.mjs +0 -0
  34. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/host/skill-stats.mjs +0 -0
  35. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/host/taskIndex.mjs +0 -0
  36. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/host/taskOrder.mjs +0 -0
  37. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/host/version.mjs +0 -0
  38. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/host/webdav.mjs +0 -0
  39. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/alias-migration.js +0 -0
  40. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/alias.js +0 -0
  41. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/auto-rename.js +0 -0
  42. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/composer-provider.js +0 -0
  43. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/copy-path.js +0 -0
  44. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/file-menu.js +0 -0
  45. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/idle-reclaim.js +0 -0
  46. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/image-menu.js +0 -0
  47. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/newtab-panels.js +0 -0
  48. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/open-folder.js +0 -0
  49. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/pinned-collapse.js +0 -0
  50. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/plugin-card-retry.js +0 -0
  51. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/plugin-updates.js +0 -0
  52. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/project-menu.js +0 -0
  53. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/relocate-dialog.js +0 -0
  54. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/sandbox-reclaim.js +0 -0
  55. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/session-import.js +0 -0
  56. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/session-link.js +0 -0
  57. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/session-switch.js +0 -0
  58. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/settings-entry.js +0 -0
  59. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/status-bar.js +0 -0
  60. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/subagent-icon.js +0 -0
  61. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/table-copy.js +0 -0
  62. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/task-order.js +0 -0
  63. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/title-gen.js +0 -0
  64. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/title-lock.js +0 -0
  65. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/toolbar-icons.js +0 -0
  66. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/turn-usage.js +0 -0
  67. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/ws-rows.js +0 -0
  68. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/features/ws-running.js +0 -0
  69. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/index.js +0 -0
  70. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/src/inject/provider-fields.js +0 -0
  71. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/zcode_pro/__main__.py +0 -0
  72. {zcode_pro-1.8.0 → zcode_pro-1.8.1}/zcode_pro/cli.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: zcode-pro
3
- Version: 1.8.0
3
+ Version: 1.8.1
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
@@ -62,7 +62,7 @@ ZCode 桌面版增强工具:壁纸引擎(图片/视频/网页)、皮肤主
62
62
  | 外观 · 状态栏 | 状态栏统计 | 提问输入框右下角和每轮回答最后显示统计项:最近输出 tokens/s(流式生成中按文本增长估算并标 ≈,调用完成后切到官方 60 秒窗口值,回答结束后停留在最后速率)、上下文占用(占用高时变色)、提问次数、今日/累计 token、任务总数,以官方数据为主;各项的顺序与显隐在 设置 → 外观 → 状态栏 调整。速率与每轮用量按会话记录统计,子代理是独立的会话记录、不计入 |
63
63
  | | 每轮回答 token 用量 | 在每条回答末尾操作按钮的时间后面显示该轮的输入/输出 token 与缓存命中率(本地记录只保留最近一段,更早的回答不标注) |
64
64
  | 外观 · 主题 | 界面皮肤 | 内置 11 套知名编辑器主题配色(Dracula / Nord / Tokyo Night / Catppuccin / Gruvbox / One Dark / Solarized / Rosé Pine / Everforest / Night Owl / Kanagawa),自动匹配 ZCode 的浅色 / 深色模式;另可自定义主题:浅色、深色各选 5 个颜色生成整套配色,改色实时生效 |
65
- | 外观 · 壁纸 | 壁纸 | 整窗铺背景,五种来源:无背景 / 本地图库(可传多张、点选当前、可单删)/ 文件夹(原地读取,按间隔定时轮换,可选随机或按文件名顺序)/ 网址(可按间隔定时刷新,配合随机图 API)/ 网页(沙箱 iframe 铺在后方);左栏 / 中栏 / 右栏可分区独立设置(仅静态图,缩放与遮罩可单独调、可跟随全局);遮罩不透明度(图片向主题背景色淡化程度)、图片模糊、面板不透明度(左栏、中栏与右栏的不透明程度)三个滑杆调节,另有转场方式、视频音量/倍速/帧率上限与暂停条件;设置弹窗默认磨砂透出壁纸(可在该页关掉),菜单等浮层保持不透明保可读;图库随 WebDAV 同步的 zcode-pro 组一起上传(覆盖式,不留历史版本) |
65
+ | 外观 · 壁纸 | 壁纸 | 整窗铺背景,五种来源:无背景 / 本地图库(可传多张、点选当前、可单删)/ 文件夹(原地读取,按间隔定时轮换,可选随机或按文件名顺序)/ 网址(可按间隔定时刷新,配合随机图 API)/ 网页(沙箱 iframe 铺在后方);左栏 / 中栏 / 右栏可分区独立设置(仅静态图,缩放与遮罩可单独调、可跟随全局);遮罩不透明度(图片向主题背景色淡化程度)、图片模糊、面板不透明度(左栏、中栏与右栏的不透明程度)、插件卡片遮罩(插件卡片透出壁纸时垫在卡片底下的主题色遮罩)四个滑杆调节,另有转场方式、视频音量/倍速/帧率上限与暂停条件;设置弹窗默认磨砂透出壁纸(可在该页关掉),菜单等浮层保持不透明保可读;图库随 WebDAV 同步的 zcode-pro 组一起上传(覆盖式,不留历史版本) |
66
66
  | 性能 | 空闲项目内存回收 | 长时间未使用且无任务运行的项目自动释放其占用的内存,启动后也会自动回收一次未使用的项目;会话记录不受影响,再次打开时自动恢复(时长可调) |
67
67
  | 代理 | 软件代理 | 为插件更新安装与本体升级设置 HTTP 代理(WebDAV 同步可选走代理,默认关),附连通性检测 |
68
68
  | 同步 | 设置同步 | 手动把 ZCode Pro 设置与模型设置备份到 WebDAV,或在新电脑上恢复;仅在点击时传输 |
@@ -96,7 +96,7 @@ ZCode 桌面版增强工具:壁纸引擎(图片/视频/网页)、皮肤主
96
96
 
97
97
  ## 📦 安装与使用
98
98
 
99
- > **版本匹配**:ZCode ≥ 3.16.1 请使用 **zcode-pro 1.1.0 及以上**(当前最新 1.8.0);ZCode ≤ 3.15.x 请使用 **zcode-pro 0.20.3**(旧版仍可用)。
99
+ > **版本匹配**:ZCode ≥ 3.16.1 请使用 **zcode-pro 1.1.0 及以上**(当前最新 1.8.1);ZCode ≤ 3.15.x 请使用 **zcode-pro 0.20.3**(旧版仍可用)。
100
100
 
101
101
  安装后,通过应用菜单 / 开始菜单中的“ZCode Pro”快捷方式或终端命令 `zcode-pro` 启动 ZCode,增强在该方式下自动生效;使用原有 ZCode 入口启动时不加载增强。
102
102
 
@@ -42,7 +42,7 @@ Grouped by topic: the category column is a settings tab, entries with `·` (e.g.
42
42
  | 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 (estimated from text growth and marked ≈ while streaming, switches to the official 60-second window value after the call completes, and 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 |
43
43
  | | 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) |
44
44
  | 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 |
45
- | 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) |
45
+ | 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) |
46
46
  | 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) |
47
47
  | 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 |
48
48
  | 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 |
@@ -76,7 +76,7 @@ Right-click the settings button (gear) at the bottom of the ZCode sidebar to ope
76
76
 
77
77
  ## 📦 Installation
78
78
 
79
- > **Version match**: for ZCode ≥ 3.16.1 use **zcode-pro 1.1.0 or newer** (the latest is 1.8.0); for ZCode 3.15.x and earlier use **zcode-pro 0.20.3** (the previous release, still available).
79
+ > **Version match**: for ZCode ≥ 3.16.1 use **zcode-pro 1.1.0 or newer** (the latest is 1.8.1); for ZCode 3.15.x and earlier use **zcode-pro 0.20.3** (the previous release, still available).
80
80
 
81
81
  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.
82
82
 
@@ -42,7 +42,7 @@ ZCode 桌面版增强工具:壁纸引擎(图片/视频/网页)、皮肤主
42
42
  | 外观 · 状态栏 | 状态栏统计 | 提问输入框右下角和每轮回答最后显示统计项:最近输出 tokens/s(流式生成中按文本增长估算并标 ≈,调用完成后切到官方 60 秒窗口值,回答结束后停留在最后速率)、上下文占用(占用高时变色)、提问次数、今日/累计 token、任务总数,以官方数据为主;各项的顺序与显隐在 设置 → 外观 → 状态栏 调整。速率与每轮用量按会话记录统计,子代理是独立的会话记录、不计入 |
43
43
  | | 每轮回答 token 用量 | 在每条回答末尾操作按钮的时间后面显示该轮的输入/输出 token 与缓存命中率(本地记录只保留最近一段,更早的回答不标注) |
44
44
  | 外观 · 主题 | 界面皮肤 | 内置 11 套知名编辑器主题配色(Dracula / Nord / Tokyo Night / Catppuccin / Gruvbox / One Dark / Solarized / Rosé Pine / Everforest / Night Owl / Kanagawa),自动匹配 ZCode 的浅色 / 深色模式;另可自定义主题:浅色、深色各选 5 个颜色生成整套配色,改色实时生效 |
45
- | 外观 · 壁纸 | 壁纸 | 整窗铺背景,五种来源:无背景 / 本地图库(可传多张、点选当前、可单删)/ 文件夹(原地读取,按间隔定时轮换,可选随机或按文件名顺序)/ 网址(可按间隔定时刷新,配合随机图 API)/ 网页(沙箱 iframe 铺在后方);左栏 / 中栏 / 右栏可分区独立设置(仅静态图,缩放与遮罩可单独调、可跟随全局);遮罩不透明度(图片向主题背景色淡化程度)、图片模糊、面板不透明度(左栏、中栏与右栏的不透明程度)三个滑杆调节,另有转场方式、视频音量/倍速/帧率上限与暂停条件;设置弹窗默认磨砂透出壁纸(可在该页关掉),菜单等浮层保持不透明保可读;图库随 WebDAV 同步的 zcode-pro 组一起上传(覆盖式,不留历史版本) |
45
+ | 外观 · 壁纸 | 壁纸 | 整窗铺背景,五种来源:无背景 / 本地图库(可传多张、点选当前、可单删)/ 文件夹(原地读取,按间隔定时轮换,可选随机或按文件名顺序)/ 网址(可按间隔定时刷新,配合随机图 API)/ 网页(沙箱 iframe 铺在后方);左栏 / 中栏 / 右栏可分区独立设置(仅静态图,缩放与遮罩可单独调、可跟随全局);遮罩不透明度(图片向主题背景色淡化程度)、图片模糊、面板不透明度(左栏、中栏与右栏的不透明程度)、插件卡片遮罩(插件卡片透出壁纸时垫在卡片底下的主题色遮罩)四个滑杆调节,另有转场方式、视频音量/倍速/帧率上限与暂停条件;设置弹窗默认磨砂透出壁纸(可在该页关掉),菜单等浮层保持不透明保可读;图库随 WebDAV 同步的 zcode-pro 组一起上传(覆盖式,不留历史版本) |
46
46
  | 性能 | 空闲项目内存回收 | 长时间未使用且无任务运行的项目自动释放其占用的内存,启动后也会自动回收一次未使用的项目;会话记录不受影响,再次打开时自动恢复(时长可调) |
47
47
  | 代理 | 软件代理 | 为插件更新安装与本体升级设置 HTTP 代理(WebDAV 同步可选走代理,默认关),附连通性检测 |
48
48
  | 同步 | 设置同步 | 手动把 ZCode Pro 设置与模型设置备份到 WebDAV,或在新电脑上恢复;仅在点击时传输 |
@@ -76,7 +76,7 @@ ZCode 桌面版增强工具:壁纸引擎(图片/视频/网页)、皮肤主
76
76
 
77
77
  ## 📦 安装与使用
78
78
 
79
- > **版本匹配**:ZCode ≥ 3.16.1 请使用 **zcode-pro 1.1.0 及以上**(当前最新 1.8.0);ZCode ≤ 3.15.x 请使用 **zcode-pro 0.20.3**(旧版仍可用)。
79
+ > **版本匹配**:ZCode ≥ 3.16.1 请使用 **zcode-pro 1.1.0 及以上**(当前最新 1.8.1);ZCode ≤ 3.15.x 请使用 **zcode-pro 0.20.3**(旧版仍可用)。
80
80
 
81
81
  安装后,通过应用菜单 / 开始菜单中的“ZCode Pro”快捷方式或终端命令 `zcode-pro` 启动 ZCode,增强在该方式下自动生效;使用原有 ZCode 入口启动时不加载增强。
82
82
 
@@ -541,6 +541,8 @@
541
541
  themeBgBlur: "\u753B\u9762\u6A21\u7CCA",
542
542
  themeBgPanel: "\u9762\u677F\u4E0D\u900F\u660E\u5EA6",
543
543
  themeBgDialogFrost: "\u8BBE\u7F6E\u5F39\u7A97\u78E8\u7802",
544
+ themeBgCardVeil: "\u63D2\u4EF6\u5361\u7247\u906E\u7F69",
545
+ themeBgCardVeilHint: "\u58C1\u7EB8\u5F00\u7740\u65F6\u57AB\u5728\u63D2\u4EF6\u5361\u7247\u5E95\u4E0B\u7684\u4E3B\u9898\u8272\u906E\u7F69\uFF1A0 \u4E0D\u906E\uFF08\u58C1\u7EB8\u539F\u6837\u900F\u51FA\uFF09\uFF0C\u8D8A\u5927\u5361\u7247\u8D8A\u5B9E\u5728\u3001\u8D8A\u6697\u3002",
544
546
  themeBgMisc: "\u5176\u4ED6",
545
547
  themeBgFollowGlobal: "\u8DDF\u968F\u5168\u5C40",
546
548
  themeBgRegionsHint: "\u6765\u6E90\u9009\u201C\u9ED8\u8BA4\uFF08\u5168\u5C40\u58C1\u7EB8\uFF09\u201D\u5373\u8BE5\u533A\u4E0D\u5355\u72EC\u8BBE\u7F6E\u3001\u76F4\u63A5\u663E\u793A\u5168\u5C40\u58C1\u7EB8\uFF1B\u6BCF\u884C\u7684\u7F29\u653E\u3001\u906E\u7F69\u53EF\u5355\u72EC\u8BBE\u7F6E\uFF0C\u9009\u201C\u8DDF\u968F\u5168\u5C40\u201D\u5373\u8DDF\u968F\u201C\u753B\u9762\u201D\u7684\u503C\uFF1B\u6A21\u7CCA\u3001\u8F6C\u573A\u3001\u64AD\u653E\u4EC5\u4F5C\u7528\u4E8E\u5168\u5C40\u58C1\u7EB8\uFF08\u5206\u533A\u53EA\u80FD\u94FA\u56FE\uFF0C\u4E0D\u80FD\u64AD\u89C6\u9891\uFF09\u3002\u5206\u533A\u7528\u6587\u4EF6\u5939\u65F6\uFF0C\u8F6E\u6362\u95F4\u9694\u4E0E\u968F\u673A\u987A\u5E8F\u6CBF\u7528\u5168\u5C40\u8BBE\u7F6E\u3002",
@@ -1170,6 +1172,8 @@
1170
1172
  themeBgBlur: "Wallpaper blur",
1171
1173
  themeBgPanel: "Panel opacity",
1172
1174
  themeBgDialogFrost: "Frosted settings window",
1175
+ themeBgCardVeil: "Plugin card veil",
1176
+ themeBgCardVeilHint: "Theme-colored veil behind plugin cards while a wallpaper is on: 0 shows the wallpaper as-is; higher makes cards more solid and darker.",
1173
1177
  themeBgMisc: "Other",
1174
1178
  themeBgFollowGlobal: "Follow global",
1175
1179
  themeBgRegionsHint: '"Default (global)" means the region is not set on its own and just shows the global wallpaper. Fit and mask can be set per row; "Follow global" uses the Display values. Blur, transition and playback apply only to the global wallpaper (regions are static images, no video). Region folders reuse the global rotation interval and order settings.',
@@ -2205,6 +2209,16 @@
2205
2209
  .zcodepro-textarea.zcodepro-textarea-sm { min-height: 0; }
2206
2210
  /* \u5168\u5C40\u63D0\u793A\u8BCD\u5927\u7F16\u8F91\u6846\uFF1A\u9ED8\u8BA4/\u6700\u5927\u9AD8\u5EA6\u90FD\u6BD4\u9ED8\u8BA4\u6587\u672C\u57DF\u66F4\u9AD8 */
2207
2211
  .zcodepro-textarea.zcodepro-textarea-lg { min-height: 16rem; max-height: 40rem; }
2212
+ /* \u8BBE\u7F6E\u9875\u4E0B\u62C9\u6846\uFF1A\u58C1\u7EB8\u5F00\u7740\u65F6\u8868\u9762 token \u88AB\u6362\u6210 color-mix \u534A\u900F\u660E\uFF0C\u539F\u751F\u4E0B\u62C9\u5217\u8868
2213
+ \u4F1A\u6E32\u67D3\u6210\u9ED1\u5E95 + \u9ED8\u8BA4\u9ED1\u5B57\uFF08\u6DF1\u8272\u6A21\u5F0F\u770B\u4E0D\u6E05\uFF09\u3002\u7ED9\u9009\u9879\u5199\u6B7B\u4E3B\u9898\u7684\u4E0D\u900F\u660E\u5E95\u8272\u4E0E
2214
+ \u6B63\u6587\u8272\uFF0C\u5E76\u6309\u660E\u6697\u7ED9 select \u4E00\u4E2A color-scheme\uFF0C\u5217\u8868\u5728\u4E24\u79CD\u6A21\u5F0F\u4E0B\u90FD\u53EF\u8BFB */
2215
+ [data-zcodepro-settings] select { color-scheme: light; }
2216
+ html.theme-zai-dark [data-zcodepro-settings] select,
2217
+ html.dark [data-zcodepro-settings] select { color-scheme: dark; }
2218
+ [data-zcodepro-settings] select option {
2219
+ background-color: var(--color-popover, #fff);
2220
+ color: var(--color-foreground, #111);
2221
+ }
2208
2222
  /* \u884C\u9AD8\u6ED1\u6746\uFF08\u6837\u5F0F\u8C03\u6574\u6807\u7B7E\u9875\uFF09 */
2209
2223
  .zcodepro-range {
2210
2224
  -webkit-appearance: none;
@@ -5390,7 +5404,16 @@
5390
5404
  `.history-message.flex.flex-col > * + *:not([data-slot="collapsible-content"]){margin-block-start:${n}px !important;margin-top:${n}px !important;}`,
5391
5405
  // 工具/状态卡片(“N 个文件已更改”等)上方间距下限 8px:
5392
5406
  // 段落间距调到 0 时也不至于贴死(gap 与 margin 在弹性布局里相加)
5393
- `${CONV} .flex.flex-col.gap-5 > [data-slot="collapsible"]{margin-block-start:max(0px, calc(8px - ${n}px)) !important;margin-top:max(0px, calc(8px - ${n}px)) !important;}`
5407
+ `${CONV} .flex.flex-col.gap-5 > [data-slot="collapsible"]{margin-block-start:max(0px, calc(8px - ${n}px)) !important;margin-top:max(0px, calc(8px - ${n}px)) !important;}`,
5408
+ // 3.18 的“工作中”槽位带 -8px 上边距(默认 gap 20 → 实际 12px);行间距调小后
5409
+ // 这层负边距会把槽位拉得贴住上面的内容(gap 7 → 实际 -1px)。清掉负边距,
5410
+ // 让它跟其它块一样按设置的行间距排
5411
+ `${CONV} .flex.flex-col.gap-5 > [data-zcode-chat-loading-slot]:not(:first-child){margin-block-start:0 !important;margin-top:0 !important;}`,
5412
+ // 过程视图(思考/工具摘要/过程正文)的行块:应用给容器 4px gap + 每行
5413
+ // 12px 上内边距(共 16px)。段落间距设置时直接接管:gap 归零、上内边距
5414
+ // 按设置值,总间距等于设置值(设 0 就完全贴紧)
5415
+ `${CONV} [data-conversation-work-items]{gap:0 !important;}`,
5416
+ `${CONV} [data-conversation-work-items] > * + *{padding-top:${n}px !important;}`
5394
5417
  );
5395
5418
  }
5396
5419
  const own = (v) => typeof v === "number" && Number.isFinite(v) && v >= 0 ? v : rowGapSet ? n : null;
@@ -5438,7 +5461,20 @@
5438
5461
  const tlh = styles.thinkingLineHeight;
5439
5462
  if (typeof tlh === "number" && Number.isFinite(tlh) && tlh >= 0.8) {
5440
5463
  parts.push(
5441
- `[data-testid^="chat-assistant-history-content"]{line-height:${tlh} !important;}`
5464
+ `[data-testid^="chat-assistant-history-content"]{line-height:${tlh} !important;}`,
5465
+ // 历史回合顶部的“已工作 N 秒”触发行在历史内容容器外,按钮自带 text-ui-base
5466
+ // 的行高,只靠容器继承改不到;直接覆盖,否则调“思考行高”时这行不变
5467
+ `[class~="group/history-message"]{line-height:${tlh} !important;}`,
5468
+ // 用户要求:“已工作”展开块内的内容算思考,块外的才算回答。
5469
+ // 历史视图整轮消息(含回答正文)都在历史内容容器里,容器内的 .space-y-4
5470
+ // 改用思考行高;正在回答的回合里,展开块外的回答正文仍用回答行高。
5471
+ // 放在回答行高规则之后(同特异性,后写的生效)
5472
+ `[data-testid^="chat-assistant-history-content"] .space-y-4{line-height:${tlh} !important;}`,
5473
+ `[data-conversation-work-items] .space-y-4{line-height:${tlh} !important;}`,
5474
+ // 3.18 实时回合的思考正文与“工作中”行在历史容器外,且自带 text-ui-base 的
5475
+ // 行高,只靠继承改不动;直接覆盖,调“思考行高”时正在生成的回合也生效
5476
+ `[data-testid="chat-reasoning-content"] .whitespace-pre-wrap{line-height:${tlh} !important;}`,
5477
+ `[data-testid="chat-loading"] *{line-height:${tlh} !important;}`
5442
5478
  );
5443
5479
  }
5444
5480
  const ulh = styles.userLineHeight;
@@ -5543,10 +5579,9 @@
5543
5579
  tableCellPaddingV: `${CONV} td, ${CONV} th`,
5544
5580
  tableCellPaddingH: `${CONV} td, ${CONV} th`,
5545
5581
  codeLineHeight: `${CONV} diffs-container, ${CONV} pre`,
5546
- lineHeight: `${CONV} .space-y-4:not([data-reasoning-content] *)`,
5547
- // 思考行高作用在“已工作/工作中”过程视图容器上;视图折叠未挂载时不标
5548
- // (触发行不属此设置范围,不额外描边)
5549
- thinkingLineHeight: `[data-testid^="chat-assistant-history-content"]`,
5582
+ lineHeight: `${CONV} .space-y-4:not([data-reasoning-content] *):not([data-testid^="chat-assistant-history-content"] *):not([data-conversation-work-items] *)`,
5583
+ // 思考行高作用在“已工作/工作中”过程视图、触发行与思考正文上;视图折叠未挂载时不标
5584
+ thinkingLineHeight: `[data-testid^="chat-assistant-history-content"], [class~="group/history-message"], [data-testid="chat-loading"], [data-testid="chat-reasoning-content"]`,
5550
5585
  userLineHeight: `${CONV} [class*="user-row"] .whitespace-pre-wrap`,
5551
5586
  contentWidth: "[data-v4-timeline-content-column]",
5552
5587
  // 双结构:新侧栏项目行 / 旧 testid 行
@@ -5974,18 +6009,24 @@
5974
6009
  }
5975
6010
  var webviewScanTimer = null;
5976
6011
  var wvStyled = [];
6012
+ function cardVeilCss() {
6013
+ const raw = Number((currentTheme.bg || {}).cardVeil);
6014
+ const veil = Number.isFinite(raw) ? raw : 0.2;
6015
+ const rgb = rgbTriple(resolvedColor("--color-background"), isDarkMode() ? "13,13,13" : "248,248,248");
6016
+ return `html,body{background:rgba(${rgb},${veil}) !important}`;
6017
+ }
5977
6018
  function applyWebviewTransparency() {
5978
- const css = "html,body{background:transparent !important}";
5979
- const hook = (w) => {
6019
+ const hook = (w, css) => {
5980
6020
  const on = document.documentElement.classList.contains("zcodepro-bg-on");
5981
6021
  const rec = wvStyled.find((r) => r.el === w);
5982
6022
  if (on && !rec) {
5983
- const entry = { el: w, key: null, handler: null };
6023
+ const entry = { el: w, key: null, css, handler: null };
5984
6024
  entry.handler = () => {
5985
6025
  if (!wvStyled.includes(entry)) return;
6026
+ const myCss = entry.css;
5986
6027
  try {
5987
- void w.insertCSS(css).then((k) => {
5988
- if (wvStyled.includes(entry)) entry.key = k;
6028
+ void w.insertCSS(myCss).then((k) => {
6029
+ if (wvStyled.includes(entry) && entry.css === myCss) entry.key = k;
5989
6030
  else {
5990
6031
  try {
5991
6032
  void w.removeCSS(k).catch(() => {
@@ -6001,6 +6042,32 @@
6001
6042
  w.addEventListener("dom-ready", entry.handler);
6002
6043
  wvStyled.push(entry);
6003
6044
  entry.handler();
6045
+ } else if (on && rec && rec.css !== css) {
6046
+ rec.css = css;
6047
+ const oldKey = rec.key;
6048
+ rec.key = null;
6049
+ if (oldKey) {
6050
+ try {
6051
+ void w.removeCSS(oldKey).catch(() => {
6052
+ });
6053
+ } catch {
6054
+ }
6055
+ }
6056
+ try {
6057
+ void w.insertCSS(css).then((k) => {
6058
+ if (wvStyled.includes(rec) && rec.css === css) rec.key = k;
6059
+ else {
6060
+ try {
6061
+ void w.removeCSS(k).catch(() => {
6062
+ });
6063
+ } catch {
6064
+ }
6065
+ }
6066
+ }).catch(() => {
6067
+ if (wvStyled.includes(rec) && rec.css === css) rec.css = "";
6068
+ });
6069
+ } catch {
6070
+ }
6004
6071
  } else if (!on && rec) {
6005
6072
  if (rec.handler) w.removeEventListener("dom-ready", rec.handler);
6006
6073
  if (rec.key) {
@@ -6013,7 +6080,10 @@
6013
6080
  wvStyled.splice(wvStyled.indexOf(rec), 1);
6014
6081
  }
6015
6082
  };
6016
- const scan6 = () => document.querySelectorAll("webview").forEach(hook);
6083
+ const scan6 = () => {
6084
+ const css = cardVeilCss();
6085
+ document.querySelectorAll("webview").forEach((w) => hook(w, css));
6086
+ };
6017
6087
  scan6();
6018
6088
  if (!webviewScanTimer) webviewScanTimer = setInterval(scan6, 2e3);
6019
6089
  }
@@ -8552,6 +8622,19 @@
8552
8622
  void saveTheme({ bg: { dialogFrost: !(themeCfg.bg.dialogFrost !== false) } });
8553
8623
  });
8554
8624
  };
8625
+ const cardVeilRow = () => sliderRow(
8626
+ L.themeBgCardVeil,
8627
+ "",
8628
+ 0,
8629
+ 100,
8630
+ 1,
8631
+ Math.round(numOr(themeCfg.bg.cardVeil, 0.2) * 100),
8632
+ "%",
8633
+ (v) => {
8634
+ void saveTheme({ bg: { cardVeil: v / 100 } });
8635
+ },
8636
+ L.themeBgCardVeilHint
8637
+ );
8555
8638
  const urlInput = h("input", { type: "url", value: themeCfg.bg.url, class: themeInputCls, placeholder: "https://..." });
8556
8639
  urlInput.addEventListener("change", () => {
8557
8640
  const v = urlInput.value.trim();
@@ -8803,6 +8886,7 @@
8803
8886
  pauseCheck("pauseOnBlur", L.themeBgPauseBlur),
8804
8887
  pauseCheck("pauseOnBattery", L.themeBgPauseBattery)
8805
8888
  ),
8889
+ themeCfg.bg.mode !== "none" ? cardVeilRow() : null,
8806
8890
  dialogFrostRow()
8807
8891
  )),
8808
8892
  bgInput
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zcode-pro",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "ZCode Pro — ZCode 桌面版增强工具:壁纸引擎(图片/视频/网页)、皮肤主题、会话快捷切换、状态栏统计等二十余项界面与体验增强;不修改客户端文件,用 ZCode Pro 快捷方式启动即可生效。",
5
5
  "type": "module",
6
6
  "bin": {
@@ -250,6 +250,10 @@ export function mergeThemeConfig(saved) {
250
250
  transition: bg.transition === 'fade' ? 'fade' : 'cut',
251
251
  fpsCap: TRANSCODE_FPS.has(Number(bg.fpsCap)) ? Number(bg.fpsCap) : 0,
252
252
  dialogFrost: bg.dialogFrost !== false,
253
+ // 插件卡片遮罩:注入插件沙箱页的主题色遮罩透明度(0=壁纸原样透出,1=实底);
254
+ // 默认 20%,卡片略实的初始观感,用户可在壁纸设置里调
255
+ cardVeil: bg.cardVeil != null && bg.cardVeil !== '' && Number.isFinite(Number(bg.cardVeil))
256
+ ? Math.min(1, Math.max(0, Number(bg.cardVeil))) : 0.2,
253
257
  videoVolume: bg.videoVolume != null && Number.isFinite(Number(bg.videoVolume))
254
258
  ? Math.min(1, Math.max(0, Number(bg.videoVolume))) : 0,
255
259
  playbackRate: bg.playbackRate != null && Number.isFinite(Number(bg.playbackRate))
@@ -275,6 +279,7 @@ export function mergeThemeConfig(saved) {
275
279
  export const BG_PARAM_KEYS = {
276
280
  maskOpacity: 'number', blurPx: 'number', panelOpacity: 'number', videoVolume: 'number', playbackRate: 'number',
277
281
  pauseOnHidden: 'boolean', pauseOnBlur: 'boolean', pauseOnBattery: 'boolean', dialogFrost: 'boolean',
282
+ cardVeil: 'number',
278
283
  fit: BG_FITS, transition: new Set(['cut', 'fade']), fpsCap: new Set([0, ...TRANSCODE_FPS]),
279
284
  };
280
285
 
@@ -1010,6 +1015,7 @@ export function startHelper({ port, token, dataRoot, state, agentsFile = default
1010
1015
  pauseOnBlur: bt.bg && bt.bg.pauseOnBlur !== undefined ? bt.bg.pauseOnBlur : cur.bg.pauseOnBlur,
1011
1016
  pauseOnBattery: bt.bg && bt.bg.pauseOnBattery !== undefined ? bt.bg.pauseOnBattery : cur.bg.pauseOnBattery,
1012
1017
  dialogFrost: bt.bg && bt.bg.dialogFrost !== undefined ? bt.bg.dialogFrost : cur.bg.dialogFrost,
1018
+ cardVeil: bt.bg && bt.bg.cardVeil !== undefined ? bt.bg.cardVeil : cur.bg.cardVeil,
1013
1019
  regions: bt.bg && bt.bg.regions !== undefined ? bt.bg.regions : cur.bg.regions,
1014
1020
  },
1015
1021
  };
@@ -32,6 +32,7 @@ function usage() {
32
32
  pauseOnHidden=true 窗口最小化暂停 pauseOnBlur=false 窗口失焦暂停
33
33
  pauseOnBattery=false 电池供电暂停
34
34
  dialogFrost=true 设置弹窗磨砂透出壁纸
35
+ cardVeil=0.2 插件卡片遮罩 0-1
35
36
  wallpaper upload [--select] <文件路径>... 把本机图片/视频复制进图库(--select 顺手设为壁纸)
36
37
  wallpaper delete <图库文件名> 从图库删除
37
38
  `;
@@ -282,7 +283,7 @@ zcode-pro(ZCode 桌面版增强工具)内置壁纸引擎:图片、视频
282
283
  | \`zcode-pro wallpaper list\` | 看当前配置和图库文件 |
283
284
  | \`zcode-pro wallpaper set none\\|library <文件>\\|folder <目录>\\|url <地址>\\|web <地址>\` | 切换壁纸来源 |
284
285
  | \`zcode-pro wallpaper rotate <分钟> [--random\\|--sequential]\` | 文件夹轮换/网址刷新间隔(0 = 不轮换/不刷新) |
285
- | \`zcode-pro wallpaper params <键=值>...\` | 调画面(遮罩/模糊/面板/缩放)、转场、播放(音量/倍速/帧率)、暂停条件、弹窗磨砂 |
286
+ | \`zcode-pro wallpaper params <键=值>...\` | 调画面(遮罩/模糊/面板/缩放/插件卡片遮罩)、转场、播放(音量/倍速/帧率)、暂停条件、弹窗磨砂 |
286
287
  | \`zcode-pro wallpaper upload [--select] <文件路径>...\` | 把本机图片/视频复制进图库(--select 顺手设为当前壁纸) |
287
288
  | \`zcode-pro wallpaper delete <图库文件名>\` | 从图库删文件 |
288
289
 
@@ -310,6 +311,7 @@ zcode-pro(ZCode 桌面版增强工具)内置壁纸引擎:图片、视频
310
311
  | videoVolume / playbackRate | 音量 0-1 / 倍速 0.5-2 | 数值 |
311
312
  | pauseOnHidden / pauseOnBlur / pauseOnBattery | 最小化/失焦/电池暂停 | true/false |
312
313
  | dialogFrost | 设置弹窗磨砂透出壁纸(false = 恢复不透明底) | true/false |
314
+ | cardVeil | 插件卡片遮罩:插件卡片透出壁纸时垫在卡片底下的主题色遮罩 | 0-1,默认 0.2 |
313
315
  | regions.left / center / right | 分区背景,每区可独立缩放/遮罩(null = 跟随全局;仅静态图,mode 取 library/folder/url,文件夹轮换复用全局间隔与顺序) | {mode,file,folder,url,fit,maskOpacity} |
314
316
  `;
315
317
 
@@ -453,6 +453,8 @@ const zh = {
453
453
  themeBgBlur: '画面模糊',
454
454
  themeBgPanel: '面板不透明度',
455
455
  themeBgDialogFrost: '设置弹窗磨砂',
456
+ themeBgCardVeil: '插件卡片遮罩',
457
+ themeBgCardVeilHint: '壁纸开着时垫在插件卡片底下的主题色遮罩:0 不遮(壁纸原样透出),越大卡片越实在、越暗。',
456
458
  themeBgMisc: '其他',
457
459
  themeBgFollowGlobal: '跟随全局',
458
460
  themeBgRegionsHint: '来源选“默认(全局壁纸)”即该区不单独设置、直接显示全局壁纸;每行的缩放、遮罩可单独设置,选“跟随全局”即跟随“画面”的值;模糊、转场、播放仅作用于全局壁纸(分区只能铺图,不能播视频)。分区用文件夹时,轮换间隔与随机顺序沿用全局设置。',
@@ -1083,6 +1085,8 @@ const en = {
1083
1085
  themeBgBlur: 'Wallpaper blur',
1084
1086
  themeBgPanel: 'Panel opacity',
1085
1087
  themeBgDialogFrost: 'Frosted settings window',
1088
+ themeBgCardVeil: 'Plugin card veil',
1089
+ themeBgCardVeilHint: 'Theme-colored veil behind plugin cards while a wallpaper is on: 0 shows the wallpaper as-is; higher makes cards more solid and darker.',
1086
1090
  themeBgMisc: 'Other',
1087
1091
  themeBgFollowGlobal: 'Follow global',
1088
1092
  themeBgRegionsHint: '"Default (global)" means the region is not set on its own and just shows the global wallpaper. Fit and mask can be set per row; "Follow global" uses the Display values. Blur, transition and playback apply only to the global wallpaper (regions are static images, no video). Region folders reuse the global rotation interval and order settings.',
@@ -1313,6 +1313,10 @@ export function openSettingsDialog() {
1313
1313
  void saveTheme({ bg: { dialogFrost: !(themeCfg.bg.dialogFrost !== false) } });
1314
1314
  });
1315
1315
  };
1316
+ // 插件卡片遮罩:壁纸开着时垫在插件卡片页底下的主题色遮罩,
1317
+ // 0 = 壁纸原样透出,越大卡片越实在、越暗。默认 20%。没壁纸时整行不显示
1318
+ const cardVeilRow = () => sliderRow(L.themeBgCardVeil, '', 0, 100, 1, Math.round(numOr(themeCfg.bg.cardVeil, 0.2) * 100), '%',
1319
+ (v) => { void saveTheme({ bg: { cardVeil: v / 100 } }); }, L.themeBgCardVeilHint);
1316
1320
  // 图片网址输入:change 提交;空值回无壁纸
1317
1321
  const urlInput = h('input', { type: 'url', value: themeCfg.bg.url, class: themeInputCls, placeholder: 'https://...' });
1318
1322
  urlInput.addEventListener('change', () => {
@@ -1457,6 +1461,7 @@ export function openSettingsDialog() {
1457
1461
  pauseCheck('pauseOnHidden', L.themeBgPauseHidden),
1458
1462
  pauseCheck('pauseOnBlur', L.themeBgPauseBlur),
1459
1463
  pauseCheck('pauseOnBattery', L.themeBgPauseBattery)),
1464
+ themeCfg.bg.mode !== 'none' ? cardVeilRow() : null,
1460
1465
  dialogFrostRow())),
1461
1466
  bgInput,
1462
1467
  );
@@ -74,6 +74,15 @@ function buildCss(styles) {
74
74
  // 工具/状态卡片(“N 个文件已更改”等)上方间距下限 8px:
75
75
  // 段落间距调到 0 时也不至于贴死(gap 与 margin 在弹性布局里相加)
76
76
  `${CONV} .flex.flex-col.gap-5 > [data-slot="collapsible"]{margin-block-start:max(0px, calc(8px - ${n}px)) !important;margin-top:max(0px, calc(8px - ${n}px)) !important;}`,
77
+ // 3.18 的“工作中”槽位带 -8px 上边距(默认 gap 20 → 实际 12px);行间距调小后
78
+ // 这层负边距会把槽位拉得贴住上面的内容(gap 7 → 实际 -1px)。清掉负边距,
79
+ // 让它跟其它块一样按设置的行间距排
80
+ `${CONV} .flex.flex-col.gap-5 > [data-zcode-chat-loading-slot]:not(:first-child){margin-block-start:0 !important;margin-top:0 !important;}`,
81
+ // 过程视图(思考/工具摘要/过程正文)的行块:应用给容器 4px gap + 每行
82
+ // 12px 上内边距(共 16px)。段落间距设置时直接接管:gap 归零、上内边距
83
+ // 按设置值,总间距等于设置值(设 0 就完全贴紧)
84
+ `${CONV} [data-conversation-work-items]{gap:0 !important;}`,
85
+ `${CONV} [data-conversation-work-items] > * + *{padding-top:${n}px !important;}`,
77
86
  );
78
87
  }
79
88
  // 特殊块(列表/引用块/表格)自身间距项未设置时跟随段落间距,
@@ -140,12 +149,24 @@ function buildCss(styles) {
140
149
  }
141
150
  const tlh = styles.thinkingLineHeight;
142
151
  if (typeof tlh === 'number' && Number.isFinite(tlh) && tlh >= 0.8) {
143
- // “思考行高”管“已工作/工作中 N 秒”过程视图的行距(读取/编辑/查阅/终端等
144
- // 条目行、流式思考预览,默认 1.5):行高挂在历史内容容器上由各行继承;
145
- // 过程里的叙述正文走 .space-y-4(回答行高,选择器更具体压过这里的继承)。
146
- // 单独展开的“思考·持续了 N 秒”块内内容不在此设置范围内
152
+ // “思考行高”管“已工作/工作中 N 秒”过程视图与思考正文的行距(读取/编辑/查阅/
153
+ // 终端条目行、流式思考预览,默认 1.5):行高挂在历史内容容器上由各行继承;
154
+ // 过程里的叙述正文(.space-y-4)按“已工作展开块内算思考”的规则也走思考行高
147
155
  parts.push(
148
156
  `[data-testid^="chat-assistant-history-content"]{line-height:${tlh} !important;}`,
157
+ // 历史回合顶部的“已工作 N 秒”触发行在历史内容容器外,按钮自带 text-ui-base
158
+ // 的行高,只靠容器继承改不到;直接覆盖,否则调“思考行高”时这行不变
159
+ `[class~="group/history-message"]{line-height:${tlh} !important;}`,
160
+ // 用户要求:“已工作”展开块内的内容算思考,块外的才算回答。
161
+ // 历史视图整轮消息(含回答正文)都在历史内容容器里,容器内的 .space-y-4
162
+ // 改用思考行高;正在回答的回合里,展开块外的回答正文仍用回答行高。
163
+ // 放在回答行高规则之后(同特异性,后写的生效)
164
+ `[data-testid^="chat-assistant-history-content"] .space-y-4{line-height:${tlh} !important;}`,
165
+ `[data-conversation-work-items] .space-y-4{line-height:${tlh} !important;}`,
166
+ // 3.18 实时回合的思考正文与“工作中”行在历史容器外,且自带 text-ui-base 的
167
+ // 行高,只靠继承改不动;直接覆盖,调“思考行高”时正在生成的回合也生效
168
+ `[data-testid="chat-reasoning-content"] .whitespace-pre-wrap{line-height:${tlh} !important;}`,
169
+ `[data-testid="chat-loading"] *{line-height:${tlh} !important;}`,
149
170
  );
150
171
  }
151
172
  const ulh = styles.userLineHeight;
@@ -275,10 +296,9 @@ const HL_SELECTORS = {
275
296
  tableCellPaddingV: `${CONV} td, ${CONV} th`,
276
297
  tableCellPaddingH: `${CONV} td, ${CONV} th`,
277
298
  codeLineHeight: `${CONV} diffs-container, ${CONV} pre`,
278
- lineHeight: `${CONV} .space-y-4:not([data-reasoning-content] *)`,
279
- // 思考行高作用在“已工作/工作中”过程视图容器上;视图折叠未挂载时不标
280
- // (触发行不属此设置范围,不额外描边)
281
- thinkingLineHeight: `[data-testid^="chat-assistant-history-content"]`,
299
+ lineHeight: `${CONV} .space-y-4:not([data-reasoning-content] *):not([data-testid^="chat-assistant-history-content"] *):not([data-conversation-work-items] *)`,
300
+ // 思考行高作用在“已工作/工作中”过程视图、触发行与思考正文上;视图折叠未挂载时不标
301
+ thinkingLineHeight: `[data-testid^="chat-assistant-history-content"], [class~="group/history-message"], [data-testid="chat-loading"], [data-testid="chat-reasoning-content"]`,
282
302
  userLineHeight: `${CONV} [class*="user-row"] .whitespace-pre-wrap`,
283
303
  contentWidth: '[data-v4-timeline-content-column]',
284
304
  // 双结构:新侧栏项目行 / 旧 testid 行
@@ -394,24 +394,35 @@ function clearWpTimers() {
394
394
  }
395
395
  }
396
396
  // 插件卡片(沙箱 webview)页面自带的背景是实色,会把壁纸整块盖住;
397
- // 用 webview 自带的 insertCSS 把 guest 页面的 html/body 背景改透明(页面每次
398
- // 加载后重插,CSS 随文档生命周期失效)。只做加法:页面其余样式不动
397
+ // 用 webview 自带的 insertCSS 把 guest 页面的 html/body 背景改成“主题色遮罩 +
398
+ // 卡片遮罩透明度”(0 = 全透明 = 壁纸原样透出)。页面每次加载后重插(CSS 随文档
399
+ // 生命周期失效),遮罩滑杆(bg.cardVeil)变化时撤旧 key 重插。只做加法:
400
+ // 页面其余样式不动
399
401
  let webviewScanTimer = null;
400
- const wvStyled = []; // [{ el, key }]:壁纸关闭时撤掉透明,恢复卡片自己的背景
402
+ const wvStyled = []; // [{ el, key, css, handler }]:壁纸关闭时撤掉遮罩,恢复卡片自己的背景
403
+ function cardVeilCss() {
404
+ const raw = Number((currentTheme.bg || {}).cardVeil);
405
+ const veil = Number.isFinite(raw) ? raw : 0.2;
406
+ // 与壁纸遮罩同源取色:面板半透明化后 --color-background 是 color-mix,直接读
407
+ // 自定义属性拿到的 token 认不出;resolvedColor 取计算值,rgbTriple 归一化成 rgb
408
+ const rgb = rgbTriple(resolvedColor('--color-background'), isDarkMode() ? '13,13,13' : '248,248,248');
409
+ return `html,body{background:rgba(${rgb},${veil}) !important}`;
410
+ }
401
411
  function applyWebviewTransparency() {
402
- const css = 'html,body{background:transparent !important}';
403
- const hook = (w) => {
404
- // on 每次现读:函数只在启动时调用一次,闭包固化初值会让插入分支永远走不到
412
+ const hook = (w, css) => {
413
+ // on 每次现读、css 每轮扫描现算:扫描定时器只启动一次、长期存活,闭包固化
414
+ // 初值会让后建的 webview 拿到旧遮罩,还会每 2 秒把滑杆改后的新值覆盖回旧值
405
415
  const on = document.documentElement.classList.contains('zcodepro-bg-on');
406
416
  const rec = wvStyled.find((r) => r.el === w);
407
417
  if (on && !rec) {
408
- const entry = { el: w, key: null, handler: null };
418
+ const entry = { el: w, key: null, css, handler: null };
409
419
  entry.handler = () => {
410
- if (!wvStyled.includes(entry)) return; // 已随关壁纸摘牌:别再插透明
420
+ if (!wvStyled.includes(entry)) return; // 已随关壁纸摘牌:别再插遮罩
421
+ const myCss = entry.css; // 插入期间遮罩可能又变:结果回来只认自己这份
411
422
  try {
412
- void w.insertCSS(css).then((k) => {
413
- // 结果回来时若已摘牌,插进去的透明没人撤,立刻自己撤掉
414
- if (wvStyled.includes(entry)) entry.key = k;
423
+ void w.insertCSS(myCss).then((k) => {
424
+ // 已摘牌或值已过期:插进去的遮罩没人撤,立刻自己撤掉
425
+ if (wvStyled.includes(entry) && entry.css === myCss) entry.key = k;
415
426
  else { try { void w.removeCSS(k).catch(() => { /* ignore */ }); } catch { /* ignore */ } }
416
427
  }).catch(() => { /* 未就绪:dom-ready 再试 */ });
417
428
  } catch { /* 同步抛出:同上 */ }
@@ -419,13 +430,33 @@ function applyWebviewTransparency() {
419
430
  w.addEventListener('dom-ready', entry.handler);
420
431
  wvStyled.push(entry);
421
432
  entry.handler();
433
+ } else if (on && rec && rec.css !== css) {
434
+ // 遮罩滑杆变了:撤旧 key 重插新值(insertCSS 的 key 对应一份 CSS 文本)
435
+ rec.css = css;
436
+ const oldKey = rec.key;
437
+ rec.key = null;
438
+ if (oldKey) { try { void w.removeCSS(oldKey).catch(() => { /* ignore */ }); } catch { /* ignore */ } }
439
+ try {
440
+ void w.insertCSS(css).then((k) => {
441
+ if (wvStyled.includes(rec) && rec.css === css) rec.key = k;
442
+ else { try { void w.removeCSS(k).catch(() => { /* ignore */ }); } catch { /* ignore */ } }
443
+ }).catch(() => {
444
+ // 没插进去(guest 未就绪等):清掉记录值让下次扫描重试,否则
445
+ // rec.css 已是新值、再也进不了本分支,遮罩就一直缺着
446
+ if (wvStyled.includes(rec) && rec.css === css) rec.css = '';
447
+ });
448
+ } catch { /* 同步抛出:同上 */ }
422
449
  } else if (!on && rec) {
423
450
  if (rec.handler) w.removeEventListener('dom-ready', rec.handler); // 不摘会随开关次数累积
424
451
  if (rec.key) { try { void w.removeCSS(rec.key).catch(() => { /* ignore */ }); } catch { /* ignore */ } }
425
452
  wvStyled.splice(wvStyled.indexOf(rec), 1);
426
453
  }
427
454
  };
428
- const scan = () => document.querySelectorAll('webview').forEach(hook);
455
+ // 每轮扫描算一次 CSS 给所有 webview 共用:卡片多时不必逐个读计算样式
456
+ const scan = () => {
457
+ const css = cardVeilCss();
458
+ document.querySelectorAll('webview').forEach((w) => hook(w, css));
459
+ };
429
460
  scan();
430
461
  if (!webviewScanTimer) webviewScanTimer = setInterval(scan, 2000);
431
462
  }
@@ -646,6 +646,16 @@ export function ensureStyle() {
646
646
  .zcodepro-textarea.zcodepro-textarea-sm { min-height: 0; }
647
647
  /* 全局提示词大编辑框:默认/最大高度都比默认文本域更高 */
648
648
  .zcodepro-textarea.zcodepro-textarea-lg { min-height: 16rem; max-height: 40rem; }
649
+ /* 设置页下拉框:壁纸开着时表面 token 被换成 color-mix 半透明,原生下拉列表
650
+ 会渲染成黑底 + 默认黑字(深色模式看不清)。给选项写死主题的不透明底色与
651
+ 正文色,并按明暗给 select 一个 color-scheme,列表在两种模式下都可读 */
652
+ [data-zcodepro-settings] select { color-scheme: light; }
653
+ html.theme-zai-dark [data-zcodepro-settings] select,
654
+ html.dark [data-zcodepro-settings] select { color-scheme: dark; }
655
+ [data-zcodepro-settings] select option {
656
+ background-color: var(--color-popover, #fff);
657
+ color: var(--color-foreground, #111);
658
+ }
649
659
  /* 行高滑杆(样式调整标签页) */
650
660
  .zcodepro-range {
651
661
  -webkit-appearance: none;
@@ -1,3 +1,3 @@
1
1
  """ZCode Pro 的 PyPI 安装包:内置 Node 应用源码,通过 zcode-pro 命令启动。"""
2
2
 
3
- __version__ = "1.8.0"
3
+ __version__ = "1.8.1"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes