dsh-local-link 1.2.2 → 1.2.4
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 +45 -0
- package/README.md +8 -6
- package/README.ru.md +8 -6
- package/README.zh.md +14 -6
- package/cordis.patch.yml +2 -2
- package/docs/ARCHITECTURE.md +4 -4
- package/docs/MOBILE_VIEW.md +1 -1
- package/docs/images/local-access-devices.jpg +0 -0
- package/docs/images/local-access-devices.zh.jpg +0 -0
- package/docs/images/local-access-diagnostics.jpg +0 -0
- package/docs/images/local-access-diagnostics.zh.jpg +0 -0
- package/docs/images/local-access-qr.jpg +0 -0
- package/docs/images/local-access-qr.zh.jpg +0 -0
- package/docs/images/mobile-chat.jpg +0 -0
- package/docs/images/mobile-chat.zh.jpg +0 -0
- package/docs/images/mobile-navigation.jpg +0 -0
- package/docs/images/mobile-navigation.zh.jpg +0 -0
- package/docs/images/mobile-session-info.jpg +0 -0
- package/docs/images/mobile-session-info.zh.jpg +0 -0
- package/docs/images/mobile-subagents.jpg +0 -0
- package/docs/images/mobile-subagents.zh.jpg +0 -0
- package/lib/client.js +125 -34
- package/lib/client.js.map +1 -1
- package/lib/index.mjs +3 -0
- package/package.json +43 -44
- package/docs/images/mobile-chat.png +0 -0
- package/docs/images/mobile-navigation.png +0 -0
- package/docs/images/mobile-session-info.png +0 -0
- package/docs/images/mobile-subagents.png +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,51 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented here.
|
|
4
4
|
|
|
5
|
+
## 1.2.4 — 2026-10-19
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Updated the exact development contracts and Host compatibility metadata to DeepSeek Harness `0.2.1-rc.2`, verified as npm `latest` on 2026-10-19. Aligned Cordis/Schemastery and regenerated the dependency graph without stale auto-installed peers; no new runtime dependency was added.
|
|
10
|
+
- Replaced all 14 README images with approved, real-browser dark-theme captures on `0.2.1-rc.2`: separate English and Simplified Chinese demo profiles, `430 × 932` mobile frames and `1440 × 1000` desktop frames. Russian documentation shares the English captures. Images use JPEG without re-encoding or relabelling PNG data.
|
|
11
|
+
- Adjusted the connection trust-boundary test for WebServer's optional TCP port (the Host also supports non-TCP listeners); the test still requires a real TCP listener and does not skip authentication checks.
|
|
12
|
+
- Retained the previously checked `0.2.1-alpha.2` and historical RC declarations; the older RC matrix was not rerun in full.
|
|
13
|
+
- Preserved invocation trusted hosts across the `webRuntime` to `webStartup` transition without requiring the removed service. The gateway's existing `webServer` dependency orders startup before the connection trust expression is evaluated.
|
|
14
|
+
- Adapted the legacy subagent address type to the new external catalog-entry mode; current Harness continues to own native subagent navigation.
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- Restored the QR popover's Paired devices shortcut on current Hosts through the localized native account-menu Settings action, retaining a scoped direct-trigger fallback for older Hosts. The bridge no longer selects an unrelated session-statistics dialog trigger, does not toggle an already open menu, and stops waiting after a bounded user-initiated attempt.
|
|
19
|
+
- Restored mobile autofocus suppression after Session navigation using the rendered Session scope rather than the removed catalog `current` field. Explicit taps on the composer still focus the editor normally.
|
|
20
|
+
- Read the desktop QR invitation's Session identity from the same public Session scope, without reaching into the Workspace service's private selection store.
|
|
21
|
+
- Kept the new native `activity` and `usage` composer pills inside mobile Current session details, alongside the older `stats` contribution; desktop statistics are unchanged.
|
|
22
|
+
|
|
23
|
+
### Validation
|
|
24
|
+
|
|
25
|
+
- On `0.2.1-rc.2`: typecheck, 117 tests across 18 files, build and package dry-run passed with no peer-dependency issues. Live LAN pairing returned `204`, browser handoff `303` / `303`, authenticated root `200`, and `/api/remote.mux` upgraded with `101`. Revocation immediately closed the established WebSocket and subsequent access returned `401`. All three directory-picker RPCs remained blocked with `403`. Headless Chromium covered an existing chat at widths 320, 360, 390, 430 and 768 px: no horizontal overflow, visible session-info action, single-row composer controls, no Host-app opener, and no unsolicited composer focus. The session-details drawer fit at 320 px. Physical-phone, Russian voice and the full historical RC matrix were not rerun.
|
|
26
|
+
- Typecheck, 106 tests across 16 files, build and package dry-run passed against `0.2.1-alpha.2`; startup passed without a version exemption. Browser checks covered LAN pairing/handoff, existing-chat loading, navigation and session details at widths 320, 360, 390, 430 and 768 px. Browser acceptance is separate from physical-phone acceptance. That earlier alpha validation was local and was not published as a separate npm release.
|
|
27
|
+
- The `0.2.1-rc.2` browser pass also verified explicit composer taps, hidden duplicate mobile dock metrics, and a desktop-generated QR opening the same selected chat in a fresh mobile browser context. Browser JavaScript errors: none. Test devices were revoked after the checks; screenshots from the private working profile are local evidence, not README assets.
|
|
28
|
+
- The Settings shortcut passed live browser checks in both EN and ZH with expanded and collapsed sidebars. Seven regression tests cover current menu navigation, historical direct triggers, already-open surfaces, absent launchers, bounded waits, and rejection of unrelated statistics triggers. Screenshot QA covered both locales at `320 × 568`, `360 × 800`, `390 × 844`, `430 × 932` and `768 × 1024`.
|
|
29
|
+
|
|
30
|
+
## 1.2.3 — 2026-10-02
|
|
31
|
+
|
|
32
|
+
### Changed
|
|
33
|
+
|
|
34
|
+
- Built against the exact DeepSeek Harness `0.2.0-rc.2` contracts and added that release to both `engines.dsh` and the Host peer range, retaining the previously declared RC releases.
|
|
35
|
+
- Refreshed all seven README screenshots from the actual `0.2.0-rc.2` browser UI in dark mode, with separate English and Simplified Chinese demo profiles. Mobile frames retain `430 × 932`; subagents show the native header catalog, not the legacy bottom sheet. Russian documentation reuses the English frames.
|
|
36
|
+
|
|
37
|
+
### Fixed
|
|
38
|
+
|
|
39
|
+
- Kept the new native `directoryPicker.pick`, `directoryPicker.list`, and `directoryPicker.createDirectory` RPCs inaccessible through the LAN gateway, preserving the existing trusted-LAN scope after the Host API rename.
|
|
40
|
+
- Displayed recorded permission identifiers in the mobile Current session drawer when the session summary has no UI option catalog. Empty or null agent-preset identifiers now show the explicit not-recorded label. Model updates no longer discard the open drawer's session identity.
|
|
41
|
+
|
|
42
|
+
### Validated
|
|
43
|
+
|
|
44
|
+
- Type checking, all 105 automated tests, production build, and npm package dry-run passed against `0.2.0-rc.2`.
|
|
45
|
+
- On the running `0.2.0-rc.2` Host: LAN pairing returned `204`, the native browser handoff returned `303` / `303`, the authenticated root returned `200`, and `/api/remote.mux` upgraded with `101`. Revocation closed the established WebSocket and subsequent device access returned `401`.
|
|
46
|
+
- All three new native directory RPCs returned `403` through the authenticated LAN gateway. Historical RC releases were not all rerun for this patch; physical-phone acceptance remains separate from browser emulation.
|
|
47
|
+
- In-browser checks at 320, 360, 390, 430, and 834 CSS pixels kept the session-info action visible, composer actions on one row, and the Host-app opener hidden without document overflow. The 320-pixel details drawer fit the viewport; a 1280-pixel desktop check retained the Host-app opener.
|
|
48
|
+
- The user confirmed that the updated plugin works on their physical phone. The screenshot pass also checked the Simplified Chinese header, composer, and session drawer at 320 CSS pixels.
|
|
49
|
+
|
|
5
50
|
## 1.2.2 — 2026-09-27
|
|
6
51
|
|
|
7
52
|
### Changed
|
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ Use the same [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)
|
|
|
13
13
|
|
|
14
14
|
Open `Local access`, scan the QR code, and the paired browser arrives at the desktop's currently selected Harness session with the same live conversation, permissions, workspaces, and plugin surfaces.
|
|
15
15
|
|
|
16
|
-
The `1.2.x` line supports DeepSeek Harness `0.1.5-rc.2` and `0.1
|
|
16
|
+
The `1.2.x` line supports DeepSeek Harness `0.1.5-rc.2`, `0.1.7-rc.2`, `0.2.0-rc.2`, and `0.2.1-rc.2` and keeps the stock Web client usable on narrow touch screens. It reorganizes the existing Harness interface into responsive drawers, compact session controls, and touch-friendly actions while keeping the same client, session, plugin slots, permissions, and live agent stream.
|
|
17
17
|
|
|
18
18
|
> **Security boundary:** the gateway uses plain HTTP and is intended only for a trusted private network. Do not expose its port to the internet or use it on public Wi-Fi.
|
|
19
19
|
|
|
@@ -73,9 +73,11 @@ The profile points at the checkout, so rebuild after changing client code and re
|
|
|
73
73
|
|
|
74
74
|
## Compatibility
|
|
75
75
|
|
|
76
|
+
Local Link `1.2.4` is built and checked against DeepSeek Harness `0.2.1-rc.2`. It supports `webStartup` trusted-host configuration with the older `webRuntime` fallback. QR Session identity and mobile autofocus use public Session scopes; the Paired devices shortcut follows the current native Settings launcher.
|
|
77
|
+
|
|
76
78
|
The installable DeepSeek Harness range is declared in `package.json` through `engines.dsh`. Compatibility is checked against exact releases—not inferred from a successful installation or a moving dist-tag.
|
|
77
79
|
|
|
78
|
-
|
|
80
|
+
Acceptance on `0.2.1-rc.2` covers LAN pairing, selected-chat QR handoff, authenticated HTTP/WebSocket access, immediate socket closure on revoke, loopback-only directory RPC restrictions, and mobile layouts at 320–768 CSS pixels in EN and ZH. Earlier Host declarations retain the historical acceptance recorded in the [changelog](CHANGELOG.md); the full old-version matrix and physical-phone checks were not rerun. Mobile microphone capture over plain LAN HTTP remains unsupported; this release adds neither HTTPS nor voice input.
|
|
79
81
|
|
|
80
82
|
## Use
|
|
81
83
|
|
|
@@ -98,7 +100,7 @@ The stock Harness Web interface is difficult to operate on a phone: persistent d
|
|
|
98
100
|
| --- | --- |
|
|
99
101
|
| Desktop navigation competes with the conversation | Workspace and session navigation opens as a dismissible left drawer |
|
|
100
102
|
| Session metadata crowds the header | Context, model, access, preset, activity, and export move into a compact right drawer |
|
|
101
|
-
| Subagent details are difficult to scan or reach | On 0.1.5, a composer chip opens the catalog in a bottom sheet; on 0.1.7, Harness owns its header catalog and navigation |
|
|
103
|
+
| Subagent details are difficult to scan or reach | On 0.1.5, a composer chip opens the catalog in a bottom sheet; on 0.1.7 and 0.2, Harness owns its header catalog and navigation |
|
|
102
104
|
| Hover-oriented session and workspace actions | Overflow actions remain visible and touch-accessible |
|
|
103
105
|
| Session changes can summon the software keyboard | Automatic composer focus is suppressed while intentional input focus still works |
|
|
104
106
|
| Desktop spacing ignores phone safe areas | Header, composer, tabs, media, overlays, and scrolling adapt to narrow viewports |
|
|
@@ -109,7 +111,7 @@ The implementation changes presentation, not Harness ownership or behavior:
|
|
|
109
111
|
- dynamic Chat, Trajectory, composer, overlay, and third-party plugin slots remain intact;
|
|
110
112
|
- Current session opens from the header with context breakdown, model, workspace access, preset, activity, and session-log download;
|
|
111
113
|
- on mobile, the duplicate stock context meter below the chat and the Host-app opener (Explorer/VS Code/Rider) are hidden; both remain available on desktop;
|
|
112
|
-
- on 0.1.5, child-agent status opens the nested catalog in a touch-friendly bottom sheet; on 0.1.7, the native Harness subagent header action owns that navigation;
|
|
114
|
+
- on 0.1.5, child-agent status opens the nested catalog in a touch-friendly bottom sheet; on 0.1.7 and 0.2, the native Harness subagent header action owns that navigation;
|
|
113
115
|
- the Harness theme service powers a compact sun/moon action;
|
|
114
116
|
- desktop-only Settings and the nested Local access action are omitted from mobile navigation, while the appearance action remains available;
|
|
115
117
|
- session and active-workspace menus stay immediately available on touch screens;
|
|
@@ -117,11 +119,11 @@ The implementation changes presentation, not Harness ownership or behavior:
|
|
|
117
119
|
- plugin-owned modal drawers contain keyboard focus and return it to the invoking control when closed;
|
|
118
120
|
- existing workspaces remain available, while the misleading remote `Add workspace` directory picker is omitted.
|
|
119
121
|
|
|
120
|
-
These dark-theme previews were captured
|
|
122
|
+
These dark-theme previews were captured from real Harness `0.2.1-rc.2` browser sessions: mobile frames are `430 × 932`, desktop frames are `1440 × 1000`. The isolated profiles contain fictional workspaces, conversations, models, devices, and usage only. The Chinese README has its own Simplified Chinese captures; Russian documentation shares the English images. Subagents use the native Harness header catalog.
|
|
121
123
|
|
|
122
124
|
| Navigation | Current session | Subagents | Conversation |
|
|
123
125
|
| :---: | :---: | :---: | :---: |
|
|
124
|
-
| <img src="docs/images/mobile-navigation.
|
|
126
|
+
| <img src="docs/images/mobile-navigation.jpg" width="210" alt="Dark Mobile View navigation drawer with a synthetic workspace and session"> | <img src="docs/images/mobile-session-info.jpg" width="210" alt="Dark Mobile View Current session drawer with synthetic model, workspace access, statistics, and session log data"> | <img src="docs/images/mobile-subagents.jpg" width="210" alt="Native dark Harness header catalog with two synthetic child agents"> | <img src="docs/images/mobile-chat.jpg" width="210" alt="Dark Mobile View Harness conversation with native message actions and one-line composer controls"> |
|
|
125
127
|
|
|
126
128
|
### Permissions
|
|
127
129
|
|
package/README.ru.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
Откройте `Local access`, отсканируйте QR-код — и подключённый браузер попадёт в текущую сессию Harness, выбранную на компьютере. Диалог, права доступа, рабочие пространства и интерфейсы плагинов останутся теми же.
|
|
15
15
|
|
|
16
|
-
Ветка `1.2.x` поддерживает DeepSeek Harness `0.1.5-rc.2` и `0.1
|
|
16
|
+
Ветка `1.2.x` поддерживает DeepSeek Harness `0.1.5-rc.2`, `0.1.7-rc.2`, `0.2.0-rc.2` и `0.2.1-rc.2` и делает стандартный веб-клиент удобным на узких сенсорных экранах. Существующий интерфейс Harness преобразуется в адаптивные панели, компактные элементы управления сессией и удобные для касаний действия, но сам клиент, сессия, слоты плагинов, разрешения и поток событий агента остаются прежними.
|
|
17
17
|
|
|
18
18
|
> **Граница безопасности:** шлюз работает по незашифрованному HTTP и предназначен только для доверенной частной сети. Не выставляйте его порт в интернет и не используйте плагин в публичных сетях Wi-Fi.
|
|
19
19
|
|
|
@@ -73,9 +73,11 @@ dsh web
|
|
|
73
73
|
|
|
74
74
|
## Совместимость
|
|
75
75
|
|
|
76
|
+
Local Link `1.2.4` собирается и проверяется на DeepSeek Harness `0.2.1-rc.2`. Поддержаны доверенные адреса из `webStartup` с резервным путём через `webRuntime` для старых Host. Выбор чата для QR и защита от мобильного автофокуса используют публичные Session-scoped слоты; кнопка парных устройств открывает штатные настройки через актуальный launcher.
|
|
77
|
+
|
|
76
78
|
Диапазон устанавливаемых версий DeepSeek Harness объявлен в `package.json` через `engines.dsh`. Совместимость проверяется на конкретных релизах и не выводится только из успешной установки или плавающего dist-tag.
|
|
77
79
|
|
|
78
|
-
|
|
80
|
+
На `0.2.1-rc.2` проверены LAN-сопряжение, переход по QR в выбранный чат, авторизованные HTTP/WebSocket, немедленное закрытие соединения после отзыва устройства, запрет RPC выбора папок через LAN и мобильная вёрстка на ширинах 320–768 CSS-пикселей в EN и ZH. Предыдущие Host оставлены в диапазоне на основании исторических проверок из [changelog](CHANGELOG.md); вся старая матрица и физический телефон заново не проверялись. Запись с микрофона телефона через обычный LAN HTTP по-прежнему не поддерживается: релиз не добавляет HTTPS или голосовой ввод.
|
|
79
81
|
|
|
80
82
|
## Использование
|
|
81
83
|
|
|
@@ -98,7 +100,7 @@ Local Link `1.2.2` собирается на контрактах Harness `0.1.7
|
|
|
98
100
|
| --- | --- |
|
|
99
101
|
| Десктопная навигация конкурирует с диалогом | Навигация по рабочим пространствам и сессиям открывается в закрываемой левой панели |
|
|
100
102
|
| Метаданные сессии перегружают заголовок | Контекст, модель, доступ, пресет, активность и экспорт вынесены в компактную правую панель |
|
|
101
|
-
| Сведения о субагентах трудно просматривать и открывать | В 0.1.5 чип у поля ввода открывает каталог снизу; в 0.1.7 каталог и навигация принадлежат Harness и находятся в заголовке |
|
|
103
|
+
| Сведения о субагентах трудно просматривать и открывать | В 0.1.5 чип у поля ввода открывает каталог снизу; в 0.1.7 и 0.2 каталог и навигация принадлежат Harness и находятся в заголовке |
|
|
102
104
|
| Действия с сессиями и рабочими пространствами рассчитаны на наведение | Меню действий остаются видимыми и доступными для касания |
|
|
103
105
|
| При смене сессии может открыться экранная клавиатура | Автоматический фокус поля ввода подавляется, но намеренное касание по-прежнему устанавливает фокус |
|
|
104
106
|
| Десктопные отступы не учитывают безопасные области телефона | Заголовок, поле ввода, вкладки, медиа, оверлеи и прокрутка адаптируются к узкому экрану |
|
|
@@ -109,7 +111,7 @@ Local Link `1.2.2` собирается на контрактах Harness `0.1.7
|
|
|
109
111
|
- динамические слоты Chat, Trajectory, поля ввода, оверлеев и сторонних плагинов сохраняются;
|
|
110
112
|
- `Current session` открывается из заголовка и показывает структуру контекста, модель, доступ к рабочему пространству, пресет, активность и скачивание журнала сессии;
|
|
111
113
|
- на телефоне дублирующий индикатор контекста под чатом и кнопку открытия на компьютере (Проводник/VS Code/Rider) скрыли; на десктопе оба элемента остались;
|
|
112
|
-
- в 0.1.5 статус дочерних агентов открывает вложенный каталог в нижней панели; в 0.1.7 для этого используется штатное действие Harness в заголовке;
|
|
114
|
+
- в 0.1.5 статус дочерних агентов открывает вложенный каталог в нижней панели; в 0.1.7 и 0.2 для этого используется штатное действие Harness в заголовке;
|
|
113
115
|
- сервис тем Harness управляет компактной кнопкой «солнце/луна»;
|
|
114
116
|
- десктопные Settings и вложенное действие Local access скрыты в мобильной навигации, но переключение темы остаётся доступным;
|
|
115
117
|
- меню сессии и активного рабочего пространства сразу доступны на сенсорных экранах;
|
|
@@ -117,11 +119,11 @@ Local Link `1.2.2` собирается на контрактах Harness `0.1.7
|
|
|
117
119
|
- модальные панели плагина удерживают клавиатурный фокус и после закрытия возвращают его вызвавшему элементу;
|
|
118
120
|
- существующие рабочие пространства остаются доступны, а вводящая в заблуждение удалённая кнопка `Add workspace`, открывающая системный выбор каталога, скрыта.
|
|
119
121
|
|
|
120
|
-
|
|
122
|
+
Скриншоты в тёмной теме сняты из настоящих браузерных сессий Harness `0.2.1-rc.2`: мобильные кадры — `430 × 932`, desktop — `1440 × 1000`. В отдельных демонстрационных профилях используются только вымышленные рабочие пространства, диалоги, модели, устройства и статистика. Русский README использует английские кадры; у китайского README отдельные скриншоты на упрощённом китайском. Субагенты показаны в штатном каталоге Harness в заголовке.
|
|
121
123
|
|
|
122
124
|
| Навигация | Текущая сессия | Субагенты | Диалог |
|
|
123
125
|
| :---: | :---: | :---: | :---: |
|
|
124
|
-
| <img src="docs/images/mobile-navigation.
|
|
126
|
+
| <img src="docs/images/mobile-navigation.jpg" width="210" alt="Навигационная панель Mobile View в тёмной теме с вымышленными рабочим пространством и сессией"> | <img src="docs/images/mobile-session-info.jpg" width="210" alt="Панель Current session в тёмной теме с вымышленными моделью, доступом к рабочему пространству, статистикой и журналом сессии"> | <img src="docs/images/mobile-subagents.jpg" width="210" alt="Штатный каталог субагентов Harness в заголовке с двумя вымышленными дочерними агентами"> | <img src="docs/images/mobile-chat.jpg" width="210" alt="Диалог Harness в Mobile View с исходными действиями сообщения и элементами поля ввода в одну строку"> |
|
|
125
127
|
|
|
126
128
|
### Разрешения
|
|
127
129
|
|
package/README.zh.md
CHANGED
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
|
|
14
14
|
打开 `Local access` 并扫描二维码后,已配对的浏览器会进入桌面端当前选中的 Harness 会话,并继续使用相同的实时对话、权限、工作区和插件界面。
|
|
15
15
|
|
|
16
|
-
`1.2.x` 系列支持 DeepSeek Harness `0.1.5-rc.2` 和 `0.1
|
|
16
|
+
`1.2.x` 系列支持 DeepSeek Harness `0.1.5-rc.2`、`0.1.7-rc.2`、`0.2.0-rc.2` 和 `0.2.1-rc.2`,并让原生 Web 客户端可以在窄屏触控设备上使用。移动视图只调整界面布局,不接管 Harness 的会话、权限或业务逻辑。
|
|
17
17
|
|
|
18
18
|
> **安全边界:** 网关使用明文 HTTP,仅适用于可信私有网络。不要将端口暴露到互联网,也不要在公共 Wi-Fi 上使用。
|
|
19
19
|
|
|
20
20
|
<p align="center">
|
|
21
|
-
<img src="docs/images/local-access-qr.jpg" width="960" alt="DeepSeek Harness 中的 dsh-local-link 一次性二维码配对界面">
|
|
21
|
+
<img src="docs/images/local-access-qr.zh.jpg" width="960" alt="DeepSeek Harness 中的 dsh-local-link 一次性二维码配对界面">
|
|
22
22
|
</p>
|
|
23
23
|
|
|
24
24
|
<p align="center"><sub>通过可信局域网直接打开同一个 Harness 会话。</sub></p>
|
|
@@ -71,9 +71,11 @@ profile 会指向当前 checkout。修改客户端代码后需要重新构建;
|
|
|
71
71
|
|
|
72
72
|
## 兼容性
|
|
73
73
|
|
|
74
|
+
Local Link `1.2.4` 使用 DeepSeek Harness `0.2.1-rc.2` 的契约构建并完成验证。支持 `webStartup` 可信地址配置,同时保留旧版 `webRuntime` 回退。二维码中的会话选择和移动端自动聚焦保护使用公开的会话作用域;已配对设备快捷入口通过当前原生 Settings 启动器打开设置。
|
|
75
|
+
|
|
74
76
|
可安装的 DeepSeek Harness 版本范围通过 `package.json` 中的 `engines.dsh` 声明。兼容性按精确发布版本验证,不会因为安装成功或可变的 dist-tag 就推断为兼容。
|
|
75
77
|
|
|
76
|
-
|
|
78
|
+
在 `0.2.1-rc.2` 上已验证局域网配对、二维码打开所选会话、认证 HTTP/WebSocket、撤销设备后立即关闭连接、目录选择 RPC 的局域网限制,以及 EN/ZH 在 320–768 CSS px 的移动布局。较早 Host 的声明依据[更新日志](CHANGELOG.md)中的历史验收;本次未重新运行全部旧版本矩阵或实体手机验收。普通局域网 HTTP 仍不支持手机麦克风录音;本次发布不提供 HTTPS 或语音输入。
|
|
77
79
|
|
|
78
80
|
## 使用方法
|
|
79
81
|
|
|
@@ -100,11 +102,11 @@ Local Link `1.2.2` 使用 Harness `0.1.7-rc.2` 的开发契约构建,并在该
|
|
|
100
102
|
- 手机端隐藏聊天底部重复的上下文用量指示器和在电脑上打开文件的按钮(资源管理器/VS Code/Rider);桌面端仍保留,手机端可在 `Current session` 查看上下文详情;
|
|
101
103
|
- 顶栏、消息操作、输入工具、安全区域和虚拟键盘行为适配窄屏。
|
|
102
104
|
|
|
103
|
-
以下深色主题截图来自 Harness `0.1
|
|
105
|
+
以下深色主题截图来自 Harness `0.2.1-rc.2` 的真实浏览器会话:移动截图为 `430 × 932`,桌面截图为 `1440 × 1000`。独立演示配置只包含虚构的工作区、对话、模型、设备和用量,不包含真实项目数据。中文 README 使用独立的简体中文截图,俄文文档复用英文截图;子智能体通过 Harness 原生标题栏目录展示。
|
|
104
106
|
|
|
105
107
|
| 导航 | 当前会话 | 子智能体 | 对话 |
|
|
106
108
|
| :---: | :---: | :---: | :---: |
|
|
107
|
-
| <img src="docs/images/mobile-navigation.
|
|
109
|
+
| <img src="docs/images/mobile-navigation.zh.jpg" width="210" alt="包含虚构工作区与会话的深色移动导航抽屉"> | <img src="docs/images/mobile-session-info.zh.jpg" width="210" alt="包含虚构模型、工作区权限、统计和会话日志数据的深色当前会话抽屉"> | <img src="docs/images/mobile-subagents.zh.jpg" width="210" alt="包含两个虚构子智能体的原生深色标题栏目录"> | <img src="docs/images/mobile-chat.zh.jpg" width="210" alt="包含原生消息操作和单行输入工具的深色 Harness 移动对话"> |
|
|
108
110
|
|
|
109
111
|
### 权限
|
|
110
112
|
|
|
@@ -123,7 +125,13 @@ Local Link `1.2.2` 使用 Harness `0.1.7-rc.2` 的开发契约构建,并在该
|
|
|
123
125
|
浏览器无法可靠区分笔记本与台式机,因此两者统一显示为 `Computer`。
|
|
124
126
|
|
|
125
127
|
<p align="center">
|
|
126
|
-
<img src="docs/images/local-access-devices.jpg" width="960" alt="DeepSeek Harness Local access 已配对设备列表">
|
|
128
|
+
<img src="docs/images/local-access-devices.zh.jpg" width="960" alt="DeepSeek Harness Local access 已配对设备列表">
|
|
129
|
+
</p>
|
|
130
|
+
|
|
131
|
+
展开同一设置页的 `诊断` 面板,可查看本地网关事件,并复制经过隐私过滤的报告。报告不包含配对令牌、Cookie、地址、设备名称、请求路径或对话内容。
|
|
132
|
+
|
|
133
|
+
<p align="center">
|
|
134
|
+
<img src="docs/images/local-access-diagnostics.zh.jpg" width="960" alt="DeepSeek Harness 本地访问设置中展开的诊断面板">
|
|
127
135
|
</p>
|
|
128
136
|
|
|
129
137
|
## 工作原理
|
package/cordis.patch.yml
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
# LAN authorities through its public trustedHosts contract. Harness still keeps
|
|
4
4
|
# settings, credentials, native Host actions, and preset authoring loopback-only.
|
|
5
5
|
- id: connection
|
|
6
|
-
inject: [
|
|
6
|
+
inject: [localLinkGateway]
|
|
7
7
|
config:
|
|
8
|
-
trustedHosts: !!js "[...ctx.
|
|
8
|
+
trustedHosts: !!js "[...(ctx.root.webStartup?.trustedHosts ?? ctx.root.webRuntime?.trustedHosts ?? []), ...ctx.localLinkGateway.trustedHosts]"
|
|
9
9
|
|
|
10
10
|
- insert:
|
|
11
11
|
- id: dsh-local-link
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -66,15 +66,15 @@ The loopback administration route exposes list, clear, and a narrow allowlisted
|
|
|
66
66
|
|
|
67
67
|
`src/client.tsx` registers two normal Harness contributions: a compact desktop `sidebar.footer.action` that shows a QR code and copyable one-time link, and a desktop-only `settings.section` that manages paired devices and the local diagnostic report. It does not replace the root layout. The desktop surfaces use plugin-owned classes and semantic selectors; version-sensitive stock-DOM hooks are isolated in `src/mobile-layout.tsx` and documented below.
|
|
68
68
|
|
|
69
|
-
The `0.
|
|
69
|
+
The `0.2.0-rc.2` browser graph is a normal Cordis `Context`. Session state comes from `@deepseek-ai/dsh-api-session-controller/client`; React slot hooks are supplied by `@deepseek-ai/dsh-client-ui-session/client`, and slot ownership/rendering comes from `@deepseek-ai/dsh-client-ui-renderer/client`. Agent-preset display reads `SessionSummary.projectionValues.agentPreset`, while subagent types come from `@deepseek-ai/dsh-subagent/client`. The removed `@deepseek-ai/dsh-client-runtime` aggregate is neither injected nor imported. Permission display accepts both the UI selection with an optional option catalog and a persisted preset; when no display catalog exists, it shows the recorded identifier rather than claiming the permission is absent. Empty agent-preset values display the explicit not-recorded label.
|
|
70
70
|
|
|
71
71
|
The Harness `sidebar.footer.action` contract is a list, but the supported Web client renders that list as a horizontal flex row while the stock Cordis action reserves `width: 100%` with `flex: none`. Without a compatibility rule, Cordis reduces later actions to zero width. Local Link orders its entry first and changes only the footer container that semantically contains `.dsh-local-link-footer` into a vertical stack. The same scoped rule normalizes the list gap and removes the following action's private top margin so Local access, Cordis, and Settings keep one visual rhythm. The selector is anchored on the plugin-owned class and accounts for the slot renderer's `display: contents` wrapper; it never names a generated Harness class.
|
|
72
72
|
|
|
73
73
|
The connection card is fixed to the viewport and positioned from the rendered Local access action. On desktop it opens just beyond the sidebar edge and remains vertically centered. Its final QR-state height is reserved before the pairing request resolves, so loading the QR cannot move the card after its first visible frame. On narrow or short viewports it is clamped to a 12 px viewport gutter and scrolls internally instead of moving footer actions or covering them.
|
|
74
74
|
|
|
75
|
-
Harness keeps settings open state and section selection private inside its shell; the public `openSection` callback is not a general navigation service. The popover's `Paired devices` shortcut therefore uses one bounded compatibility bridge
|
|
75
|
+
Harness keeps settings open state and section selection private inside its shell; the public `openSection` callback is not a general navigation service. The popover's `Paired devices` shortcut therefore uses one bounded, user-initiated compatibility bridge. It first selects an already-open Settings section. Otherwise, older Hosts use the explicitly labelled Settings dialog trigger scoped to the sidebar; current Hosts use the `settings.launcher` account menu and its localized Settings item, followed by this plugin's own localized section label. The Host locale service supplies the Settings label, including any installed language pack. It never clicks an unscoped dialog trigger, so session-statistics popovers cannot be selected accidentally. Waiting stops after at most two seconds or 120 frames. The bridge uses no generated class names, mutates no DOM, and can be removed when Harness exposes a general settings-navigation service.
|
|
76
76
|
|
|
77
|
-
The Host plugin exposes the running gateway authorities as a Cordis service. `cordis.patch.yml` merges that service with `webRuntime.trustedHosts` before the stock connection module starts. Trust is therefore declared once on the Host; client code neither mutates `connection.isLoopback` nor carries an authentication marker.
|
|
77
|
+
The Host plugin exposes the running gateway authorities as a Cordis service. `cordis.patch.yml` merges that service with `webStartup.trustedHosts` on newer Harness versions, falling back to `webRuntime.trustedHosts` on older versions, before the stock connection module starts. The gateway depends on `webServer`, so invocation startup is available before this expression is evaluated; connection does not require the removed `webRuntime` service. Trust is therefore declared once on the Host; client code neither mutates `connection.isLoopback` nor carries an authentication marker.
|
|
78
78
|
|
|
79
79
|
Plain HTTP on a private IP is not a browser secure context, while the stock Harness RPC client calls `crypto.randomUUID()` during connection startup. The rewritten index therefore installs a small RFC 4122 v4 fallback backed by `crypto.getRandomValues()` before the stock boot manifest executes. This avoids certificate installation while keeping the LAN-only setup functional.
|
|
80
80
|
|
|
@@ -175,7 +175,7 @@ No service discovery, certificate generator, tunnel client, native application,
|
|
|
175
175
|
|
|
176
176
|
## Compatibility strategy
|
|
177
177
|
|
|
178
|
-
|
|
178
|
+
Local Link `1.2.4` develops against the exact DeepSeek Harness `0.2.1-rc.2` contracts; published Local Link `1.2.3` used `0.2.0-rc.2`. The installable Host range is declared by `engines.dsh`; most integration uses declared package contracts, but several adapters are intentionally version-sensitive. The 0.1.7+ icon exports are weight-named rather than size-named; the client resolves either form at runtime. The 0.1.7+ Session list no longer owns current selection or the older subagent catalog methods. Current-session details, QR invitation identity and mobile autofocus suppression therefore use public Session-scoped slots, not a catalog `current` field or the Workspace service's private selection store. The invisible invitation observer mounts on desktop as well as mobile; scope cleanup cannot erase a newer scope's identity. The plugin's legacy subagent sheet is registered only when its required catalog actions are present. On these releases, `@deepseek-ai/dsh-client-ui-subagent` owns the native header catalog and navigation. Mobile Current session details replace both the older `stats` composer contribution and the new `activity` / `usage` pills; desktop contributions are untouched. The 0.2 directory-picker RPCs (`directoryPicker.pick`, `directoryPicker.list`, and `directoryPicker.createDirectory`) join the legacy Host methods in the gateway's loopback-only filter; ordinary session and workspace methods remain available.
|
|
179
179
|
|
|
180
180
|
| Adapter | Why it exists | Failure behavior | Removal condition |
|
|
181
181
|
| --- | --- | --- | --- |
|
package/docs/MOBILE_VIEW.md
CHANGED
|
@@ -15,7 +15,7 @@ Presentation remains independent of authorization: changing the viewport never g
|
|
|
15
15
|
- **Dynamic views:** Chat, Trajectory, composer extensions, overlays, and third-party conversation tabs continue to resolve from Harness plugin slots.
|
|
16
16
|
- **Current session:** a right drawer shows context usage and its System prompt / Tools / Messages breakdown, model, workspace access, agent preset, activity statistics, and session-log download.
|
|
17
17
|
- **Mobile-only simplification:** the duplicate stock context meter below the conversation and the Host-app opener (Explorer/VS Code/Rider) are hidden on mobile, but remain visible on desktop.
|
|
18
|
-
- **Subagents:** on 0.1.5, a compact status chip opens the nested catalog as a touch-friendly bottom sheet. On 0.1.7, Harness's native header action owns the catalog and navigation.
|
|
18
|
+
- **Subagents:** on 0.1.5, a compact status chip opens the nested catalog as a touch-friendly bottom sheet. On 0.1.7 and 0.2, Harness's native header action owns the catalog and navigation.
|
|
19
19
|
- **Appearance:** a sun/moon action uses the Harness theme service. Remote theme selection remains page-scoped, so reload returns to the host preference and resolves `system` against the phone or tablet.
|
|
20
20
|
- **Touch behavior:** native session and active-workspace overflow actions remain visible without a long press, and switching sessions does not automatically focus the composer or open the software keyboard.
|
|
21
21
|
- **Keyboard accessibility:** plugin-owned modal drawers receive and contain focus, close with Escape, and restore focus to their invoking control.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/lib/client.js
CHANGED
|
@@ -282,7 +282,7 @@ window.__ModuleLoader__.load({
|
|
|
282
282
|
const address = {
|
|
283
283
|
parentSessionId,
|
|
284
284
|
childSessionId: entry.id,
|
|
285
|
-
mode: entry.mode
|
|
285
|
+
mode: entry.mode === "external" ? "unknown" : entry.mode
|
|
286
286
|
};
|
|
287
287
|
return /* @__PURE__ */ react.default.createElement(react.default.Fragment, { key: entry.id }, /* @__PURE__ */ react.default.createElement("div", {
|
|
288
288
|
className: "dllm-subagent-row",
|
|
@@ -521,11 +521,12 @@ window.__ModuleLoader__.load({
|
|
|
521
521
|
}
|
|
522
522
|
reportModel(sessionId, model) {
|
|
523
523
|
if (this.snapshot.modelSessionId === sessionId && this.snapshot.model === model) return;
|
|
524
|
+
const { model: previousModel, ...snapshot } = this.snapshot;
|
|
524
525
|
this.snapshot = Object.freeze(model === void 0 ? {
|
|
525
|
-
|
|
526
|
+
...snapshot,
|
|
526
527
|
modelSessionId: sessionId
|
|
527
528
|
} : {
|
|
528
|
-
|
|
529
|
+
...snapshot,
|
|
529
530
|
modelSessionId: sessionId,
|
|
530
531
|
model
|
|
531
532
|
});
|
|
@@ -548,7 +549,7 @@ window.__ModuleLoader__.load({
|
|
|
548
549
|
}
|
|
549
550
|
};
|
|
550
551
|
function mobilePresetLabel(preset, t) {
|
|
551
|
-
if (preset
|
|
552
|
+
if (typeof preset !== "string" || preset.trim() === "") return t("mobile.sessionInfo.notRecorded");
|
|
552
553
|
switch (preset) {
|
|
553
554
|
case "standard": return t("mobile.sessionInfo.preset.standard");
|
|
554
555
|
case "code": return t("mobile.sessionInfo.preset.code");
|
|
@@ -600,14 +601,16 @@ window.__ModuleLoader__.load({
|
|
|
600
601
|
}
|
|
601
602
|
function permissionName(value) {
|
|
602
603
|
const selection = recordOf(value);
|
|
603
|
-
const currentValue =
|
|
604
|
-
if (currentValue === void 0
|
|
604
|
+
const currentValue = permissionValue(value);
|
|
605
|
+
if (currentValue === void 0) return void 0;
|
|
606
|
+
if (!Array.isArray(selection?.options)) return currentValue;
|
|
605
607
|
const name = recordOf(selection.options.find((option) => recordOf(option)?.value === currentValue))?.name;
|
|
606
608
|
return typeof name === "string" ? name : currentValue;
|
|
607
609
|
}
|
|
608
610
|
function permissionValue(value) {
|
|
609
611
|
const selection = recordOf(value);
|
|
610
|
-
|
|
612
|
+
const currentValue = selection?.currentValue ?? selection?.preset;
|
|
613
|
+
return typeof currentValue === "string" && currentValue.length > 0 ? currentValue : void 0;
|
|
611
614
|
}
|
|
612
615
|
function currentModelName(value) {
|
|
613
616
|
const directory = recordOf(value);
|
|
@@ -885,9 +888,13 @@ window.__ModuleLoader__.load({
|
|
|
885
888
|
id: "session-log-download",
|
|
886
889
|
priority: MOBILE_SESSION_LOG_PRIORITY
|
|
887
890
|
}, () => null)), "dsh-local-link: move mobile session log out of header");
|
|
888
|
-
|
|
891
|
+
for (const id of [
|
|
892
|
+
"stats",
|
|
893
|
+
"activity",
|
|
894
|
+
"usage"
|
|
895
|
+
]) ctx.effect(() => ctx.slots.inject("conversation.composer.dock", () => ctx.slots.register({
|
|
889
896
|
name: "conversation.composer.dock",
|
|
890
|
-
id
|
|
897
|
+
id,
|
|
891
898
|
priority: MOBILE_STATS_PRIORITY
|
|
892
899
|
}, () => null)), "dsh-local-link: move mobile session statistics into session info");
|
|
893
900
|
ctx.effect(() => ctx.slots.inject("conversation.session.header.utilities", () => ctx.slots.register({
|
|
@@ -944,17 +951,39 @@ window.__ModuleLoader__.load({
|
|
|
944
951
|
return this.suppress;
|
|
945
952
|
}
|
|
946
953
|
};
|
|
954
|
+
/** Follow the rendered Session scope, not the Host catalog's former `current` field. */
|
|
955
|
+
function observeMobileComposerSession(guard, sessionId, activeInput) {
|
|
956
|
+
if (guard.selectionChanged(sessionId)) activeInput()?.blur();
|
|
957
|
+
return () => {
|
|
958
|
+
guard.selectionChanged(void 0);
|
|
959
|
+
};
|
|
960
|
+
}
|
|
961
|
+
function MobileComposerSessionObserver({ sessionId, guard, activeInput }) {
|
|
962
|
+
(0, react.useLayoutEffect)(() => observeMobileComposerSession(guard, sessionId, activeInput), [
|
|
963
|
+
guard,
|
|
964
|
+
sessionId,
|
|
965
|
+
activeInput
|
|
966
|
+
]);
|
|
967
|
+
return null;
|
|
968
|
+
}
|
|
947
969
|
function installMobileComposerAutofocusGuard(ctx) {
|
|
948
|
-
const guard = new MobileComposerAutofocusGuard(
|
|
970
|
+
const guard = new MobileComposerAutofocusGuard(void 0);
|
|
949
971
|
const composerInput = (target) => {
|
|
950
972
|
if (!(target instanceof HTMLElement)) return null;
|
|
951
973
|
const input = target.closest("textarea,[contenteditable=\"true\"]");
|
|
952
974
|
if (input === null) return null;
|
|
953
975
|
return input.closest(".dllm-main") !== null || document.body.hasAttribute("data-dsh-local-link-mobile") ? input : null;
|
|
954
976
|
};
|
|
955
|
-
const
|
|
956
|
-
|
|
957
|
-
|
|
977
|
+
const activeInput = () => composerInput(document.activeElement);
|
|
978
|
+
const offSessions = ctx.slots.inject("conversation.input.dock", () => ctx.slots.register({
|
|
979
|
+
name: "conversation.input.dock",
|
|
980
|
+
id: "dsh-local-link.mobile-composer-session",
|
|
981
|
+
order: -100
|
|
982
|
+
}, (props) => /* @__PURE__ */ react.default.createElement(MobileComposerSessionObserver, {
|
|
983
|
+
...props,
|
|
984
|
+
guard,
|
|
985
|
+
activeInput
|
|
986
|
+
})));
|
|
958
987
|
const onPointerDown = (event) => {
|
|
959
988
|
const target = composerInput(event.target);
|
|
960
989
|
if (target !== null) guard.pointerDown(target, Date.now());
|
|
@@ -1142,6 +1171,78 @@ ${MOBILE_SESSION_INFO_STYLES}
|
|
|
1142
1171
|
"layout"
|
|
1143
1172
|
] });
|
|
1144
1173
|
//#endregion
|
|
1174
|
+
//#region src/session-selection.tsx
|
|
1175
|
+
/** Selection belongs to the rendered Session scope, not the Host catalog. */
|
|
1176
|
+
var CurrentSessionTracker = class {
|
|
1177
|
+
current;
|
|
1178
|
+
owner;
|
|
1179
|
+
getCurrent = () => this.current;
|
|
1180
|
+
observe(sessionId) {
|
|
1181
|
+
const owner = Symbol("session scope");
|
|
1182
|
+
this.owner = owner;
|
|
1183
|
+
this.current = sessionId;
|
|
1184
|
+
return () => {
|
|
1185
|
+
if (this.owner !== owner) return;
|
|
1186
|
+
this.owner = void 0;
|
|
1187
|
+
this.current = void 0;
|
|
1188
|
+
};
|
|
1189
|
+
}
|
|
1190
|
+
};
|
|
1191
|
+
function SessionObserver({ sessionId, tracker }) {
|
|
1192
|
+
(0, react.useLayoutEffect)(() => tracker.observe(sessionId), [tracker, sessionId]);
|
|
1193
|
+
return null;
|
|
1194
|
+
}
|
|
1195
|
+
function trackCurrentSession(ctx, tracker) {
|
|
1196
|
+
return ctx.slots.inject("conversation.input.dock", () => ctx.slots.register({
|
|
1197
|
+
name: "conversation.input.dock",
|
|
1198
|
+
id: "dsh-local-link.current-session",
|
|
1199
|
+
order: -110
|
|
1200
|
+
}, (props) => /* @__PURE__ */ react.default.createElement(SessionObserver, {
|
|
1201
|
+
...props,
|
|
1202
|
+
tracker
|
|
1203
|
+
})));
|
|
1204
|
+
}
|
|
1205
|
+
//#endregion
|
|
1206
|
+
//#region src/settings-navigation.ts
|
|
1207
|
+
function hasLabel(element, label) {
|
|
1208
|
+
return element.getAttribute("aria-label") === label || element.textContent?.trim() === label || [...element.children].some((child) => child.getAttribute("aria-hidden") !== "true" && child.textContent?.trim() === label);
|
|
1209
|
+
}
|
|
1210
|
+
/** Bounded, user-initiated bridge until Harness exposes section navigation. */
|
|
1211
|
+
function openSettingsSection(labels, environment = {
|
|
1212
|
+
document,
|
|
1213
|
+
requestFrame: (callback) => {
|
|
1214
|
+
requestAnimationFrame(callback);
|
|
1215
|
+
}
|
|
1216
|
+
}) {
|
|
1217
|
+
const doc = environment.document;
|
|
1218
|
+
const selectSection = () => {
|
|
1219
|
+
const section = [...doc.querySelectorAll("[role=\"dialog\"] nav button")].find((button) => hasLabel(button, labels.section));
|
|
1220
|
+
section?.click();
|
|
1221
|
+
return section !== void 0;
|
|
1222
|
+
};
|
|
1223
|
+
if (selectSection()) return;
|
|
1224
|
+
const legacy = [...doc.querySelectorAll("[data-slot=\"sidebar.settings\"] button[aria-haspopup=\"dialog\"], [data-slot=\"sidebar\"] button[aria-haspopup=\"dialog\"]")].find((button) => hasLabel(button, labels.settings));
|
|
1225
|
+
const launcher = legacy ?? doc.querySelector("[data-slot=\"settings.launcher\"] button[aria-haspopup=\"menu\"]");
|
|
1226
|
+
if (launcher === null) return;
|
|
1227
|
+
if (launcher.getAttribute("aria-expanded") !== "true") launcher.click();
|
|
1228
|
+
let waitingForMenu = legacy === void 0;
|
|
1229
|
+
let remainingFrames = 120;
|
|
1230
|
+
const deadline = Date.now() + 2e3;
|
|
1231
|
+
const advance = () => {
|
|
1232
|
+
if (selectSection()) return;
|
|
1233
|
+
if (remainingFrames-- <= 0 || Date.now() > deadline) return;
|
|
1234
|
+
if (waitingForMenu) {
|
|
1235
|
+
const settings = [...doc.querySelectorAll("[role=\"menu\"] [role=\"menuitem\"]")].find((button) => hasLabel(button, labels.settings));
|
|
1236
|
+
if (settings !== void 0) {
|
|
1237
|
+
waitingForMenu = false;
|
|
1238
|
+
settings.click();
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
environment.requestFrame(advance);
|
|
1242
|
+
};
|
|
1243
|
+
environment.requestFrame(advance);
|
|
1244
|
+
}
|
|
1245
|
+
//#endregion
|
|
1145
1246
|
//#region src/locales/en.json
|
|
1146
1247
|
var en_default = {
|
|
1147
1248
|
nav: "Local access",
|
|
@@ -1409,23 +1510,6 @@ ${MOBILE_SESSION_INFO_STYLES}
|
|
|
1409
1510
|
}];
|
|
1410
1511
|
});
|
|
1411
1512
|
}
|
|
1412
|
-
function openSettingsSection(label) {
|
|
1413
|
-
const trigger = document.querySelector("button[aria-haspopup=\"dialog\"][aria-expanded]");
|
|
1414
|
-
if (trigger === null) return;
|
|
1415
|
-
trigger.click();
|
|
1416
|
-
let attempts = 0;
|
|
1417
|
-
const selectSection = () => {
|
|
1418
|
-
const dialog = document.querySelector("[role=\"dialog\"]");
|
|
1419
|
-
const target = dialog === null ? void 0 : [...dialog.querySelectorAll("nav button")].find((button) => button.textContent?.trim() === label);
|
|
1420
|
-
if (target !== void 0) {
|
|
1421
|
-
target.click();
|
|
1422
|
-
return;
|
|
1423
|
-
}
|
|
1424
|
-
attempts += 1;
|
|
1425
|
-
if (attempts < 10) window.requestAnimationFrame(selectSection);
|
|
1426
|
-
};
|
|
1427
|
-
window.requestAnimationFrame(selectSection);
|
|
1428
|
-
}
|
|
1429
1513
|
async function jsonRequest(path, init) {
|
|
1430
1514
|
const response = await fetch(path, {
|
|
1431
1515
|
...init,
|
|
@@ -1464,7 +1548,7 @@ ${MOBILE_SESSION_INFO_STYLES}
|
|
|
1464
1548
|
.dsh-local-link-popover__copy--copied{background:var(--dsw-alias-state-success-tertiary,#16803a22);color:var(--dsw-alias-state-success-primary,#39a85b)}
|
|
1465
1549
|
.dsh-local-link-popover__error{color:var(--dsw-alias-state-error-primary,#c53030)!important}
|
|
1466
1550
|
`;
|
|
1467
|
-
function LocalLinkFooter({ wide, t, getCurrentSessionId }) {
|
|
1551
|
+
function LocalLinkFooter({ wide, t, getCurrentSessionId, getSettingsLabel }) {
|
|
1468
1552
|
const desktop = desktopOrigin();
|
|
1469
1553
|
const root = (0, react.useRef)(null);
|
|
1470
1554
|
const popover = (0, react.useRef)(null);
|
|
@@ -1610,7 +1694,10 @@ ${MOBILE_SESSION_INFO_STYLES}
|
|
|
1610
1694
|
variant: "ghost",
|
|
1611
1695
|
onClick: () => {
|
|
1612
1696
|
setOpen(false);
|
|
1613
|
-
openSettingsSection(
|
|
1697
|
+
openSettingsSection({
|
|
1698
|
+
section: t("nav"),
|
|
1699
|
+
settings: getSettingsLabel()
|
|
1700
|
+
});
|
|
1614
1701
|
}
|
|
1615
1702
|
}, t("connect.pairedDevices"))), /* @__PURE__ */ react.default.createElement("p", null, t("connect.description")), /* @__PURE__ */ react.default.createElement("div", {
|
|
1616
1703
|
className: "dsh-local-link-popover__content",
|
|
@@ -1878,6 +1965,8 @@ ${MOBILE_SESSION_INFO_STYLES}
|
|
|
1878
1965
|
"layout"
|
|
1879
1966
|
];
|
|
1880
1967
|
function apply(ctx) {
|
|
1968
|
+
const currentSession = new CurrentSessionTracker();
|
|
1969
|
+
ctx.effect(() => trackCurrentSession(ctx, currentSession), "dsh-local-link: current session for invitations");
|
|
1881
1970
|
ctx.effect(() => ctx.locale.register(NS, {
|
|
1882
1971
|
en: en_default,
|
|
1883
1972
|
zh: zh_default
|
|
@@ -1891,10 +1980,12 @@ ${MOBILE_SESSION_INFO_STYLES}
|
|
|
1891
1980
|
return () => style.remove();
|
|
1892
1981
|
}, "dsh-local-link: interface styles");
|
|
1893
1982
|
ctx.effect(() => {
|
|
1894
|
-
const getCurrentSessionId =
|
|
1983
|
+
const getCurrentSessionId = currentSession.getCurrent;
|
|
1984
|
+
const getSettingsLabel = () => ctx.locale.bind("settings")("trigger");
|
|
1895
1985
|
const Footer = (props) => /* @__PURE__ */ react.default.createElement(LocalLinkFooter, {
|
|
1896
1986
|
...props,
|
|
1897
|
-
getCurrentSessionId
|
|
1987
|
+
getCurrentSessionId,
|
|
1988
|
+
getSettingsLabel
|
|
1898
1989
|
});
|
|
1899
1990
|
return ctx.slots.inject("sidebar.footer.action", () => ctx.slots.register({
|
|
1900
1991
|
name: "sidebar.footer.action",
|