zcode-pro 1.6.1 → 1.6.2

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 (40) hide show
  1. package/README.en.md +31 -21
  2. package/README.md +20 -12
  3. package/dist/inject.js +9624 -8634
  4. package/package.json +2 -1
  5. package/src/host/cdp.mjs +13 -3
  6. package/src/host/helper.mjs +982 -464
  7. package/src/host/main.mjs +368 -30
  8. package/src/host/paths.mjs +17 -9
  9. package/src/host/pickFolder.mjs +11 -4
  10. package/src/host/settings.mjs +15 -2
  11. package/src/host/setup.mjs +54 -15
  12. package/src/host/skill-stats.mjs +6 -1
  13. package/src/host/taskIndex.mjs +198 -66
  14. package/src/host/taskOrder.mjs +128 -57
  15. package/src/host/version.mjs +15 -7
  16. package/src/host/wallpaper.mjs +76 -59
  17. package/src/host/webdav.mjs +66 -10
  18. package/src/inject/core.js +184 -95
  19. package/src/inject/features/alias-migration.js +5 -1
  20. package/src/inject/features/auto-rename.js +166 -0
  21. package/src/inject/features/file-menu.js +6 -2
  22. package/src/inject/features/idle-reclaim.js +31 -8
  23. package/src/inject/features/newtab-panels.js +11 -1
  24. package/src/inject/features/pinned-collapse.js +11 -3
  25. package/src/inject/features/plugin-card-retry.js +18 -8
  26. package/src/inject/features/sandbox-reclaim.js +17 -1
  27. package/src/inject/features/session-link.js +200 -0
  28. package/src/inject/features/session-switch.js +57 -23
  29. package/src/inject/features/settings-dialog.js +242 -110
  30. package/src/inject/features/status-bar.js +126 -24
  31. package/src/inject/features/table-copy.js +18 -2
  32. package/src/inject/features/task-order.js +47 -13
  33. package/src/inject/features/theme.js +88 -31
  34. package/src/inject/features/title-gen.js +5 -4
  35. package/src/inject/features/title-lock.js +13 -8
  36. package/src/inject/features/turn-usage.js +69 -29
  37. package/src/inject/features/ws-running.js +26 -11
  38. package/src/inject/index.js +5 -0
  39. package/src/inject/provider-fields.js +2 -2
  40. package/src/inject/ui.js +6 -0
@@ -15,6 +15,7 @@ import { startStatusBar } from './features/status-bar.js';
15
15
  import { startTurnUsage } from './features/turn-usage.js';
16
16
  import { startTitleLock } from './features/title-lock.js';
17
17
  import { startTitleGen } from './features/title-gen.js';
18
+ import { startAutoRename, handleTaskRowMenu } from './features/auto-rename.js';
18
19
  import { startWsRunningSpin } from './features/ws-running.js';
19
20
  import { startIdleReclaim } from './features/idle-reclaim.js';
20
21
  import { startSandboxReclaim } from './features/sandbox-reclaim.js';
@@ -24,6 +25,7 @@ import { startPinnedCollapse } from './features/pinned-collapse.js';
24
25
  import { startStyleAdjustments } from './features/styles.js';
25
26
  import { startTheme } from './features/theme.js';
26
27
  import { startTableCopy } from './features/table-copy.js';
28
+ import { startSessionLink } from './features/session-link.js';
27
29
  import { startComposerProvider } from './features/composer-provider.js';
28
30
  import { startPluginUpdateCheck } from './features/plugin-updates.js';
29
31
  import { ensureStyle } from './ui.js';
@@ -66,6 +68,7 @@ import { ensureStyle } from './ui.js';
66
68
  observeRadixPopups((content) => {
67
69
  try { handleProjectMenu(content); } catch { /* 单个功能失败不影响其他 */ }
68
70
  try { handleFileMenu(content); } catch { /* ignore */ }
71
+ try { handleTaskRowMenu(content); } catch { /* ignore */ }
69
72
  });
70
73
  try { void startAliasWatcher(); } catch { /* ignore */ }
71
74
  // 别名迁移弹窗(3.16.1+ 且仍有存量别名时才动作),内部自带等待与窗口聚焦判断
@@ -74,6 +77,7 @@ import { ensureStyle } from './ui.js';
74
77
  try { startSessionSwitch(); } catch { /* ignore */ }
75
78
  try { startTitleLock(); } catch { /* ignore */ }
76
79
  try { startTitleGen(); } catch { /* ignore */ }
80
+ try { startAutoRename(); } catch { /* ignore */ }
77
81
  try { startImageMenu(); } catch { /* ignore */ }
78
82
  try { startWsRunningSpin(); } catch { /* ignore */ }
79
83
  try { startIdleReclaim(); } catch { /* ignore */ }
@@ -87,6 +91,7 @@ import { ensureStyle } from './ui.js';
87
91
  try { startStyleAdjustments(); } catch { /* ignore */ }
88
92
  try { startTheme(); } catch { /* ignore */ }
89
93
  try { startTableCopy(); } catch { /* ignore */ }
94
+ try { startSessionLink(); } catch { /* ignore */ }
90
95
  try { startComposerProvider(); } catch { /* ignore */ }
91
96
  try { startSettingsEntry(); } catch { /* ignore */ }
92
97
  // 插件更新检查慢(可能 git pull),异步进行,不阻塞其他功能
@@ -4,7 +4,7 @@
4
4
  // - 'session':跟随当前会话(连接由会话侧解析,不存地址密钥);
5
5
  // - 其余:供应商 id;已删的 id 保留为“已删除”选项,调用方靠保存的地址/
6
6
  // 密钥副本继续直连。
7
- import { h } from './core.js';
7
+ import { h, t } from './core.js';
8
8
 
9
9
  export const PROVIDER_FIELD_CLS = 'h-8 w-full rounded-lg border border-border bg-input px-2.5 text-ui-sm text-foreground outline-none transition-shadow placeholder:text-foreground-subtle focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/40';
10
10
 
@@ -12,7 +12,7 @@ export const PROVIDER_FIELD_CLS = 'h-8 w-full rounded-lg border border-border bg
12
12
  // 输入;当前值不在列表里(条目被删或手输 id)时保留为带 staleLabel 标注的
13
13
  // 选项,不清空、不跳值;当前值为空时插入一个 emptyLabel 空选项,避免下拉框
14
14
  // 假装选中第一项而配置里其实没选
15
- export function comboField(current, options, onChange, { disabled = false, placeholder = '', staleLabel = '(手动输入)', emptyLabel = '' } = {}) {
15
+ export function comboField(current, options, onChange, { disabled = false, placeholder = '', staleLabel = t().manualInput, emptyLabel = '' } = {}) {
16
16
  const sel = h('select', { class: PROVIDER_FIELD_CLS, disabled: disabled || undefined });
17
17
  const input = h('input', { type: 'text', value: current, placeholder, class: PROVIDER_FIELD_CLS, disabled: disabled || undefined });
18
18
  const sync = () => {
package/src/inject/ui.js CHANGED
@@ -430,6 +430,12 @@ export function ensureStyle() {
430
430
  if (!root) return;
431
431
  root.append(h('style', { id: '__zcodepro_style__' }, `
432
432
  @keyframes zcodepro-fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
433
+ /* 会话 ID 显示为任务名链接(session-link.js):观感贴近正文链接,主题变量缺失时回退字面量 */
434
+ .zcodepro-sess-link {
435
+ color: var(--color-link, var(--color-primary, #4a9eff));
436
+ cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
437
+ }
438
+ .zcodepro-sess-link:hover { opacity: .8; }
433
439
  /* 提示条四态(成功/警告/失败/信息):配色用主题变量加字面量兜底,
434
440
  不依赖宿主 Tailwind 生成配色工具类 */
435
441
  .zcodepro-toast {