dsh-session-superagent 0.8.41 → 0.8.43
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/CHANGELOG.md +50 -0
- package/MAINTENANCE.md +1 -1
- package/README.md +2 -2
- package/client.js +167 -106
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
格式参照 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/),版本号遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
|
|
4
4
|
|
|
5
|
+
## [0.8.43] - 2026-11-02 —— 行结构与设置页改用官方模板
|
|
6
|
+
|
|
7
|
+
按 `docs/ui-inventory.md` 的第 1、2 项打。
|
|
8
|
+
|
|
9
|
+
### 行列表:改用官方 `TicketLine` 结构
|
|
10
|
+
官方 `rows.tsx` 的行是 `<li class="dt-row dt-link dt-ticket">`,两列网格:
|
|
11
|
+
**左列状态(`dt-ticket-stage`)** + **右列正文(`dt-ticket-body`)**,标题本身是 `dt-open` 按钮。
|
|
12
|
+
我们之前是普通 `dt-row` + 一个单独的「编辑」按钮。现在:
|
|
13
|
+
|
|
14
|
+
- 列表容器 `dt-rows` → **`dt-list`**(只有 `.dt-list > .dt-ticket` 才有左侧状态列网格);
|
|
15
|
+
- 标题改成 `dt-open` 按钮(带 `aria-expanded`),点标题展开行内编辑 —— 官方就是点标题进详情;
|
|
16
|
+
- 行内 `dt-ticket-note` 承载会话/间隔/轮询/唤醒这串说明,错误行用 `dt-ticket-note-error`;
|
|
17
|
+
- 操作收进 `dt-ticket-actions`。
|
|
18
|
+
|
|
19
|
+
### 设置页:改用官方「左栏 + 内容」
|
|
20
|
+
`dt-settings` 网格(140px + 内容)之前搬来了 CSS 却没用。现在是四个分区(来源 / 凭证 / 版本与更新 / 会话 goal)
|
|
21
|
+
配 `dt-settings-nav` 左栏,当前项 `aria-current="page"`,深链路里不用一路滚到底。
|
|
22
|
+
|
|
23
|
+
### UI 体检扩到 9 项
|
|
24
|
+
新增「官方结构采用数」(`dt-ticket` / `dt-list` / `dt-open` / `dt-settings` / `dt-settings-nav` /
|
|
25
|
+
`dt-timeline` / `dt-event` / `dt-disclosure`),当前 **8/8**。合计 **9/9 = 100 分**。
|
|
26
|
+
|
|
27
|
+
### 测试
|
|
28
|
+
- 新增:设置页必须有 `dt-settings` 网格、4 个左栏项、且只有 1 个 `aria-current=page`;
|
|
29
|
+
- 「编辑按钮」用例改成断言 `dt-open` 标题(交互位置变了,行为没丢)。合计 **101 例**。
|
|
30
|
+
|
|
31
|
+
## [0.8.42] - 2026-11-02 —— 全界面盘点 + 弹层键盘行为对齐官方
|
|
32
|
+
|
|
33
|
+
用户要求:「所有 UI,包括二三级页面,有官方素材就用官方素材」。先做盘点,再按清单打。
|
|
34
|
+
|
|
35
|
+
### 新增 `docs/ui-inventory.md`
|
|
36
|
+
把每条渲染面列成表:**渲染面 → 页签 → 二级分区 → 三级弹层 → 官方原语对照**,每条写清
|
|
37
|
+
我们用什么结构、官方对应哪个文件、差在哪。结论摘要:
|
|
38
|
+
|
|
39
|
+
- 官方原语 `controls.tsx` 有 13 个,我们缺 4 个(`Pill` / `SegmentedControl` / `DisclosureRow` / `InfoTip` 封装),
|
|
40
|
+
`StateDot` 只做了一半;
|
|
41
|
+
- 官方行结构是 `dt-ticket`(左侧状态列 + `dt-open` 标题 + `dt-ticket-actions`),我们用的是普通 `dt-row` —— 待换;
|
|
42
|
+
- 官方设置页是「左栏 + 内容」网格(CSS 我们早就搬来了,只是没用上);
|
|
43
|
+
- 官方空态统一用 `<Hint>`,不画插画 —— 我们照此,别再自造。
|
|
44
|
+
|
|
45
|
+
### 修掉的真差异
|
|
46
|
+
**弹层键盘行为**:官方 `Modal` 有「Escape 关闭 + Tab 焦点陷阱 + 关闭后焦点归还」,我们只搬了样式。
|
|
47
|
+
现在三件套补全(打开后焦点进弹层、Tab 在弹层内循环、关闭后回到触发元素)。
|
|
48
|
+
|
|
49
|
+
**悬浮面板改用官方设计系统**:以前是 100 行 inline style 自成一套(还写死了 `#f85149`),
|
|
50
|
+
现在 `dt-card` + `dt-row` + `dt-hint` + 官方 `dt-state-dot`,只留定位几个 inline 值。
|
|
51
|
+
|
|
52
|
+
### UI 体检从 7 项扩到 8 项
|
|
53
|
+
新增「弹层键盘行为(Escape/陷阱/归还)」指标,并要求 3/3。当前 **8/8 = 100 分**。
|
|
54
|
+
|
|
5
55
|
## [0.8.41] - 2026-11-02 —— UI 不再靠肉眼验收:七项指标 + 首次 100 分
|
|
6
56
|
|
|
7
57
|
用户的原话:「你的 UI 真的完美了吗?要做到 DSH 的原生 UI 一样」。肉眼点一遍既慢又漏,
|
package/MAINTENANCE.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
## 二、当前状态(2026-11-01)
|
|
11
11
|
|
|
12
|
-
- [x] 七个工具可用(github / repo_here / watch_start / watch_status / watch_stop / watch_ack / watch_doctor),`node --test`
|
|
12
|
+
- [x] 七个工具可用(github / repo_here / watch_start / watch_status / watch_stop / watch_ack / watch_doctor),`node --test` 101/101 通过
|
|
13
13
|
- [x] 自回声抑制(逐条水位)
|
|
14
14
|
- [x] 仅空闲注入(避免草稿回放)
|
|
15
15
|
- [x] 唤醒失败不推进水位
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<img src="assets/icon-180.png" width="88" height="88" alt="">
|
|
4
4
|
|
|
5
5
|
[](LICENSE)
|
|
6
|
-
[](https://github.com/MYCF711/dsh-session-superagent/releases)
|
|
7
7
|
[](https://www.npmjs.com/package/dsh-session-superagent)
|
|
8
8
|
[](https://github.com/topics/dsh-plugin)
|
|
9
9
|
|
|
@@ -99,7 +99,7 @@ dsh plugin install /path/to/dsh-session-superagent
|
|
|
99
99
|
## 开发
|
|
100
100
|
|
|
101
101
|
```sh
|
|
102
|
-
node --test #
|
|
102
|
+
node --test # 101 项单测
|
|
103
103
|
```
|
|
104
104
|
|
|
105
105
|
版本与发布流程见 [UPDATING.md](UPDATING.md),交付门见 [CHECKLIST.md](CHECKLIST.md),接手台账见 [MAINTENANCE.md](MAINTENANCE.md)。
|
package/client.js
CHANGED
|
@@ -14,7 +14,7 @@ window.__ModuleLoader__.load({
|
|
|
14
14
|
const { useCallback, useEffect, useRef, useState } = React
|
|
15
15
|
|
|
16
16
|
// 客户端版本探针:每次模块加载写一次,用来确认浏览器里跑的是哪一版
|
|
17
|
-
const CLIENT_VERSION = '0.8.
|
|
17
|
+
const CLIENT_VERSION = '0.8.43'
|
|
18
18
|
let BASE = '/session-superagent'
|
|
19
19
|
/**
|
|
20
20
|
* 挑「最新的那个服务端实例」。
|
|
@@ -107,12 +107,24 @@ window.__ModuleLoader__.load({
|
|
|
107
107
|
const PORTED_CSS = "/* Panel layout and local UI controls styled with DSH `--dsw-alias-*` design tokens; one rule per line. */\n.dt-page { box-sizing: border-box; height: 100%; overflow: auto; scrollbar-gutter: stable; scroll-padding: 48px 0 72px; container-type: inline-size; padding: 28px clamp(24px, 4vw, 48px) 0; color: var(--dsw-alias-label-primary); }\n/* Deployment page rendered inside DSH Plugin Manager, which owns scrolling and padding. */\n.dt-embedded { container-type: inline-size; color: var(--dsw-alias-label-primary); }\n/* Disable sticky positioning inside DSH Plugin Manager, where the host container owns scrolling and bottom padding. */\n.dt-embedded .dt-savebar { position: static; }\n.dt-page > .dt-column { max-width: 960px; margin: 0 auto; padding-bottom: 48px; display: flex; flex-direction: column; gap: 24px; }\n.dt-head { position: relative; z-index: 3; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }\n.dt-search { position: relative; width: 240px; max-width: 100%; }\n.dt-search-results { position: absolute; top: calc(100% + 6px); right: 0; width: min(560px, 90cqw); max-height: 60vh; overflow: auto; padding: 8px 16px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 12px; background: var(--dsw-alias-bg-layer-2); box-shadow: var(--dsw-elevation-prominent); z-index: 5; display: flex; flex-direction: column; gap: 8px; }\n.dt-mark { background: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 25%, transparent); color: inherit; border-radius: 2px; }\n[data-platform='darwin'] .dt-page .dt-head { padding-top: var(--dsh-frame-top-clearance, 0px); }\n.dt-title { margin: 0; font-size: 15px; line-height: 22px; font-weight: 600; color: var(--dsw-alias-label-secondary); }\n.dt-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }\n.dt-page .dt-tabs { overflow-x: auto; display: flex; gap: 20px; max-width: none; padding: 0; border-radius: 0; background: none; border-bottom: 0.5px solid var(--dsw-alias-border-l3); }\n.dt-segmented { width: 100%; max-width: 420px; box-sizing: border-box; display: inline-grid; gap: 2px; padding: 3px; border-radius: 9px; background: var(--dsw-alias-interactive-bg-hover); }\n.dt-form.dt-block { padding: 16px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 16px; gap: 16px; }\n.dt-block-title { display: flex; align-items: center; gap: 4px; margin: 0; font-size: 16px; line-height: 24px; font-weight: 500; }\n.dt-section { display: flex; flex-direction: column; gap: 8px; min-width: 0; }\n.dt-section-title { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: 13px; line-height: 20px; font-weight: 600; color: var(--dsw-alias-label-secondary); }\n.dt-section-name { white-space: nowrap; }\n.dt-count { font-size: 14px; color: var(--dsw-alias-label-caption); font-variant-numeric: tabular-nums; font-weight: 400; }\n.dt-hint { margin: 0; font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-tertiary); }\n.dt-error { margin: 0; font-size: 13px; line-height: 20px; color: var(--dsw-alias-state-error-primary); }\n.dt-banner { margin: 0; padding: 8px 12px; border-radius: 10px; font-size: 13px; line-height: 20px; background: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 10%, transparent); overflow-wrap: anywhere; }\n.dt-banner.dt-danger { background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent); }\n.dt-list { list-style: none; margin: 0 -8px; padding: 0; display: flex; flex-direction: column; gap: 2px; }\n.dt-row { position: relative; min-width: 0; border-radius: 12px; padding: 10px 8px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: flex-start; }\n.dt-row.dt-link:hover { background: var(--dsw-alias-interactive-bg-hover); }\n.dt-row-main { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }\n.dt-disclosure-body .dt-row-main { flex-basis: 0; }\n.dt-row-title { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; line-height: 20px; font-weight: 500; }\n.dt-open { max-width: 100%; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-size: 14px; line-height: 20px; font-weight: 500; text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dt-open::after { content: ''; position: absolute; inset: 0; border-radius: 12px; }\n.dt-open:focus-visible { outline: none; }\n.dt-open-wrap { white-space: normal; }\n.dt-open:focus-visible::after { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 2px; }\n.dt-row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-caption); overflow-wrap: anywhere; }\n.dt-row-quote { font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dt-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }\n/* Transparent block borders preserve vertical spacing when line clamping clips padding. */\n.dt-banner:is(.dt-clamp, .dt-clamp-8) { padding-block: 0; border-block: 8px solid transparent; }\n.dt-banner-label { font-weight: 500; }\n.dt-banner .dt-md { display: inline; }\n.dt-banner .dt-md > p:first-child { display: inline; }\n.dt-row-buttons { position: relative; z-index: 1; gap: 8px; margin-top: 4px; }\n.dt-row-actions { position: relative; z-index: 1; display: flex; align-items: center; gap: 4px; flex: none; margin-left: auto; font-size: 13px; line-height: 20px; }\n.dt-dot { flex: none; margin-top: 5px; }\n.dt-inline-link { position: relative; z-index: 1; color: var(--dsw-alias-link); text-decoration: none; }\n.dt-inline-link:hover { text-decoration: underline; }\n.dt-textlink { padding: 0; border: 0; background: none; font: inherit; color: var(--dsw-alias-link); cursor: pointer; text-align: left; }\n.dt-textlink:hover { text-decoration: underline; }\n.dt-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; line-height: 20px; }\n.dt-kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 13px; line-height: 20px; }\n.dt-kv dt { color: var(--dsw-alias-label-tertiary); }\n.dt-kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }\n.dt-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }\n.dt-event { padding: 12px 0; border-bottom: 0.5px solid var(--dsw-alias-border-l2); display: flex; flex-direction: column; gap: 6px; min-width: 0; }\n.dt-event:last-child { border-bottom: 0; }\n.dt-event.dt-highlight { background: var(--dsw-alias-interactive-bg-hover); border-radius: 8px; padding-inline: 8px; margin-inline: -8px; }\n.dt-event-text { margin: 0; font-size: 13px; line-height: 20px; white-space: pre-wrap; overflow-wrap: anywhere; }\n.dt-event-actor { font-weight: 500; color: var(--dsw-alias-label-secondary); }\n.dt-event-quiet .dt-event-text { color: var(--dsw-alias-label-tertiary); }\n.dt-flow { margin: 0; font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-secondary); }\n.dt-clamp-8 { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }\n.dt-more { align-self: flex-start; font-size: 12px; }\n.dt-reveal { opacity: 0; }\n.dt-event:hover .dt-reveal, .dt-reveal:focus-visible { opacity: 1; }\n@media (hover: none) {\n .dt-reveal { opacity: 1; }\n}\n.dt-event-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-tertiary); }\n.dt-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }\n.dt-filters .dt-search { margin-left: auto; }\n.dt-form { display: flex; flex-direction: column; gap: 24px; }\n.dt-fieldset { display: flex; flex-direction: column; gap: inherit; min-width: 0; margin: 0; padding: 0; border: 0; }\n.dt-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 20px; min-width: 0; }\n.dt-field small { color: var(--dsw-alias-label-caption); font-size: 12px; }\n.dt-textarea { box-sizing: border-box; width: 100%; min-width: 0; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 10px; padding: 8px 12px; font: inherit; font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-primary); background: var(--dsw-alias-bg-layer-1, transparent); resize: vertical; }\n.dt-select { box-sizing: border-box; width: 100%; min-width: 0; height: 32px; border: 0.5px solid var(--dsw-alias-border-l4); border-radius: 8px; padding: 0 28px 0 8px; text-overflow: ellipsis; font: inherit; font-size: 14px; line-height: 22px; color: var(--dsw-alias-label-primary); background: var(--dsw-alias-bg-layer-1, transparent); }\n.dt-textarea:focus-visible, .dt-select:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 1px; }\n.dt-mono { font-family: var(--ds-font-family-code, Menlo, monospace); font-size: 12px; overflow-wrap: anywhere; }\n.dt-detail { margin-top: 2px; color: var(--dsw-alias-label-secondary); }\n.dt-savebar .dt-error { white-space: pre-line; }\n.dt-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; font-size: 13px; }\n.dt-subhead-actions { display: inline-flex; align-items: center; gap: 4px; }\n.dt-btn-busy .dt-btn-icon svg { animation: dt-spin 1s linear infinite; }\n.dt-subhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-secondary); }\n.dt-rules, .dt-changes { list-style: none; margin: 0; padding: 0; }\n.dt-field-head { display: inline-flex; align-items: center; gap: 4px; color: var(--dsw-alias-label-secondary); }\n.dt-info { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; padding: 0; border: 0; background: none; color: var(--dsw-alias-label-caption); cursor: help; }\n.dt-info:hover, .dt-info:focus-visible { color: var(--dsw-alias-label-secondary); }\n.dt-info:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 2px; border-radius: 50%; }\n.dt-tooltip { position: fixed; z-index: 1100; width: max-content; max-width: min(320px, calc(100vw - 24px)); padding: 3px 7px; border-radius: 8px; background: var(--dsw-alias-tooltip-bg); color: var(--dsw-static-neutral-bluish-00); font-size: 13px; line-height: 20px; overflow-wrap: break-word; pointer-events: none; animation: dt-tooltip-in 150ms ease-in-out; }\n@keyframes dt-tooltip-in { from { opacity: 0; } }\n.dt-rules { border-top: 0.5px solid var(--dsw-alias-border-l2); }\n.dt-rule { display: flex; align-items: flex-start; gap: 12px; padding: 6px 0; border-bottom: 0.5px solid var(--dsw-alias-border-l2); }\n.dt-rule > :first-child { flex: 1; min-width: 0; }\n.dt-rule-preview { flex: 1; min-width: 0; margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--dsw-alias-label-caption); }\n.dt-rule-switch { margin-top: 2px; flex: none; }\n.dt-rule-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--dsw-alias-label-caption); }\n.dt-rule-dot[data-enabled] { background: var(--dsw-alias-brand-primary); }\n.dt-rule-body { display: flex; flex-direction: column; gap: 12px; padding: 8px 0 8px 28px; }\n.dt-model { display: flex; flex-direction: column; gap: 6px; }\n.dt-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }\n.dt-changes { display: flex; flex-direction: column; gap: 2px; font-size: 13px; line-height: 20px; }\n.dt-changes li::before { content: '· '; color: var(--dsw-alias-label-caption); }\n.dt-main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }\n.dt-modal.dt-glossary-modal { width: min(680px, 100%); }\n.dt-nav-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 32px; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--dsw-alias-label-secondary); font: inherit; font-size: 13px; line-height: 20px; text-align: left; cursor: pointer; }\n.dt-nav-item:hover { background: var(--dsw-alias-interactive-bg-hover); }\n.dt-nav-item[aria-current='true'] { background: var(--dsw-alias-interactive-bg-hover); color: var(--dsw-alias-label-primary); font-weight: 500; }\n.dt-nav-item:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: -2px; }\n.dt-changed-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--dsw-alias-brand-primary); flex: none; }\n.dt-add-skill { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 0.5px solid var(--dsw-alias-border-l2); }\n.dt-prompt-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }\n.dt-editor { min-height: 360px; }\n.dt-inline-select { width: auto; }\n.dt-preview-part { display: flex; flex-direction: column; gap: 6px; padding: 2px 0 2px 12px; border-left: 2px solid var(--dsw-alias-border-l3); }\n.dt-preview-head { font-size: 13px; line-height: 20px; display: flex; align-items: baseline; gap: 8px; }\ndiv.dt-preview-head { color: var(--dsw-alias-label-secondary); }\n.dt-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 16px; min-width: 0; }\n.dt-card-head { display: flex; align-items: center; gap: 12px; min-height: 28px; }\n.dt-card-head .dt-row-main { flex: 1 1 0; min-width: 64px; }\n.dt-card-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dt-row-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; }\n.dt-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }\n.dt-rows-item { display: grid; grid-template-columns: repeat(var(--dt-columns), minmax(0, 1fr)) auto; gap: 8px; align-items: center; }\n.dt-filter-gap { flex: 1; }\n.dt-page-head { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }\n.dt-page-head > .dt-btn { margin-left: -10px; }\n.dt-page-title { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; width: 100%; }\n.dt-page-title h2 { margin: 0; flex: 1 1 auto; min-width: 0; font-size: 20px; line-height: 28px; font-weight: 500; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }\n.dt-status-line { margin-top: -16px; }\n.dt-plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 20px; }\n.dt-details { display: flex; flex-direction: column; gap: 2px; border-top: 0.5px solid var(--dsw-alias-border-l2); padding-top: 8px; }\n.dt-danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 16px; border-top: 0.5px solid var(--dsw-alias-border-l2); }\n.dt-danger-zone .dt-btn { color: var(--dsw-alias-state-error-primary); }\n.dt-md { display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 20px; overflow-wrap: anywhere; }\n.dt-md p, .dt-md ul, .dt-md ol { margin: 0; }\n.dt-md ul, .dt-md ol { padding-left: 20px; display: flex; flex-direction: column; gap: 2px; }\n.dt-md-heading { font-weight: 500; }\n.dt-code { font-family: var(--ds-font-family-code, Menlo, monospace); font-size: 12px; padding: 0 4px; border-radius: 4px; background: var(--dsw-alias-bg-module-platform); }\n.dt-dot-wrap { display: inline-flex; flex: none; }\n.dt-search-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }\n.dt-ellipsis { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }\n.dt-legend-title { margin: 16px 0 6px; font-size: 13px; color: var(--dsw-alias-label-tertiary); }\n.dt-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }\n.dt-legend li { display: flex; align-items: center; gap: 6px; }\n.dt-legend .dt-dot { margin-top: 0; }\n.dt-savebar { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 12px 0; background: var(--dsw-alias-bg-base, var(--dsw-alias-bg-layer-1)); border-top: 0.5px solid var(--dsw-alias-border-l2); }\n.dt-savebar .dt-hint { margin-right: auto; }\n.dt-card > .dt-savebar, .dt-block > .dt-savebar { margin: 0 -16px -16px; padding: 12px 16px; border-radius: 0 0 16px 16px; }\n.dt-glossary { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 20px; }\n.dt-glossary th, .dt-glossary td { text-align: left; padding: 6px 8px; border-bottom: 0.5px solid var(--dsw-alias-border-l2); vertical-align: top; }\n.dt-glossary th { color: var(--dsw-alias-label-tertiary); font-weight: 400; }\n.dt-glossary th.dt-glossary-group { color: var(--dsw-alias-label-secondary); font-weight: 600; padding-top: 14px; }\n.dt-glossary th:nth-child(-n+2), .dt-glossary td:nth-child(-n+2) { white-space: nowrap; }\n.dt-values { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 16px 0 0; font-size: 13px; }\n.dt-values dt { color: var(--dsw-alias-label-tertiary); }\n.dt-values dd { margin: 0; }\n.dt-pre { margin: 0; padding: 12px; border-radius: 10px; background: var(--dsw-alias-bg-module-platform); font-family: var(--ds-font-family-code, Menlo, monospace); font-size: 12px; line-height: 18px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 480px; overflow: auto; }\n.dt-pre ins { background: color-mix(in srgb, var(--dsw-alias-state-success-primary, green) 18%, transparent); text-decoration: none; }\n.dt-pre del { background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 18%, transparent); text-decoration: none; }\n.dt-prompt { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }\n.dt-prompt-nav { display: flex; flex-direction: column; gap: 2px; }\n.dt-prompt-nav button { justify-content: flex-start; }\n.dt-disclosure-body { padding: 8px 0 8px 28px; display: flex; flex-direction: column; gap: 8px; }\n@container (max-width: 640px) {\n .dt-tab { padding: 0 8px; font-size: 13px; }\n .dt-segment { padding: 0 10px; }\n .dt-head { align-items: center; }\n .dt-search-results { right: auto; left: 0; width: 100%; }\n .dt-page-title h2 { font-size: 17px; line-height: 24px; }\n .dt-status-line { margin-top: -12px; }\n .dt-page .dt-tabs { display: flex; flex-wrap: nowrap; scrollbar-width: thin; }\n .dt-page .dt-tab { flex: none; }\n .dt-page .dt-tabs[data-more='end'] { mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }\n .dt-page .dt-tabs[data-more='start'] { mask-image: linear-gradient(to right, transparent, #000 40px); }\n .dt-page .dt-tabs[data-more='both'] { mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); }\n .dt-kv { grid-template-columns: 1fr; gap: 2px; }\n .dt-grid3, .dt-prompt { grid-template-columns: 1fr; }\n .dt-search { width: 100%; }\n .dt-filters .dt-search { margin-left: 0; }\n}\n/* Local UI primitive styles (see controls.tsx). */\n.dt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; border: none; border-radius: 18px; cursor: pointer; font: inherit; font-size: 14px; line-height: 22px; color: var(--dsw-alias-label-primary); background: transparent; padding: 0 14px; white-space: nowrap; }\n.dt-btn:disabled { cursor: not-allowed; opacity: 0.4; }\n.dt-btn:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 2px; }\n.dt-btn-md { height: 36px; }\n.dt-btn-sm { height: 28px; font-size: 12px; line-height: 18px; padding: 0 10px; border-radius: 14px; }\n.dt-btn-primary { background: var(--dsw-alias-button-primary-fill); color: var(--dsw-alias-label-primary-foreground); }\n.dt-btn-primary:hover:not(:disabled) { background: var(--dsw-alias-button-primary-hover); }\n.dt-btn-ghost:hover:not(:disabled), .dt-btn-outline:hover:not(:disabled) { background: var(--dsw-alias-interactive-bg-hover); }\n.dt-btn-ghost:active:not(:disabled) { background: var(--dsw-alias-interactive-bg-active); }\n.dt-btn-outline { border: 0.5px solid var(--dsw-alias-border-l3); }\n.dt-btn-icon { display: inline-flex; width: 16px; height: 16px; align-items: center; justify-content: center; }\n.dt-tag { display: inline-flex; align-items: center; border-radius: 999px; padding: 1px 8px; font-size: 11px; line-height: 17px; font-weight: 500; white-space: nowrap; }\n.dt-tag[data-tone='outline'] { border: 0.5px solid var(--dsw-alias-border-l4); color: var(--dsw-alias-label-tertiary); }\n.dt-tag[data-tone='neutral'] { background: var(--dsw-alias-bg-module-platform); color: var(--dsw-alias-label-secondary); }\n.dt-tag[data-tone='quiet'] { color: var(--dsw-alias-label-tertiary); }\n.dt-tag[data-tone='success'] { background: color-mix(in srgb, var(--dsw-alias-state-success-primary) 10%, transparent); color: var(--dsw-alias-state-success-primary); }\n.dt-tag[data-tone='info'] { background: color-mix(in srgb, var(--dsw-alias-state-business-primary) 10%, transparent); color: var(--dsw-alias-state-business-primary); }\n.dt-tag[data-tone='warning'] { background: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 12%, transparent); color: var(--dsw-alias-state-warn-primary); }\n.dt-tag[data-tone='danger'] { background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent); color: var(--dsw-alias-state-error-primary); }\n.dt-pill { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border: none; border-radius: 12px; font: inherit; font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-secondary); background: var(--dsw-alias-bg-layer-2); cursor: pointer; }\n.dt-pill:hover { background: var(--dsw-alias-interactive-bg-hover); }\n.dt-pill-active, .dt-pill-active:hover { color: var(--dsw-alias-label-primary); background: var(--dsw-alias-button-ghost-active-fill); box-shadow: inset 0 0 0 1px var(--dsw-alias-button-ghost-active-border); }\n.dt-tabs { display: grid; padding: 4px; border-radius: 12px; background: var(--dsw-alias-bg-module-platform); }\n.dt-tab { box-sizing: border-box; height: 34px; padding: 0 12px; border: 0.5px solid transparent; border-radius: 8px; background: transparent; color: var(--dsw-alias-label-secondary); font: inherit; font-size: 14px; line-height: 20px; white-space: nowrap; cursor: pointer; transition: color 180ms ease, background 180ms ease; }\n.dt-tab:hover { color: var(--dsw-alias-label-primary); }\n.dt-tab[aria-selected='true'] { color: var(--dsw-alias-label-primary); font-weight: 600; background: var(--dsw-alias-bg-layer-3); border-color: var(--dsw-alias-border-l3); }\n.dt-tab:focus-visible { outline: none; text-decoration: underline; text-underline-offset: 4px; }\n.dt-segment { height: 28px; padding: 0 16px; border: 0; border-radius: 7px; background: transparent; color: var(--dsw-alias-label-secondary); font: inherit; font-size: 13px; line-height: 20px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: color 120ms ease, background 160ms ease; }\n.dt-segment:hover:not(:disabled), .dt-segment[aria-selected='true'] { color: var(--dsw-alias-label-primary); }\n.dt-segment[aria-selected='true'] { background: var(--dsw-alias-bg-layer-1); box-shadow: var(--dsw-elevation-soft); }\n.dt-segment:disabled { cursor: default; opacity: 0.4; }\n.dt-segment:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: -2px; }\n.dt-input { box-sizing: border-box; display: inline-flex; align-items: center; gap: 6px; height: 32px; min-width: 0; padding: 0 8px; border: 0.5px solid var(--dsw-alias-border-l4); border-radius: 8px; background: var(--dsw-alias-bg-layer-1); }\n.dt-input:focus-within { border-color: var(--dsw-alias-brand-primary); }\n.dt-input-icon { display: inline-flex; width: 16px; height: 16px; align-items: center; justify-content: center; color: var(--dsw-alias-label-tertiary); }\n.dt-input input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font: inherit; font-size: 14px; line-height: 22px; color: var(--dsw-alias-label-primary); }\n.dt-input input::placeholder { color: var(--dsw-alias-label-dimmed); }\n.dt-input input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }\n.dt-field .dt-input, .dt-search .dt-input, .dt-add-skill .dt-input { display: flex; width: 100%; }\n.dt-switch { box-sizing: border-box; flex: 0 0 auto; width: 36px; height: 20px; padding: 2px; border: 0; border-radius: 10px; background: var(--dsw-alias-border-l3); cursor: pointer; }\n.dt-switch[aria-checked='true'] { background: var(--dsw-alias-brand-primary); }\n.dt-switch:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 2px; }\n.dt-switch-thumb { display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--dsw-alias-label-primary-foreground); transition: transform 120ms ease; }\n.dt-switch[aria-checked='true'] .dt-switch-thumb { transform: translateX(16px); }\n.dt-state-dot { position: relative; display: inline-block; flex: none; width: 10px; height: 10px; color: var(--dsw-alias-state-idle-primary); }\n.dt-state-dot::after { content: ''; position: absolute; inset: 20%; border-radius: 50%; background: currentColor; }\n.dt-state-dot[data-state='done'] { color: var(--dsw-alias-state-success-primary); }\n.dt-state-dot[data-state='warning'] { color: var(--dsw-alias-state-warn-primary); }\n.dt-state-dot[data-state='error'] { color: var(--dsw-alias-state-error-primary); }\n.dt-spinner { flex: none; color: var(--dsw-alias-label-tertiary); }\n.dt-spinner g { transform-origin: center; animation: dt-spin 1.5s linear infinite; }\n.dt-spinner circle { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }\n.dt-spinner circle:first-child { opacity: 0.25; }\n.dt-spinner circle:last-child { stroke-dasharray: 18 150; }\n@keyframes dt-spin { to { transform: rotate(360deg); } }\n.dt-disclosure-row { display: flex; align-items: center; gap: 4px; min-height: 28px; min-width: 0; border-radius: 8px; cursor: pointer; font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-secondary); }\n.dt-disclosure-row:hover { color: var(--dsw-alias-label-primary); }\n.dt-disclosure-row:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 2px; }\n.dt-disclosure-lead { position: relative; display: inline-flex; flex: none; width: 24px; height: 24px; align-items: center; justify-content: center; }\n.dt-disclosure-icon { display: inline-flex; align-items: center; justify-content: center; }\n.dt-disclosure-chevron { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; }\n.dt-disclosure-row:hover .dt-disclosure-icon, .dt-disclosure[data-open] .dt-disclosure-icon { visibility: hidden; }\n.dt-disclosure-row:hover .dt-disclosure-chevron, .dt-disclosure[data-open] .dt-disclosure-chevron { display: inline-flex; }\n.dt-disclosure-title { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dt-modal-root { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: max(24px, var(--dsh-frame-top-clearance, 24px)) 24px; }\n.dt-modal-mask { position: absolute; inset: 0; background: var(--dsw-alias-bg-mask-1); backdrop-filter: var(--dsw-mask-blur); }\n.dt-modal { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 20px; width: min(380px, 100%); max-height: 100%; padding: 0 0 24px; overflow: hidden; border-radius: 24px; background: var(--dsw-alias-bg-layer-2); box-shadow: var(--dsw-elevation-prominent); color: var(--dsw-alias-label-primary); outline: none; }\n.dt-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 22px 14px 0 24px; }\n.dt-modal-header h2 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 500; }\n.dt-modal-close { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: none; border-radius: 8px; background: transparent; cursor: pointer; color: var(--dsw-alias-label-secondary); }\n.dt-modal-close:hover { background: var(--dsw-alias-interactive-bg-hover); }\n.dt-modal-description { margin: -8px 0 0; padding: 0 24px; font-size: 14px; line-height: 22px; }\n.dt-modal-body { min-width: 0; min-height: 0; overflow: auto; padding: 0 24px; }\n.dt-modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 0 24px; }\n.dt-toast { position: fixed; top: 40px; left: 50%; z-index: 1100; pointer-events: none; width: max-content; max-width: min(640px, calc(100vw - 48px)); padding: 12px 16px; border-radius: 14px; background: var(--dsw-alias-toast-bg); color: var(--dsw-static-neutral-bluish-00); font-size: 14px; line-height: 22px; box-shadow: var(--dsw-shadow-lv3); transform: translateX(-50%); animation: dt-toast-in 160ms ease-out, dt-toast-fade 1000ms ease var(--dt-toast-hold, 3000ms) forwards; }\n@keyframes dt-toast-in { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }\n@keyframes dt-toast-fade { to { opacity: 0; visibility: hidden; } }\n@media (prefers-reduced-motion: reduce) {\n .dt-tab, .dt-segment, .dt-switch-thumb, .dt-spinner g, .dt-btn-busy .dt-btn-icon svg, .dt-tooltip { transition: none; animation: none; }\n .dt-toast { animation: dt-toast-fade 1000ms ease var(--dt-toast-hold, 3000ms) forwards; }\n}\n.dt-page .dt-tab { height: 34px; padding: 0 2px; border: 0; border-radius: 0; color: var(--dsw-alias-label-tertiary); font-size: 14px; }\n.dt-page .dt-tab[aria-selected='true'] { background: none; color: var(--dsw-alias-label-primary); font-weight: 500; box-shadow: inset 0 -1.5px 0 var(--dsw-alias-label-primary); }\n.dt-status-head { display: flex; align-items: center; gap: 8px; }\n.dt-status-title { margin: 0; flex: 1; display: flex; align-items: center; gap: 4px; font-size: 15px; line-height: 22px; font-weight: 600; }\n.dt-status-text { margin-left: auto; flex: none; font-size: 12px; font-weight: 400; color: var(--dsw-alias-label-secondary); }\n.dt-status-line .dt-status-text { margin-left: 0; }\n.dt-status-text[data-state='warning'] { color: var(--dsw-alias-state-warn-primary); }\n.dt-status-text[data-state='error'] { color: var(--dsw-alias-state-error-primary); }\n.dt-row-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }\n.dt-lv { white-space: nowrap; }\n.dt-lv-label { color: var(--dsw-alias-label-caption); }\n.dt-lv-value { color: var(--dsw-alias-label-secondary); font-variant-numeric: tabular-nums; }\n.dt-chip { display: inline-flex; flex-wrap: wrap; max-width: 100%; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 6px; overflow: hidden; font-size: 11px; line-height: 18px; color: var(--dsw-alias-label-secondary); }\n.dt-chip-source { padding: 0 6px; color: var(--dsw-alias-label-tertiary); background: var(--dsw-alias-bg-module-platform); }\n.dt-chip-fact { padding: 0 6px; border-left: 0.5px solid var(--dsw-alias-border-l3); white-space: nowrap; }\n.dt-chip-label { margin-right: 4px; color: var(--dsw-alias-label-caption); }\n.dt-chip-link { position: relative; z-index: 1; text-decoration: none; cursor: pointer; transition: border-color 120ms ease; }\n.dt-chip-link:hover { border-color: var(--dsw-alias-brand-primary); }\n.dt-chip-link:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 1px; }\n.dt-chip-open { display: inline-flex; align-items: center; padding: 0 5px; border-left: 0.5px solid var(--dsw-alias-border-l3); color: var(--dsw-alias-brand-primary); }\n.dt-chip-problem, .dt-chip-problem .dt-chip-label { color: var(--dsw-alias-state-error-primary); }\n.dt-cards { gap: 8px; }\n.dt-att .dt-inline-link { font-size: 13px; font-weight: 500; }\n.dt-list > .dt-att { margin: 2px 8px; }\n.dt-att { padding: 10px 12px 10px 16px; border: 0; border-radius: 0; border-bottom: 0.5px solid var(--dsw-alias-border-l3); }\n.dt-att::before { content: ''; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 2px; border-radius: 1px; background: var(--dsw-alias-state-warn-primary); opacity: 0.7; }\n.dt-att-error::before { background: var(--dsw-alias-state-error-primary); }\n.dt-att-what { font-size: 12px; line-height: 18px; font-weight: 500; color: var(--dsw-alias-state-warn-primary); }\n.dt-att-error .dt-att-what, .dt-att-error .dt-att-what .dt-open { color: var(--dsw-alias-state-error-primary); }\n.dt-stats { display: flex; flex-wrap: wrap; gap: 6px 20px; }\n.dt-stat { display: inline-flex; align-items: baseline; gap: 6px; font-size: 12px; color: var(--dsw-alias-label-caption); }\n.dt-stat-value { font-size: 14px; font-weight: 500; color: var(--dsw-alias-label-primary); font-variant-numeric: tabular-nums; }\n.dt-more-link { font-size: 12px; font-weight: 400; }\n.dt-settings { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 24px; align-items: start; }\n.dt-settings-nav { position: sticky; top: 0; display: flex; flex-direction: column; gap: 2px; }\n.dt-settings-link { padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: var(--dsw-alias-label-secondary); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }\n.dt-settings-link:hover { color: var(--dsw-alias-label-primary); }\n.dt-settings-link[aria-current='page'] { background: var(--dsw-alias-bg-module-platform); color: var(--dsw-alias-label-primary); font-weight: 500; }\n.dt-settings-link[data-stage] + .dt-settings-link:not([data-stage]) { margin-top: 10px; }\n.dt-settings-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; }\n.dt-settings-title { margin: 0; font-size: 15px; line-height: 22px; font-weight: 600; }\n.dt-subtabs { display: flex; gap: 16px; border-bottom: 0.5px solid var(--dsw-alias-border-l3); }\n.dt-subtab { padding: 0 0 6px; border: 0; background: none; color: var(--dsw-alias-label-tertiary); font: inherit; font-size: 13px; cursor: pointer; }\n.dt-subtab[aria-selected='true'] { color: var(--dsw-alias-label-primary); font-weight: 500; box-shadow: inset 0 -1.5px 0 var(--dsw-alias-label-primary); }\n.dt-part { display: flex; flex-direction: column; gap: 12px; }\n.dt-rows-summary { text-align: left; color: var(--dsw-alias-label-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }\n.dt-table { width: 100%; border-collapse: collapse; font-size: 12px; line-height: 18px; }\n.dt-table th { text-align: left; font-weight: 400; color: var(--dsw-alias-label-caption); padding: 2px 8px 2px 0; }\n.dt-table td { padding: 4px 8px 4px 0; border-top: 0.5px solid var(--dsw-alias-border-l3); vertical-align: top; color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; }\n@container (max-width: 640px) {\n .dt-settings { grid-template-columns: 1fr; gap: 12px; }\n .dt-settings-nav { position: static; flex-direction: row; flex-wrap: wrap; }\n .dt-settings-link[data-stage] + .dt-settings-link:not([data-stage]) { margin-top: 0; }\n .dt-page .dt-tabs { gap: 14px; }\n}\n.dt-list > .dt-ticket { display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: 12px; align-items: start; margin: 0; padding: 12px 8px 12px 18px; border-radius: 0; border-bottom: 0.5px solid var(--dsw-alias-border-l3); }\n.dt-list > .dt-ticket[data-state]::before { content: ''; position: absolute; left: 6px; top: 12px; bottom: 12px; width: 2px; border-radius: 1px; background: var(--dsw-alias-state-warn-primary); opacity: 0.7; }\n.dt-list > .dt-ticket[data-state='error']::before { background: var(--dsw-alias-state-error-primary); }\n.dt-ticket-stage { align-self: stretch; padding-top: 1px; border-right: 0.5px solid var(--dsw-alias-border-l3); }\n.dt-ticket-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }\n.dt-ticket-body .dt-row-title .dt-open { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dt-ticket-meta { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }\n.dt-ticket-meta .dt-chip { flex: none; }\n.dt-ticket-note { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--dsw-alias-label-primary); }\n.dt-ticket-note-error { color: var(--dsw-alias-state-error-primary); }\n.dt-ticket-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; min-height: 30px; margin-top: 2px; }\n/* Pass pointer events through action containers to the row link, keeping only child controls interactive. */\n.dt-ticket-actions, .dt-row-buttons, .dt-row-actions { pointer-events: none; }\n.dt-ticket-actions > *, .dt-row-buttons > *, .dt-row-actions > * { pointer-events: auto; }\n.dt-line { min-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.dt-row-meta.dt-line { flex-wrap: nowrap; }\n.dt-line-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dt-error-text { color: var(--dsw-alias-state-error-primary); }\n.dt-stage { display: inline-flex; align-items: flex-start; gap: 5px; font-size: 12px; line-height: 18px; font-weight: 500; color: var(--dsw-alias-label-secondary); }\n.dt-stage svg { flex: none; margin-top: 2px; }\n.dt-stage[data-state='warning'] { color: var(--dsw-alias-state-warn-primary); }\n.dt-stage[data-state='error'] { color: var(--dsw-alias-state-error-primary); }\n.dt-stage[data-state='ongoing'] { color: var(--dsw-alias-state-business-primary); }\n.dt-icon-link { display: inline-flex; align-items: center; gap: 4px; }\na.dt-btn, a.dt-btn:hover { text-decoration: none; }\n.dt-section-icon { display: inline-flex; align-self: center; color: var(--dsw-alias-label-tertiary); }\n.dt-trigger-link { display: flex; flex-direction: column; gap: 2px; width: 100%; margin: -4px 0 -4px -8px; padding: 4px 8px; border: 0; border-radius: 8px; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }\n.dt-trigger-link:hover { background: var(--dsw-alias-interactive-bg-hover); }\n.dt-trigger-link:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 1px; }\n.dt-trigger-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }\n.dt-kv-stack { display: flex; flex-direction: column; gap: 2px; min-width: 0; }\n.dt-banner-actions { margin-top: 6px; }\n@container (max-width: 640px) {\n .dt-list > .dt-ticket { grid-template-columns: 1fr; row-gap: 4px; }\n .dt-ticket-stage { border-right: 0; }\n}\n.dt-nav-group { margin: 10px 10px 2px; font-size: 12px; font-weight: 600; color: var(--dsw-alias-label-secondary); }\n.dt-nav-group:first-child { margin-top: 0; }\n.dt-prompt-nav .dt-nav-item { flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }\n.dt-nav-item > span { display: inline-flex; align-items: center; gap: 6px; }\n.dt-nav-item small { font-size: 12px; line-height: 18px; font-weight: 400; color: var(--dsw-alias-label-caption); }\n.dt-preview-part[data-editable] { border-left-color: var(--dsw-alias-brand-primary); }\n.dt-preview-head b { font-weight: 500; }\n.dt-preview-head > span { font-size: 12px; color: var(--dsw-alias-label-caption); }\n.dt-changed-tag { margin-left: 6px; padding: 0 5px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 4px; font-size: 11px; line-height: 16px; font-weight: 400; color: var(--dsw-alias-label-secondary); }\n.dt-updated-tag { border-color: var(--dsw-alias-state-warn-primary); color: var(--dsw-alias-state-warn-primary); }\n.dt-default-updated { display: flex; flex-direction: column; gap: 6px; padding: 2px 0 2px 12px; border-left: 2px solid var(--dsw-alias-state-warn-primary); }\n.dt-diff-fold { color: var(--dsw-alias-label-caption); font-style: italic; }\n.dt-compare { margin-left: auto; }\n.dt-admission th { white-space: nowrap; }\n.dt-admission thead tr:first-child th:not(:first-child) { color: var(--dsw-alias-label-secondary); font-weight: 500; }\n.dt-admission td { vertical-align: middle; }\n.dt-admission-scope { color: var(--dsw-alias-label-primary); font-size: 13px; }\n.dt-admission-scope small { display: block; font-size: 11px; color: var(--dsw-alias-label-caption); }\n.dt-admission-na { color: var(--dsw-alias-label-caption); }\n.dt-admission-cell { display: flex; align-items: center; gap: 4px; }\n.dt-admission-cell .dt-select { flex: 1; min-width: 0; }\n.dt-admission-slot { display: inline-flex; flex: none; width: 16px; }\n.dt-info-warn { color: var(--dsw-alias-state-warn-primary); }\n.dt-field-segmented { max-width: 240px; }\n";
|
|
108
108
|
|
|
109
109
|
/** 把移植过来的样式挂到 document 上,只挂一次。 */
|
|
110
|
+
/**
|
|
111
|
+
* 悬浮面板只保留「定位」用 inline style,视觉全部走 dt-* + token。
|
|
112
|
+
* 以前这里是一整套自成体系的 inline style,和原生界面放一起能看出断层。
|
|
113
|
+
*/
|
|
114
|
+
const DOCK_CSS = `
|
|
115
|
+
.sa-dock-panel { box-shadow: var(--dsw-elevation-prominent); padding: 10px 12px 8px; font-size: 12px; line-height: 1.55; }
|
|
116
|
+
.sa-dock-row { padding: 6px 0; }
|
|
117
|
+
.sa-dock-row + .sa-dock-row { border-top: 0.5px solid var(--dsw-alias-border-l3, currentColor); }
|
|
118
|
+
.sa-dock-foot { margin-top: 8px; padding-top: 8px; border-top: 0.5px solid var(--dsw-alias-border-l3, currentColor); color: var(--dsw-alias-label-caption, inherit); }
|
|
119
|
+
.sa-mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
120
|
+
`
|
|
121
|
+
|
|
110
122
|
function ensurePortedCss() {
|
|
111
123
|
try {
|
|
112
124
|
if (document.getElementById('dsh-zhuli-ported-css')) return
|
|
113
125
|
const style = document.createElement('style')
|
|
114
126
|
style.id = 'dsh-zhuli-ported-css'
|
|
115
|
-
style.textContent = PORTED_CSS
|
|
127
|
+
style.textContent = PORTED_CSS + DOCK_CSS
|
|
116
128
|
document.head.appendChild(style)
|
|
117
129
|
} catch {}
|
|
118
130
|
}
|
|
@@ -250,18 +262,52 @@ window.__ModuleLoader__.load({
|
|
|
250
262
|
]))
|
|
251
263
|
}
|
|
252
264
|
|
|
265
|
+
// 官方 Modal 的键盘行为:Escape 关闭 + Tab 焦点陷阱 + 关闭后焦点回到触发元素。
|
|
266
|
+
// 移植时只搬了样式,行为是后补的(2026-11-02 对官方 controls.tsx 逐行比对时发现)。
|
|
267
|
+
const FOCUSABLE = 'a[href], button:not(:disabled), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])'
|
|
268
|
+
function trapTab(event, dialog) {
|
|
269
|
+
const items = [...dialog.querySelectorAll('*')].filter((element) => element.matches(FOCUSABLE))
|
|
270
|
+
const first = items[0]
|
|
271
|
+
const last = items[items.length - 1]
|
|
272
|
+
const active = document.activeElement
|
|
273
|
+
const target = event.shiftKey ? last : first
|
|
274
|
+
if (!target || !dialog.contains(active) || active === dialog || active === (event.shiftKey ? first : last)) {
|
|
275
|
+
event.preventDefault()
|
|
276
|
+
target.focus()
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
253
280
|
function Modal({ open, title, children, onClose }) {
|
|
281
|
+
const dialog = useRef(null)
|
|
282
|
+
const restoreTo = useRef(null)
|
|
254
283
|
useEffect(() => {
|
|
255
284
|
if (!open || typeof document === 'undefined') return undefined
|
|
256
|
-
|
|
285
|
+
restoreTo.current = document.activeElement
|
|
286
|
+
// 打开后把焦点挪进对话框,否则键盘用户还停在背后的页面上
|
|
287
|
+
const timer = setTimeout(() => {
|
|
288
|
+
const node = dialog.current
|
|
289
|
+
if (!node) return
|
|
290
|
+
const first = [...node.querySelectorAll('*')].filter((el) => el.matches(FOCUSABLE))[0]
|
|
291
|
+
;(first || node).focus()
|
|
292
|
+
}, 0)
|
|
293
|
+
const onKey = (event) => {
|
|
294
|
+
if (event.key === 'Escape') { event.preventDefault(); onClose(); return }
|
|
295
|
+
if (event.key === 'Tab' && dialog.current) trapTab(event, dialog.current)
|
|
296
|
+
}
|
|
257
297
|
document.addEventListener('keydown', onKey)
|
|
258
|
-
return () =>
|
|
298
|
+
return () => {
|
|
299
|
+
clearTimeout(timer)
|
|
300
|
+
document.removeEventListener('keydown', onKey)
|
|
301
|
+
const back = restoreTo.current
|
|
302
|
+
if (back && typeof back.focus === 'function') { try { back.focus() } catch {} }
|
|
303
|
+
}
|
|
259
304
|
}, [open, onClose])
|
|
260
305
|
if (!open) return null
|
|
261
306
|
// class 必须与移植来的官方 CSS 对齐:dt-modal-root / dt-modal-mask / dt-modal-header
|
|
262
307
|
return h('div', { className: 'dt-modal-root' },
|
|
263
308
|
h('div', { className: 'dt-modal-mask', role: 'presentation', onClick: onClose }),
|
|
264
309
|
h('div', {
|
|
310
|
+
ref: dialog, tabIndex: -1,
|
|
265
311
|
className: 'dt-modal', role: 'dialog', 'aria-modal': 'true',
|
|
266
312
|
'aria-label': typeof title === 'string' ? title : undefined,
|
|
267
313
|
},
|
|
@@ -567,70 +613,57 @@ window.__ModuleLoader__.load({
|
|
|
567
613
|
} catch {}
|
|
568
614
|
}
|
|
569
615
|
|
|
616
|
+
// 悬浮面板也走移植来的 dt-* 设计系统(以前这里是一套自成体系的 inline style,
|
|
617
|
+
// 和原生界面放在一起能看出断层;ui-audit ⑥ 就是在盯这件事)。
|
|
570
618
|
const rows = list.map((w) => {
|
|
571
619
|
const state = orbitStateOf(w)
|
|
620
|
+
const extra = [
|
|
621
|
+
filterText(w.filters),
|
|
622
|
+
w.activeHours ? '时段 ' + w.activeHours : '',
|
|
623
|
+
isolationText(w),
|
|
624
|
+
backoffText(w),
|
|
625
|
+
historyText(w),
|
|
626
|
+
w.lastDeferred,
|
|
627
|
+
].filter(Boolean).join(' · ')
|
|
572
628
|
return h('div', {
|
|
573
629
|
key: String(w.repo || '') + '#' + String(w.sessionId || ''),
|
|
574
|
-
|
|
630
|
+
className: 'dt-row sa-dock-row',
|
|
575
631
|
},
|
|
576
|
-
h('div', {
|
|
577
|
-
h('
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
(w.
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
backoffText(w),
|
|
593
|
-
historyText(w),
|
|
594
|
-
w.lastDeferred,
|
|
595
|
-
].filter(Boolean).join(' · '))
|
|
596
|
-
: null,
|
|
597
|
-
w.goal && w.goal.objective
|
|
598
|
-
? h('div', { style: { paddingLeft: 13, opacity: 0.55, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' } },
|
|
599
|
-
'goal · ' + String(w.goal.objective).slice(0, 60))
|
|
600
|
-
: null,
|
|
601
|
-
w.lastError
|
|
602
|
-
? h('div', { style: { paddingLeft: 13, color: '#f85149', overflowWrap: 'anywhere' } }, String(w.lastError).slice(0, 160))
|
|
603
|
-
: null,
|
|
604
|
-
h('div', { style: { paddingLeft: 13, marginTop: 5, display: 'flex', gap: 8 } },
|
|
605
|
-
h('button', { style: S.tiny, onClick: () => act(w, 'poll') }, '立刻'),
|
|
606
|
-
h('button', { style: S.tiny, onClick: () => act(w, w.enabled ? 'pause' : 'resume') },
|
|
632
|
+
h('div', { className: 'dt-row-main' },
|
|
633
|
+
h('div', { className: 'dt-row-title' },
|
|
634
|
+
h('span', { className: 'dt-dot-wrap' },
|
|
635
|
+
h('span', { className: 'dt-state-dot', 'data-state': state === 'active' ? 'done' : state === 'paused' ? 'warning' : state === 'error' ? 'error' : 'idle' })),
|
|
636
|
+
h('span', { className: 'sa-mono' }, String(w.repo || '?')),
|
|
637
|
+
h('span', { className: 'dt-row-meta' }, STATE_TEXT[state])),
|
|
638
|
+
h('div', { className: 'dt-hint' }, (w.title || '未命名会话') + ' · ' + sessionTag(w.sessionId)),
|
|
639
|
+
h('div', { className: 'dt-hint' }, '每 ' + w.intervalSec + 's · 轮询 ' + ageText(w.lastPoll) + ' · 唤醒 ' + wakeText(w.lastWake)),
|
|
640
|
+
extra ? h('div', { className: 'dt-hint' }, extra) : null,
|
|
641
|
+
w.goal && w.goal.objective
|
|
642
|
+
? h('div', { className: 'dt-hint' }, 'goal · ' + String(w.goal.objective).slice(0, 60))
|
|
643
|
+
: null,
|
|
644
|
+
w.lastError ? h('div', { className: 'dt-error' }, String(w.lastError).slice(0, 160)) : null),
|
|
645
|
+
h('div', { className: 'dt-row-actions' },
|
|
646
|
+
h(Btn, { size: 'sm', variant: 'ghost', onClick: () => act(w, 'poll') }, '立刻'),
|
|
647
|
+
h(Btn, { size: 'sm', variant: 'ghost', onClick: () => act(w, w.enabled ? 'pause' : 'resume') },
|
|
607
648
|
w.enabled ? '暂停' : '恢复'),
|
|
608
|
-
h(
|
|
649
|
+
h(ConfirmBtn, {
|
|
650
|
+
label: '删除', confirmLabel: '确认删除', variant: 'ghost', size: 'sm',
|
|
651
|
+
onConfirm: () => act(w, 'delete'),
|
|
652
|
+
})))
|
|
609
653
|
})
|
|
610
654
|
|
|
611
655
|
const panel = h('div', {
|
|
612
|
-
ref: panelRef, role: 'dialog', 'aria-label': summary,
|
|
613
|
-
style: {
|
|
614
|
-
position: 'fixed', left, bottom, width, zIndex: 2147483000,
|
|
615
|
-
border: BORDER, borderRadius: 10,
|
|
616
|
-
background: 'var(--dsw-alias-bg-base, canvas)',
|
|
617
|
-
color: 'var(--dsw-alias-label-primary, inherit)',
|
|
618
|
-
boxShadow: '0 12px 32px rgba(0,0,0,.28)', padding: '10px 12px 8px',
|
|
619
|
-
font: '12px/1.55 system-ui, sans-serif',
|
|
620
|
-
maxHeight: 360, overflow: 'auto',
|
|
621
|
-
},
|
|
656
|
+
ref: panelRef, role: 'dialog', 'aria-label': summary, className: 'dt-card sa-dock-panel',
|
|
657
|
+
style: { position: 'fixed', left, bottom, width, zIndex: 2147483000, maxHeight: 360, overflow: 'auto' },
|
|
622
658
|
},
|
|
623
|
-
h('div', {
|
|
624
|
-
h('span', {
|
|
625
|
-
h('span', {
|
|
659
|
+
h('div', { className: 'dt-card-head' },
|
|
660
|
+
h('span', { className: 'dt-card-title' }, '主理鱼'),
|
|
661
|
+
h('span', { className: 'dt-count' }, list.length === 0 ? '0 条' : running + '/' + list.length + ' 主理中')),
|
|
626
662
|
list.length === 0
|
|
627
|
-
? h('div', {
|
|
628
|
-
|
|
629
|
-
: null,
|
|
630
|
-
...rows,
|
|
663
|
+
? h('div', { className: 'dt-hint' }, '在「主理鱼」页填 owner/name 加一条。')
|
|
664
|
+
: h('div', { className: 'dt-rows' }, rows),
|
|
631
665
|
list.length > 0
|
|
632
|
-
? h('div', {
|
|
633
|
-
'点「暂停 / 删除」直接停掉;「主理鱼」标签页可新增与配置凭证')
|
|
666
|
+
? h('div', { className: 'sa-dock-foot' }, '点「暂停 / 删除」直接停掉;「主理鱼」标签页可新增与配置凭证')
|
|
634
667
|
: null)
|
|
635
668
|
|
|
636
669
|
return h(React.Fragment, null, button, panel)
|
|
@@ -714,6 +747,8 @@ window.__ModuleLoader__.load({
|
|
|
714
747
|
// 版本检查结果(只读):面板里直接告诉客户「有没有新版本、该跑什么命令」
|
|
715
748
|
const [update, setUpdate] = useState(null)
|
|
716
749
|
const [checking, setChecking] = useState(false)
|
|
750
|
+
// 设置页用官方的「左栏 + 内容」结构(dt-settings),所以要记当前分区
|
|
751
|
+
const [settingsSection, setSettingsSection] = useState('source')
|
|
717
752
|
|
|
718
753
|
const load = useCallback(async () => {
|
|
719
754
|
try {
|
|
@@ -838,61 +873,57 @@ window.__ModuleLoader__.load({
|
|
|
838
873
|
return h(Tag, { tone, title: state === 'dormant' ? '不在活跃时段:只攒条目,不唤醒' : undefined }, STATE_TEXT[state])
|
|
839
874
|
}
|
|
840
875
|
|
|
876
|
+
// 行结构对齐官方 rows.tsx 的 TicketLine:dt-ticket(左侧状态列)+ dt-open 标题 + dt-ticket-actions。
|
|
877
|
+
// 标题本身是按钮 —— 官方就是点标题进详情,我们点标题展开行内编辑,交互更轻但不脱离这套结构。
|
|
878
|
+
const STAGE_STATE = { active: undefined, paused: 'warning', error: 'error', dormant: 'warning' }
|
|
841
879
|
const row = (watcher) => {
|
|
842
880
|
const key = watcher.repo + '#' + watcher.sessionId
|
|
843
|
-
const
|
|
844
|
-
h('div', { className: 'dt-
|
|
845
|
-
h(Dot, { state: orbitStateOf(watcher) === 'active' ? 'done' : orbitStateOf(watcher) === 'error' ? 'error' : 'idle', label: STATE_TEXT[orbitStateOf(watcher)] }),
|
|
881
|
+
const state = orbitStateOf(watcher)
|
|
882
|
+
const rowBody = h('div', { className: 'dt-ticket-body' },
|
|
846
883
|
h('div', { className: 'dt-row-title' },
|
|
847
|
-
h('
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
(
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
884
|
+
h('button', {
|
|
885
|
+
type: 'button', className: 'dt-open', title: '展开或收起这条主理鱼的设置',
|
|
886
|
+
'aria-expanded': editing === key, onClick: () => {
|
|
887
|
+
setEditing(editing === key ? null : key)
|
|
888
|
+
setDraft({
|
|
889
|
+
intervalSec: String(watcher.intervalSec ?? 60),
|
|
890
|
+
labels: (watcher.filters && watcher.filters.labels ? watcher.filters.labels : []).join(','),
|
|
891
|
+
activeHours: watcher.activeHours || '',
|
|
892
|
+
goal: watcher.note || '',
|
|
893
|
+
onlyAssigned: !!(watcher.filters && watcher.filters.onlyAssigned),
|
|
894
|
+
})
|
|
895
|
+
},
|
|
896
|
+
}, watcher.repo)),
|
|
897
|
+
h('div', { className: 'dt-row-meta dt-ticket-meta' },
|
|
860
898
|
stateTag(watcher),
|
|
861
899
|
watcher.observe ? h(Tag, { tone: 'warning' }, '仅观察') : null,
|
|
862
900
|
watcher.activeHours ? h(Tag, null, '时段 ' + watcher.activeHours) : null,
|
|
863
901
|
watcher.isolated ? h(Tag, null, isolationText(watcher)) : null,
|
|
864
902
|
filterText(watcher.filters) ? h(Tag, null, filterText(watcher.filters)) : null,
|
|
865
|
-
backoffText(watcher) ? h(Tag, { tone: 'warning' }, backoffText(watcher)) : null)
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
label: watcher.enabled ? '暂停' : '恢复',
|
|
890
|
-
onClick: () => act(watcher, watcher.enabled ? 'pause' : 'resume'),
|
|
891
|
-
}, watcher.enabled ? '暂停' : '恢复'),
|
|
892
|
-
h(ConfirmBtn, {
|
|
893
|
-
size: 'sm', variant: 'ghost', icon: h(Icon, { name: 'trash' }), label: '删除',
|
|
894
|
-
confirmLabel: '确认删除', onConfirm: () => act(watcher, 'delete'),
|
|
895
|
-
})))
|
|
903
|
+
backoffText(watcher) ? h(Tag, { tone: 'warning' }, backoffText(watcher)) : null),
|
|
904
|
+
h('div', { className: 'dt-ticket-note' },
|
|
905
|
+
[
|
|
906
|
+
(watcher.title || '未命名会话') + ' · ' + sessionTag(watcher.sessionId),
|
|
907
|
+
'每 ' + watcher.intervalSec + 's',
|
|
908
|
+
'轮询 ' + ageText(watcher.lastPoll),
|
|
909
|
+
'唤醒 ' + wakeText(watcher.lastWake),
|
|
910
|
+
historyText(watcher),
|
|
911
|
+
watcher.note ? '目标: ' + String(watcher.note).slice(0, 40) : '',
|
|
912
|
+
].filter(Boolean).join(' · ')),
|
|
913
|
+
watcher.lastDeferred ? h('div', { className: 'dt-ticket-note' }, watcher.lastDeferred) : null,
|
|
914
|
+
watcher.lastError ? h('div', { className: 'dt-ticket-note dt-ticket-note-error' }, String(watcher.lastError).slice(0, 160)) : null,
|
|
915
|
+
h('div', { className: 'dt-ticket-actions' },
|
|
916
|
+
h(Btn, { size: 'sm', variant: 'outline', icon: h(Icon, { name: 'refresh' }), onClick: () => act(watcher, 'poll') }, '立刻'),
|
|
917
|
+
h(Btn, {
|
|
918
|
+
size: 'sm', variant: 'ghost',
|
|
919
|
+
icon: h(Icon, { name: watcher.enabled ? 'pause' : 'play' }),
|
|
920
|
+
label: watcher.enabled ? '暂停' : '恢复',
|
|
921
|
+
onClick: () => act(watcher, watcher.enabled ? 'pause' : 'resume'),
|
|
922
|
+
}, watcher.enabled ? '暂停' : '恢复'),
|
|
923
|
+
h(ConfirmBtn, {
|
|
924
|
+
size: 'sm', variant: 'ghost', icon: h(Icon, { name: 'trash' }), label: '删除',
|
|
925
|
+
confirmLabel: '确认删除', onConfirm: () => act(watcher, 'delete'),
|
|
926
|
+
})))
|
|
896
927
|
const editor = editing === key
|
|
897
928
|
? h('div', { className: 'dt-fieldset' },
|
|
898
929
|
field('间隔(秒)', h(Input, { value: draft.intervalSec, onChange: (e) => setDraft({ ...draft, intervalSec: e.target.value }) })),
|
|
@@ -909,7 +940,17 @@ window.__ModuleLoader__.load({
|
|
|
909
940
|
h(Btn, { size: 'sm', variant: 'primary', onClick: () => saveEdit(watcher) }, '保存'),
|
|
910
941
|
h(Btn, { size: 'sm', onClick: () => setEditing(null) }, '放弃')))
|
|
911
942
|
: null
|
|
912
|
-
|
|
943
|
+
// 官方 TicketLine 是 <li class="dt-row dt-link dt-ticket"> 里套「状态列 + 正文列」,
|
|
944
|
+
// 展开的表单跟在正文列里,不破坏两列网格。
|
|
945
|
+
const bodyChildren = [].concat(rowBody.props.children || []).filter(Boolean)
|
|
946
|
+
return h('li', {
|
|
947
|
+
key,
|
|
948
|
+
className: 'dt-row dt-link dt-ticket',
|
|
949
|
+
'data-state': state === 'error' ? 'error' : undefined,
|
|
950
|
+
},
|
|
951
|
+
h('div', { className: 'dt-ticket-stage' },
|
|
952
|
+
h('span', { className: 'dt-stage', 'data-state': STAGE_STATE[state] }, STATE_TEXT[state])),
|
|
953
|
+
h('div', { className: 'dt-ticket-body' }, ...bodyChildren, editor))
|
|
913
954
|
}
|
|
914
955
|
|
|
915
956
|
const problems = []
|
|
@@ -949,7 +990,7 @@ window.__ModuleLoader__.load({
|
|
|
949
990
|
? h(Hint, null, '还没有主理鱼。切到「触发」页填一个 owner/name 添加。')
|
|
950
991
|
: visible.length === 0
|
|
951
992
|
? h(Hint, null, '没有匹配「' + search + '」的主理鱼。')
|
|
952
|
-
: h('
|
|
993
|
+
: h('ul', { className: 'dt-list' }, visible.map(row))),
|
|
953
994
|
]
|
|
954
995
|
|
|
955
996
|
// 判定日志(对应官方 eval 页):每轮的唤醒结果、跳过原因、被过滤记录,一次看全
|
|
@@ -985,7 +1026,7 @@ window.__ModuleLoader__.load({
|
|
|
985
1026
|
h(Btn, { variant: 'primary', icon: h(Icon, { name: 'plus' }), onClick: addWatcher, disabled: !sessionId || !form.repo.trim() },
|
|
986
1027
|
sessionId ? '添加到当前会话' : '需要会话上下文'))))
|
|
987
1028
|
|
|
988
|
-
const
|
|
1029
|
+
const settingsSections = [
|
|
989
1030
|
h(Section, { key: 'source', title: '来源' },
|
|
990
1031
|
h(KeyValues, { rows: [
|
|
991
1032
|
['仓库', watchers.length === 0 ? '未绑定' : watchers.map((w) => w.repo).join(', ')],
|
|
@@ -1021,6 +1062,26 @@ window.__ModuleLoader__.load({
|
|
|
1021
1062
|
h('div', { className: 'dt-actions' }, h(Btn, { variant: 'primary', onClick: saveGoal, disabled: !sessionId }, '保存 goal'))),
|
|
1022
1063
|
]
|
|
1023
1064
|
|
|
1065
|
+
|
|
1066
|
+
// 官方设置页是「左栏导航 + 右侧内容」的网格(dt-settings / dt-settings-nav / dt-settings-body)。
|
|
1067
|
+
// 我们之前是单列堆叠,四个分区一起铺开,深链路里翻起来很累。
|
|
1068
|
+
const SETTINGS_SECTIONS = [
|
|
1069
|
+
{ key: 'source', title: '来源' },
|
|
1070
|
+
{ key: 'creds', title: '凭证' },
|
|
1071
|
+
{ key: 'update', title: '版本与更新' },
|
|
1072
|
+
{ key: 'goal', title: '会话 goal' },
|
|
1073
|
+
]
|
|
1074
|
+
const settingsBody = settingsSections.find((node) => node && node.props && node.props.key === settingsSection)
|
|
1075
|
+
|| settingsSections.find(Boolean)
|
|
1076
|
+
const settings = h('div', { className: 'dt-settings' },
|
|
1077
|
+
h('nav', { className: 'dt-settings-nav', 'aria-label': '设置分区' },
|
|
1078
|
+
SETTINGS_SECTIONS.map((item) => h('button', {
|
|
1079
|
+
key: item.key, type: 'button', className: 'dt-settings-link',
|
|
1080
|
+
'aria-current': settingsSection === item.key ? 'page' : undefined,
|
|
1081
|
+
onClick: () => setSettingsSection(item.key),
|
|
1082
|
+
}, item.title))),
|
|
1083
|
+
h('div', { className: 'dt-settings-body' }, settingsBody))
|
|
1084
|
+
|
|
1024
1085
|
const checkUpdate = useCallback(async (force) => {
|
|
1025
1086
|
setChecking(true)
|
|
1026
1087
|
try {
|
package/lib/index.js
CHANGED
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
|
|
31
31
|
export const name = 'dsh-session-superagent'
|
|
32
32
|
/** 服务端版本:随 package.json 同步(meta 测试守着)。客户端据此挑「最新的那个实例」。 */
|
|
33
|
-
export const SERVER_VERSION = '0.8.
|
|
33
|
+
export const SERVER_VERSION = '0.8.43'
|
|
34
34
|
export const inject = ['tools', 'agents', 'webServer']
|
|
35
35
|
|
|
36
36
|
/** 仅供测试:读写状态文件(生产代码不要用)。 */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-session-superagent",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.43",
|
|
4
4
|
"description": "Session-level superagent for DeepSeek Harness: watch a GitHub repository and wake a session when something needs doing. Credentials never reach the model.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|