@musdrop/ds-harness-remote 0.6.23 → 0.6.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -30
- package/dist/client.js +94 -124
- package/dist/index.js +6092 -5154
- package/dsh-plugin.json +1 -1
- package/locale/README.en.md +0 -15
- package/locale/README.ja.md +0 -15
- package/locale/README.ru.md +0 -15
- package/locale/README.uk.md +0 -15
- package/locale/README.zh.md +0 -15
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,27 +1,3 @@
|
|
|
1
|
-
# 这是一个 fork,不是原版
|
|
2
|
-
|
|
3
|
-
本包 [`@musdrop/ds-harness-remote`](https://github.com/musdrop/ds-harness-remote) 是 [`liguobao/ds-harness-remote`](https://github.com/liguobao/ds-harness-remote)(原版 npm 包 `ds-harness-remote`)的 fork,在原有全部功能之上新增了**跨设备模型借出/借用**。
|
|
4
|
-
|
|
5
|
-
**新增功能:模型共享**
|
|
6
|
-
|
|
7
|
-
- **借出(Lend)**:把本机已配置的模型借给其它设备。请求由本机代发、使用本机自己的凭据——对方拿不到任何密钥,但每次调用消耗的是本机账号的额度。
|
|
8
|
-
- **借用(Borrow)**:借用其它设备借出的模型。借到的模型出现在本机模型选择器中,以对方**设备名称**作为提供商名,其下列出具体模型。
|
|
9
|
-
- **双向授权**:借出方按提供商/设备配置允许借出哪些模型;借用方按设备决定是否启用。只有两边都同意的模型才会出现在选择器里。
|
|
10
|
-
- **端到端加密**:模型请求走 ds-harness-remote 既有的 Noise 加密 P2P/中继通道,凭据不出本机。
|
|
11
|
-
- 配置入口:**设置 → 插件 → 本插件详情 → 「模型共享」区块**;也可用 CLI(`ds-harness-remote model-share show` 等),详见 [docs/model-sharing.md](https://github.com/musdrop/ds-harness-remote/blob/main/docs/model-sharing.md)。
|
|
12
|
-
|
|
13
|
-
**⚠️ 与原版不能同时安装**
|
|
14
|
-
|
|
15
|
-
本包与原版 `ds-harness-remote` 使用**相同的插件 ID**(`com.r2049.ds-harness-remote`),同一个 DSH profile 里**只能装两者之一**——同时安装时插件管理器把二者视为同一插件,启用开关互相影响、无法各自独立启停。
|
|
16
|
-
|
|
17
|
-
也正因为同 ID,本包可以直接**替换**原版:卸载原版、安装本包后,原有 Remote 配置(服务器地址、已授权设备、登录状态等)全部无缝继承,无需重新配对。模型共享的借出/借用配置存在独立的 `model-share.json`,不占用原版配置字段。想恢复原版时反向操作即可。
|
|
18
|
-
|
|
19
|
-
**安装本包**:先在插件管理里卸载原版 `ds-harness-remote`,再安装 `@musdrop/ds-harness-remote`,重启 DSH。
|
|
20
|
-
|
|
21
|
-
以下为原版 README。原有功能(远程工作区、会话接管、终端、文件上传下载、CodeX/ACP 等)在本包中全部可用。
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
1
|
# DeepSeek Harness Remote
|
|
26
2
|
|
|
27
3
|
Continue DeepSeek Harness sessions and experimental Codex, Cursor, and Antigravity workspaces from another device over an end-to-end encrypted connection.
|
|
@@ -32,7 +8,7 @@ Continue DeepSeek Harness sessions and experimental Codex, Cursor, and Antigravi
|
|
|
32
8
|
|
|
33
9
|
`ds-harness-remote` is the Remote Host and workspace plugin for DeepSeek Harness. Harness keeps running on your work computer with its existing workspaces, tools, and permission controls; Remote gives authorized devices another window into that environment.
|
|
34
10
|
|
|
35
|
-
Install the npm package through Desktop Plugin management or `dsh plugin`. Both manage the selected Harness profile and its bundle configuration.
|
|
11
|
+
> Install the npm package through Desktop Plugin management or `dsh plugin`. Both manage the selected Harness profile and its bundle configuration.
|
|
36
12
|
|
|
37
13
|
## Remote Agent tools
|
|
38
14
|
|
|
@@ -89,10 +65,7 @@ Add the package to the `web` profile, then restart Harness:
|
|
|
89
65
|
dsh plugin --profile web add -w ds-harness-remote
|
|
90
66
|
```
|
|
91
67
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
- The Host loads even when the optional `@deepseek-ai/dsh-client-connection` package is absent. When the running Harness provides a Connection service, the Host can use it to create owner peers.
|
|
95
|
-
- Mobile clients can hand a conversation to another agent, review a workspace Git diff, and select changes for follow-up. The attention inbox brings pending approvals and questions together. [Release notes](https://github.com/liguobao/ds-harness-remote/blob/main/docs/CHANGELOG.md#068)
|
|
68
|
+
See the [changelog](https://github.com/liguobao/ds-harness-remote/blob/main/docs/CHANGELOG.md) for release history.
|
|
96
69
|
|
|
97
70
|
## Highlights
|
|
98
71
|
|
|
@@ -121,7 +94,7 @@ This repository includes a minimal, single-account self-hosted Relay Server in [
|
|
|
121
94
|
|
|
122
95
|
- Session traffic is encrypted on the Client and decrypted only by the selected Host using `Noise_IK_25519_ChaChaPoly_SHA256`.
|
|
123
96
|
- Account membership and the Host's locally pinned device identity must both authorize a connection.
|
|
124
|
-
- The Host
|
|
97
|
+
- The Host connects out to the Server. LAN uploads and local DSH Web access can open temporary listeners on eligible local addresses.
|
|
125
98
|
- Remote does not expose general tool RPC, remote desktop, or file-mutation APIs.
|
|
126
99
|
- Interactive terminals are enabled by default and can be disabled in the Host-local Remote settings; they run as the Host user independently of Agent approvals.
|
|
127
100
|
|
package/dist/client.js
CHANGED
|
@@ -1674,7 +1674,8 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
1674
1674
|
|
|
1675
1675
|
// packages/plugin/src/control-route.ts
|
|
1676
1676
|
init_page_globals();
|
|
1677
|
-
var CONTROL_RPC_PREFIX = "/ds-harness-remote", STATUS_STREAM_ENDPOINT = "status.events"
|
|
1677
|
+
var CONTROL_RPC_PREFIX = "/ds-harness-remote", STATUS_STREAM_ENDPOINT = "status.events";
|
|
1678
|
+
var STATUS_STREAM_PATH = `${CONTROL_RPC_PREFIX}/${STATUS_STREAM_ENDPOINT}`;
|
|
1678
1679
|
|
|
1679
1680
|
// packages/plugin/src/remote-upload-client.ts
|
|
1680
1681
|
var REMOTE_UPLOAD_MAX_BYTES = 192 * 1024 * 1024;
|
|
@@ -1779,6 +1780,8 @@ Minimum version required to store current data is: ` + bestVersion + `.
|
|
|
1779
1780
|
// packages/plugin/src/client-locale.ts
|
|
1780
1781
|
init_page_globals();
|
|
1781
1782
|
var localeNamespace = "ds-harness-remote", en = {
|
|
1783
|
+
downloadRemoteOriginal: "Download remote original",
|
|
1784
|
+
downloadRemoteOriginalFailed: "Could not download the remote original.",
|
|
1782
1785
|
uploadTooLarge: "The file exceeds the current upload limit of {size}.",
|
|
1783
1786
|
relayUploadTooLarge: "The file exceeds the current upload limit of {size}. Relay and TURN allow 20 MiB per file, or 100 MiB on connections with member upload support.",
|
|
1784
1787
|
serverSavedLive: "Server address saved and applied.",
|
|
@@ -1843,9 +1846,6 @@ If a code was sent, recover the original submission without changing it.`,
|
|
|
1843
1846
|
sidebarEntryStandard: "Standard",
|
|
1844
1847
|
sidebarEntryCompact: "Compact",
|
|
1845
1848
|
sidebarEntrySaved: "Sidebar entry style saved.",
|
|
1846
|
-
previewOpen: "Preview service",
|
|
1847
|
-
previewPort: "Host port",
|
|
1848
|
-
previewLocalOnly: "Preview requires Desktop or a browser connected to Harness on this computer.",
|
|
1849
1849
|
hostReferenceName: "Name",
|
|
1850
1850
|
hostReferenceSystem: "System",
|
|
1851
1851
|
hostReferenceDeviceId: "Device ID",
|
|
@@ -2191,7 +2191,7 @@ If a code was sent, recover the original submission without changing it.`,
|
|
|
2191
2191
|
hermesVirtualWorkspace: "Hermes virtual workspace",
|
|
2192
2192
|
kimiVirtualWorkspace: "Kimi virtual workspace",
|
|
2193
2193
|
codexVirtualSessions: "Sessions",
|
|
2194
|
-
//
|
|
2194
|
+
// model-sharing strings, appended after upstream's last key.
|
|
2195
2195
|
modelSharing: "Model sharing",
|
|
2196
2196
|
modelSharingHint: "Lend your models to other devices, or borrow models from them.",
|
|
2197
2197
|
modelShareLending: "Lend models",
|
|
@@ -2222,14 +2222,15 @@ If a code was sent, recover the original submission without changing it.`,
|
|
|
2222
2222
|
modelShareBorrowStatusDisconnected: "Not connected to Remote: borrowing cannot sync.",
|
|
2223
2223
|
modelShareBorrowStatusFailed: "Connection failed: {reason}",
|
|
2224
2224
|
modelShareBorrowStatusPeerEmpty: "This device lends nothing usable right now.",
|
|
2225
|
-
modelShareRuleAnyDeviceHint: "
|
|
2225
|
+
modelShareRuleAnyDeviceHint: "Shared models are available to peers this device allows to control it remotely. Turn that off to stop sharing entirely.",
|
|
2226
2226
|
modelShareEdit: "Edit",
|
|
2227
2227
|
modelShareSaveEdit: "Save rule",
|
|
2228
2228
|
modelShareSelectModelsHint: "No models selected yet",
|
|
2229
2229
|
modelShareClearDraft: "Clear form",
|
|
2230
|
-
// [model-sharing] END
|
|
2231
2230
|
modelShareBorrowStatusHostDisabled: "The other device is not lending to this machine right now (its model sharing is off, or no rule covers this device). Ask them to check their lending rules."
|
|
2232
2231
|
}, zh = {
|
|
2232
|
+
downloadRemoteOriginal: "\u4E0B\u8F7D\u8FDC\u7A0B\u539F\u6587\u4EF6",
|
|
2233
|
+
downloadRemoteOriginalFailed: "\u65E0\u6CD5\u4E0B\u8F7D\u8FDC\u7A0B\u539F\u6587\u4EF6\u3002",
|
|
2233
2234
|
uploadTooLarge: "\u6587\u4EF6\u8D85\u8FC7\u5F53\u524D\u8FDE\u63A5\u7684\u5355\u6587\u4EF6\u4E0A\u4F20\u4E0A\u9650\uFF08{size}\uFF09\u3002",
|
|
2234
2235
|
relayUploadTooLarge: "\u6587\u4EF6\u8D85\u8FC7\u5F53\u524D\u8FDE\u63A5\u7684\u5355\u6587\u4EF6\u4E0A\u4F20\u4E0A\u9650\uFF08{size}\uFF09\u3002Relay \u548C TURN \u4E0A\u4F20\u65F6\uFF0C\u666E\u901A\u7528\u6237\u6BCF\u4E2A\u6587\u4EF6\u6700\u591A 20 MiB\uFF0C\u652F\u6301\u4F1A\u5458\u989D\u5EA6\u7684\u8FDE\u63A5\u6700\u591A 100 MiB\u3002",
|
|
2235
2236
|
serverSavedLive: "\u670D\u52A1\u5668\u5730\u5740\u5DF2\u4FDD\u5B58\u5E76\u751F\u6548\u3002",
|
|
@@ -2294,9 +2295,6 @@ DSH Go \u626B\u7801\u6682\u4E0D\u652F\u6301\u591A\u53F0\u8BBE\u5907\u63A7\u5236\
|
|
|
2294
2295
|
sidebarEntryStandard: "\u6807\u51C6",
|
|
2295
2296
|
sidebarEntryCompact: "\u7B80\u6D01",
|
|
2296
2297
|
sidebarEntrySaved: "\u4FA7\u680F\u5165\u53E3\u6837\u5F0F\u5DF2\u4FDD\u5B58\u3002",
|
|
2297
|
-
previewOpen: "\u9884\u89C8\u670D\u52A1",
|
|
2298
|
-
previewPort: "Host \u7AEF\u53E3",
|
|
2299
|
-
previewLocalOnly: "\u9884\u89C8\u9700\u8981 Desktop\uFF0C\u6216\u8FDE\u63A5\u5230\u672C\u673A Harness \u7684\u6D4F\u89C8\u5668\u3002",
|
|
2300
2298
|
hostReferenceName: "\u540D\u79F0",
|
|
2301
2299
|
hostReferenceSystem: "\u7CFB\u7EDF",
|
|
2302
2300
|
hostReferenceDeviceId: "\u8BBE\u5907 ID",
|
|
@@ -2642,7 +2640,7 @@ DSH Go \u626B\u7801\u6682\u4E0D\u652F\u6301\u591A\u53F0\u8BBE\u5907\u63A7\u5236\
|
|
|
2642
2640
|
hermesVirtualWorkspace: "Hermes \u5DE5\u4F5C\u533A",
|
|
2643
2641
|
kimiVirtualWorkspace: "Kimi \u5DE5\u4F5C\u533A",
|
|
2644
2642
|
codexVirtualSessions: "Sessions",
|
|
2645
|
-
//
|
|
2643
|
+
// model-sharing strings, appended after upstream's last key.
|
|
2646
2644
|
modelSharing: "\u6A21\u578B\u5171\u4EAB",
|
|
2647
2645
|
modelSharingHint: "\u628A\u672C\u673A\u6A21\u578B\u501F\u7ED9\u5176\u4ED6\u8BBE\u5907\uFF0C\u6216\u501F\u7528\u5176\u4ED6\u8BBE\u5907\u7684\u6A21\u578B\u3002",
|
|
2648
2646
|
modelShareLending: "\u501F\u51FA\u6A21\u578B",
|
|
@@ -2673,14 +2671,15 @@ DSH Go \u626B\u7801\u6682\u4E0D\u652F\u6301\u591A\u53F0\u8BBE\u5907\u63A7\u5236\
|
|
|
2673
2671
|
modelShareBorrowStatusDisconnected: "\u672A\u8FDE\u63A5\u5230\u8FDC\u7A0B\uFF1A\u501F\u7528\u65E0\u6CD5\u540C\u6B65\u3002",
|
|
2674
2672
|
modelShareBorrowStatusFailed: "\u8FDE\u63A5\u5931\u8D25\uFF1A{reason}",
|
|
2675
2673
|
modelShareBorrowStatusPeerEmpty: "\u8BE5\u8BBE\u5907\u5F53\u524D\u6CA1\u6709\u53EF\u501F\u7528\u7684\u6A21\u578B\u3002",
|
|
2676
|
-
modelShareRuleAnyDeviceHint: "\
|
|
2674
|
+
modelShareRuleAnyDeviceHint: "\u5171\u4EAB\u7684\u6A21\u578B\u4F1A\u63D0\u4F9B\u7ED9\u88AB\u5141\u8BB8\u8FDC\u7A0B\u63A7\u5236\u672C\u673A\u7684\u8BBE\u5907\u3002\u5173\u95ED\u300C\u5141\u8BB8\u88AB\u63A7\u300D\u5373\u53EF\u505C\u6B62\u5171\u4EAB\u3002",
|
|
2677
2675
|
modelShareEdit: "\u7F16\u8F91",
|
|
2678
2676
|
modelShareSaveEdit: "\u4FDD\u5B58\u89C4\u5219",
|
|
2679
2677
|
modelShareSelectModelsHint: "\u5C1A\u672A\u9009\u62E9\u6A21\u578B",
|
|
2680
2678
|
modelShareClearDraft: "\u6E05\u7A7A\u8868\u5355",
|
|
2681
|
-
// [model-sharing] END
|
|
2682
2679
|
modelShareBorrowStatusHostDisabled: "\u5BF9\u65B9\u5F53\u524D\u6CA1\u6709\u5411\u4F60\u501F\u51FA\uFF08\u5BF9\u65B9\u7684\u6A21\u578B\u5171\u4EAB\u5DF2\u5173\u95ED\uFF0C\u6216\u6CA1\u6709\u8986\u76D6\u672C\u8BBE\u5907\u7684\u89C4\u5219\uFF09\u3002\u8BF7\u5BF9\u65B9\u68C0\u67E5\u5176\u501F\u51FA\u89C4\u5219\u3002"
|
|
2683
2680
|
}, ru = {
|
|
2681
|
+
downloadRemoteOriginal: "\u0421\u043A\u0430\u0447\u0430\u0442\u044C \u0438\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u0444\u0430\u0439\u043B \u0441 \u0443\u0434\u0430\u043B\u0451\u043D\u043D\u043E\u0433\u043E \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0430",
|
|
2682
|
+
downloadRemoteOriginalFailed: "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043A\u0430\u0447\u0430\u0442\u044C \u0438\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u0444\u0430\u0439\u043B.",
|
|
2684
2683
|
uploadTooLarge: "\u0424\u0430\u0439\u043B \u043F\u0440\u0435\u0432\u044B\u0448\u0430\u0435\u0442 \u0442\u0435\u043A\u0443\u0449\u0438\u0439 \u043B\u0438\u043C\u0438\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0438 ({size}).",
|
|
2685
2684
|
relayUploadTooLarge: "\u0424\u0430\u0439\u043B \u043F\u0440\u0435\u0432\u044B\u0448\u0430\u0435\u0442 \u0442\u0435\u043A\u0443\u0449\u0438\u0439 \u043B\u0438\u043C\u0438\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0438 ({size}). \u0427\u0435\u0440\u0435\u0437 Relay \u0438 TURN \u043B\u0438\u043C\u0438\u0442 \u0441\u043E\u0441\u0442\u0430\u0432\u043B\u044F\u0435\u0442 20 \u041C\u0438\u0411 \u043D\u0430 \u0444\u0430\u0439\u043B \u0438\u043B\u0438 100 \u041C\u0438\u0411, \u0435\u0441\u043B\u0438 \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043B\u0438\u043C\u0438\u0442 \u043F\u043E\u0434\u043F\u0438\u0441\u043A\u0438.",
|
|
2686
2685
|
serverSavedLive: "\u0410\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441\u043E\u0445\u0440\u0430\u043D\u0451\u043D \u0438 \u043F\u0440\u0438\u043C\u0435\u043D\u0451\u043D.",
|
|
@@ -2745,9 +2744,6 @@ DSH Go \u626B\u7801\u6682\u4E0D\u652F\u6301\u591A\u53F0\u8BBE\u5907\u63A7\u5236\
|
|
|
2745
2744
|
sidebarEntryStandard: "\u0421\u0442\u0430\u043D\u0434\u0430\u0440\u0442\u043D\u044B\u0439",
|
|
2746
2745
|
sidebarEntryCompact: "\u041A\u043E\u043C\u043F\u0430\u043A\u0442\u043D\u044B\u0439",
|
|
2747
2746
|
sidebarEntrySaved: "\u0412\u0438\u0434 \u043A\u043D\u043E\u043F\u043A\u0438 \u043D\u0430 \u0431\u043E\u043A\u043E\u0432\u043E\u0439 \u043F\u0430\u043D\u0435\u043B\u0438 \u0441\u043E\u0445\u0440\u0430\u043D\u0451\u043D.",
|
|
2748
|
-
previewOpen: "\u0421\u0435\u0440\u0432\u0438\u0441 \u043F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430",
|
|
2749
|
-
previewPort: "\u041F\u043E\u0440\u0442 \u0445\u043E\u0441\u0442\u0430",
|
|
2750
|
-
previewLocalOnly: "\u0414\u043B\u044F \u043F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430 \u043D\u0443\u0436\u0435\u043D Desktop \u0438\u043B\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440, \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0451\u043D\u043D\u044B\u0439 \u043A Harness \u043D\u0430 \u044D\u0442\u043E\u043C \u043A\u043E\u043C\u043F\u044C\u044E\u0442\u0435\u0440\u0435.",
|
|
2751
2747
|
hostReferenceName: "\u0418\u043C\u044F",
|
|
2752
2748
|
hostReferenceSystem: "\u0421\u0438\u0441\u0442\u0435\u043C\u0430",
|
|
2753
2749
|
hostReferenceDeviceId: "ID \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0430",
|
|
@@ -3093,7 +3089,7 @@ DSH Go \u626B\u7801\u6682\u4E0D\u652F\u6301\u591A\u53F0\u8BBE\u5907\u63A7\u5236\
|
|
|
3093
3089
|
hermesVirtualWorkspace: "\u0412\u0438\u0440\u0442\u0443\u0430\u043B\u044C\u043D\u0430\u044F \u0440\u0430\u0431\u043E\u0447\u0430\u044F \u043E\u0431\u043B\u0430\u0441\u0442\u044C Hermes",
|
|
3094
3090
|
kimiVirtualWorkspace: "\u0412\u0438\u0440\u0442\u0443\u0430\u043B\u044C\u043D\u0430\u044F \u0440\u0430\u0431\u043E\u0447\u0430\u044F \u043E\u0431\u043B\u0430\u0441\u0442\u044C Kimi",
|
|
3095
3091
|
codexVirtualSessions: "\u0421\u0435\u0441\u0441\u0438\u0438",
|
|
3096
|
-
//
|
|
3092
|
+
// model-sharing strings, appended after upstream's last key.
|
|
3097
3093
|
modelSharing: "\u041E\u0431\u043C\u0435\u043D \u043C\u043E\u0434\u0435\u043B\u044F\u043C\u0438",
|
|
3098
3094
|
modelSharingHint: "\u041F\u0440\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u043B\u044F\u0439\u0442\u0435 \u043C\u043E\u0434\u0435\u043B\u0438 \u0434\u0440\u0443\u0433\u0438\u043C \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0430\u043C \u0438\u043B\u0438 \u0437\u0430\u0438\u043C\u0441\u0442\u0432\u0443\u0439\u0442\u0435 \u043C\u043E\u0434\u0435\u043B\u0438 \u0441 \u0434\u0440\u0443\u0433\u0438\u0445 \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432.",
|
|
3099
3095
|
modelShareLending: "\u041F\u0440\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u043C\u043E\u0434\u0435\u043B\u0435\u0439",
|
|
@@ -3124,14 +3120,15 @@ DSH Go \u626B\u7801\u6682\u4E0D\u652F\u6301\u591A\u53F0\u8BBE\u5907\u63A7\u5236\
|
|
|
3124
3120
|
modelShareBorrowStatusDisconnected: "\u041D\u0435\u0442 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F \u043A Remote: \u0441\u0438\u043D\u0445\u0440\u043E\u043D\u0438\u0437\u0430\u0446\u0438\u044F \u0437\u0430\u0438\u043C\u0441\u0442\u0432\u043E\u0432\u0430\u043D\u0438\u044F \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u0430.",
|
|
3125
3121
|
modelShareBorrowStatusFailed: "\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F: {reason}",
|
|
3126
3122
|
modelShareBorrowStatusPeerEmpty: "\u042D\u0442\u043E \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u043E \u0441\u0435\u0439\u0447\u0430\u0441 \u043D\u0435 \u043F\u0440\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u043B\u044F\u0435\u0442 \u043C\u043E\u0434\u0435\u043B\u0435\u0439.",
|
|
3127
|
-
modelShareRuleAnyDeviceHint: "\
|
|
3123
|
+
modelShareRuleAnyDeviceHint: "\u041E\u0431\u0449\u0438\u0435 \u043C\u043E\u0434\u0435\u043B\u0438 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0430\u043C, \u043A\u043E\u0442\u043E\u0440\u044B\u043C \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u043E \u0443\u0434\u0430\u043B\u0451\u043D\u043D\u043E \u0443\u043F\u0440\u0430\u0432\u043B\u044F\u0442\u044C \u044D\u0442\u0438\u043C \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u043E\u043C. \u041E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u044D\u0442\u043E \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u0435, \u0447\u0442\u043E\u0431\u044B \u043F\u0440\u0435\u043A\u0440\u0430\u0442\u0438\u0442\u044C \u043E\u0431\u0449\u0438\u0439 \u0434\u043E\u0441\u0442\u0443\u043F.",
|
|
3128
3124
|
modelShareEdit: "\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C",
|
|
3129
3125
|
modelShareSaveEdit: "\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043F\u0440\u0430\u0432\u0438\u043B\u043E",
|
|
3130
3126
|
modelShareSelectModelsHint: "\u041C\u043E\u0434\u0435\u043B\u0438 \u043D\u0435 \u0432\u044B\u0431\u0440\u0430\u043D\u044B",
|
|
3131
3127
|
modelShareClearDraft: "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0444\u043E\u0440\u043C\u0443",
|
|
3132
|
-
// [model-sharing] END
|
|
3133
3128
|
modelShareBorrowStatusHostDisabled: "\u0414\u0440\u0443\u0433\u043E\u0435 \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u043E \u0441\u0435\u0439\u0447\u0430\u0441 \u043D\u0435 \u043F\u0440\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u043B\u044F\u0435\u0442 \u043C\u043E\u0434\u0435\u043B\u0438 \u044D\u0442\u043E\u043C\u0443 \u043A\u043E\u043C\u043F\u044C\u044E\u0442\u0435\u0440\u0443 (\u043E\u0431\u0449\u0438\u0439 \u0434\u043E\u0441\u0442\u0443\u043F \u0432\u044B\u043A\u043B\u044E\u0447\u0435\u043D \u0438\u043B\u0438 \u043F\u0440\u0430\u0432\u0438\u043B\u043E \u043D\u0435 \u043E\u0445\u0432\u0430\u0442\u044B\u0432\u0430\u0435\u0442 \u044D\u0442\u043E \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u043E). \u041F\u043E\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0435\u0433\u043E \u043F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u043F\u0440\u0430\u0432\u0438\u043B\u0430."
|
|
3134
3129
|
}, uk = {
|
|
3130
|
+
downloadRemoteOriginal: "\u0417\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0438\u0442\u0438 \u043E\u0440\u0438\u0433\u0456\u043D\u0430\u043B \u0456\u0437 \u0432\u0456\u0434\u0434\u0430\u043B\u0435\u043D\u043E\u0433\u043E \u043F\u0440\u0438\u0441\u0442\u0440\u043E\u044E",
|
|
3131
|
+
downloadRemoteOriginalFailed: "\u041D\u0435 \u0432\u0434\u0430\u043B\u043E\u0441\u044F \u0437\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0438\u0442\u0438 \u043E\u0440\u0438\u0433\u0456\u043D\u0430\u043B.",
|
|
3135
3132
|
uploadTooLarge: "\u0424\u0430\u0439\u043B \u043F\u0435\u0440\u0435\u0432\u0438\u0449\u0443\u0454 \u043F\u043E\u0442\u043E\u0447\u043D\u0438\u0439 \u043B\u0456\u043C\u0456\u0442 \u0437\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u044F ({size}).",
|
|
3136
3133
|
relayUploadTooLarge: "\u0424\u0430\u0439\u043B \u043F\u0435\u0440\u0435\u0432\u0438\u0449\u0443\u0454 \u043F\u043E\u0442\u043E\u0447\u043D\u0438\u0439 \u043B\u0456\u043C\u0456\u0442 \u0437\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u044F ({size}). \u0427\u0435\u0440\u0435\u0437 Relay \u0456 TURN \u043B\u0456\u043C\u0456\u0442 \u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C 20 \u041C\u0456\u0411 \u043D\u0430 \u0444\u0430\u0439\u043B \u0430\u0431\u043E 100 \u041C\u0456\u0411, \u044F\u043A\u0449\u043E \u0437\u2019\u0454\u0434\u043D\u0430\u043D\u043D\u044F \u043F\u0456\u0434\u0442\u0440\u0438\u043C\u0443\u0454 \u043B\u0456\u043C\u0456\u0442 \u043F\u0435\u0440\u0435\u0434\u043F\u043B\u0430\u0442\u0438.",
|
|
3137
3134
|
serverSavedLive: "\u0410\u0434\u0440\u0435\u0441\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0437\u0431\u0435\u0440\u0435\u0436\u0435\u043D\u043E \u0439 \u0437\u0430\u0441\u0442\u043E\u0441\u043E\u0432\u0430\u043D\u043E.",
|
|
@@ -3196,9 +3193,6 @@ DSH Go \u626B\u7801\u6682\u4E0D\u652F\u6301\u591A\u53F0\u8BBE\u5907\u63A7\u5236\
|
|
|
3196
3193
|
sidebarEntryStandard: "\u0421\u0442\u0430\u043D\u0434\u0430\u0440\u0442\u043D\u0438\u0439",
|
|
3197
3194
|
sidebarEntryCompact: "\u041A\u043E\u043C\u043F\u0430\u043A\u0442\u043D\u0438\u0439",
|
|
3198
3195
|
sidebarEntrySaved: "\u0421\u0442\u0438\u043B\u044C \u043A\u043D\u043E\u043F\u043A\u0438 \u043D\u0430 \u0431\u0456\u0447\u043D\u0456\u0439 \u043F\u0430\u043D\u0435\u043B\u0456 \u0437\u0431\u0435\u0440\u0435\u0436\u0435\u043D\u043E.",
|
|
3199
|
-
previewOpen: "\u0421\u0435\u0440\u0432\u0456\u0441 \u043F\u043E\u043F\u0435\u0440\u0435\u0434\u043D\u044C\u043E\u0433\u043E \u043F\u0435\u0440\u0435\u0433\u043B\u044F\u0434\u0443",
|
|
3200
|
-
previewPort: "\u041F\u043E\u0440\u0442 \u0445\u043E\u0441\u0442\u0430",
|
|
3201
|
-
previewLocalOnly: "\u0414\u043B\u044F \u043F\u043E\u043F\u0435\u0440\u0435\u0434\u043D\u044C\u043E\u0433\u043E \u043F\u0435\u0440\u0435\u0433\u043B\u044F\u0434\u0443 \u043F\u043E\u0442\u0440\u0456\u0431\u0435\u043D Desktop \u0430\u0431\u043E \u0431\u0440\u0430\u0443\u0437\u0435\u0440, \u043F\u0456\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0439 \u0434\u043E Harness \u043D\u0430 \u0446\u044C\u043E\u043C\u0443 \u043A\u043E\u043C\u043F\u02BC\u044E\u0442\u0435\u0440\u0456.",
|
|
3202
3196
|
hostReferenceName: "\u0406\u043C\u02BC\u044F",
|
|
3203
3197
|
hostReferenceSystem: "\u0421\u0438\u0441\u0442\u0435\u043C\u0430",
|
|
3204
3198
|
hostReferenceDeviceId: "ID \u043F\u0440\u0438\u0441\u0442\u0440\u043E\u044E",
|
|
@@ -3544,7 +3538,7 @@ DSH Go \u626B\u7801\u6682\u4E0D\u652F\u6301\u591A\u53F0\u8BBE\u5907\u63A7\u5236\
|
|
|
3544
3538
|
hermesVirtualWorkspace: "\u0412\u0456\u0440\u0442\u0443\u0430\u043B\u044C\u043D\u0438\u0439 \u0440\u043E\u0431\u043E\u0447\u0438\u0439 \u043F\u0440\u043E\u0441\u0442\u0456\u0440 Hermes",
|
|
3545
3539
|
kimiVirtualWorkspace: "\u0412\u0456\u0440\u0442\u0443\u0430\u043B\u044C\u043D\u0438\u0439 \u0440\u043E\u0431\u043E\u0447\u0438\u0439 \u043F\u0440\u043E\u0441\u0442\u0456\u0440 Kimi",
|
|
3546
3540
|
codexVirtualSessions: "\u0421\u0435\u0441\u0456\u0457",
|
|
3547
|
-
//
|
|
3541
|
+
// model-sharing strings, appended after upstream's last key.
|
|
3548
3542
|
modelSharing: "\u041C\u043E\u0434\u0435\u043B\u044C\u043D\u0438\u0439 \u043E\u0431\u043C\u0456\u043D",
|
|
3549
3543
|
modelSharingHint: "\u041D\u0430\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043C\u043E\u0434\u0435\u043B\u0456 \u0456\u043D\u0448\u0438\u043C \u043F\u0440\u0438\u0441\u0442\u0440\u043E\u044F\u043C \u0430\u0431\u043E \u043F\u043E\u0437\u0438\u0447\u0430\u0439\u0442\u0435 \u043C\u043E\u0434\u0435\u043B\u0456 \u0437 \u0456\u043D\u0448\u0438\u0445 \u043F\u0440\u0438\u0441\u0442\u0440\u043E\u0457\u0432.",
|
|
3550
3544
|
modelShareLending: "\u041D\u0430\u0434\u0430\u043D\u043D\u044F \u043C\u043E\u0434\u0435\u043B\u0435\u0439",
|
|
@@ -3575,12 +3569,11 @@ DSH Go \u626B\u7801\u6682\u4E0D\u652F\u6301\u591A\u53F0\u8BBE\u5907\u63A7\u5236\
|
|
|
3575
3569
|
modelShareBorrowStatusDisconnected: "\u041D\u0435\u043C\u0430\u0454 \u043F\u0456\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u043D\u044F \u0434\u043E Remote: \u0441\u0438\u043D\u0445\u0440\u043E\u043D\u0456\u0437\u0430\u0446\u0456\u044F \u043F\u043E\u0437\u0438\u0447\u0430\u043D\u043D\u044F \u043D\u0435\u043C\u043E\u0436\u043B\u0438\u0432\u0430.",
|
|
3576
3570
|
modelShareBorrowStatusFailed: "\u041F\u043E\u043C\u0438\u043B\u043A\u0430 \u043F\u0456\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u043D\u044F: {reason}",
|
|
3577
3571
|
modelShareBorrowStatusPeerEmpty: "\u0426\u0435\u0439 \u043F\u0440\u0438\u0441\u0442\u0440\u0456\u0439 \u0437\u0430\u0440\u0430\u0437 \u043D\u0435 \u043D\u0430\u0434\u0430\u0454 \u043C\u043E\u0434\u0435\u043B\u0435\u0439.",
|
|
3578
|
-
modelShareRuleAnyDeviceHint: "\
|
|
3572
|
+
modelShareRuleAnyDeviceHint: "\u0421\u043F\u0456\u043B\u044C\u043D\u0456 \u043C\u043E\u0434\u0435\u043B\u0456 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0456 \u043F\u0440\u0438\u0441\u0442\u0440\u043E\u044F\u043C, \u044F\u043A\u0438\u043C \u0434\u043E\u0437\u0432\u043E\u043B\u0435\u043D\u043E \u0432\u0456\u0434\u0434\u0430\u043B\u0435\u043D\u043E \u043A\u0435\u0440\u0443\u0432\u0430\u0442\u0438 \u0446\u0438\u043C \u043F\u0440\u0438\u0441\u0442\u0440\u043E\u0454\u043C. \u0412\u0438\u043C\u043A\u043D\u0456\u0442\u044C \u0446\u0435\u0439 \u0434\u043E\u0437\u0432\u0456\u043B, \u0449\u043E\u0431 \u043F\u0440\u0438\u043F\u0438\u043D\u0438\u0442\u0438 \u0441\u043F\u0456\u043B\u044C\u043D\u0438\u0439 \u0434\u043E\u0441\u0442\u0443\u043F.",
|
|
3579
3573
|
modelShareEdit: "\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438",
|
|
3580
3574
|
modelShareSaveEdit: "\u0417\u0431\u0435\u0440\u0435\u0433\u0442\u0438 \u043F\u0440\u0430\u0432\u0438\u043B\u043E",
|
|
3581
3575
|
modelShareSelectModelsHint: "\u041C\u043E\u0434\u0435\u043B\u0456 \u043D\u0435 \u0432\u0438\u0431\u0440\u0430\u043D\u043E",
|
|
3582
3576
|
modelShareClearDraft: "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u0438 \u0444\u043E\u0440\u043C\u0443",
|
|
3583
|
-
// [model-sharing] END
|
|
3584
3577
|
modelShareBorrowStatusHostDisabled: "\u0406\u043D\u0448\u0438\u0439 \u043F\u0440\u0438\u0441\u0442\u0440\u0456\u0439 \u0437\u0430\u0440\u0430\u0437 \u043D\u0435 \u043D\u0430\u0434\u0430\u0454 \u043C\u043E\u0434\u0435\u043B\u0456 \u0446\u044C\u043E\u043C\u0443 \u043A\u043E\u043C\u043F\u2019\u044E\u0442\u0435\u0440\u0443 (\u0441\u043F\u0456\u043B\u044C\u043D\u0438\u0439 \u0434\u043E\u0441\u0442\u0443\u043F \u0432\u0438\u043C\u043A\u043D\u0435\u043D\u043E \u0430\u0431\u043E \u043F\u0440\u0430\u0432\u0438\u043B\u043E \u043D\u0435 \u043E\u0445\u043E\u043F\u043B\u044E\u0454 \u0446\u0435\u0439 \u043F\u0440\u0438\u0441\u0442\u0440\u0456\u0439). \u041F\u043E\u043F\u0440\u043E\u0441\u0456\u0442\u044C \u0439\u043E\u0433\u043E \u043F\u0435\u0440\u0435\u0432\u0456\u0440\u0438\u0442\u0438 \u043F\u0440\u0430\u0432\u0438\u043B\u0430."
|
|
3585
3578
|
};
|
|
3586
3579
|
|
|
@@ -4390,7 +4383,7 @@ DSH Go \u626B\u7801\u6682\u4E0D\u652F\u6301\u591A\u53F0\u8BBE\u5907\u63A7\u5236\
|
|
|
4390
4383
|
}
|
|
4391
4384
|
function createModelSharingSection(React) {
|
|
4392
4385
|
return function(props) {
|
|
4393
|
-
let { control, t, available = !0 } = props, [view, setView] = React.useState(void 0), [busy, setBusy] = React.useState(!1), [error, setError] = React.useState(void 0), [notice, setNotice] = React.useState(void 0), [draftModels, setDraftModels] = React.useState([]), [
|
|
4386
|
+
let { control, t, available = !0 } = props, [view, setView] = React.useState(void 0), [busy, setBusy] = React.useState(!1), [error, setError] = React.useState(void 0), [notice, setNotice] = React.useState(void 0), [draftModels, setDraftModels] = React.useState([]), [concurrencyDraft, setConcurrencyDraft] = React.useState(void 0), viewRef = React.useRef(void 0), queueRef = React.useRef(Promise.resolve()), busyRef = React.useRef(!1), applyView = (next) => {
|
|
4394
4387
|
viewRef.current = next, setView(next), setConcurrencyDraft(void 0);
|
|
4395
4388
|
}, load = React.useCallback(async () => {
|
|
4396
4389
|
setError(void 0);
|
|
@@ -4421,32 +4414,25 @@ DSH Go \u626B\u7801\u6682\u4E0D\u652F\u6301\u591A\u53F0\u8BBE\u5907\u63A7\u5236\
|
|
|
4421
4414
|
enqueue((current) => ({ ...current, borrower: { ...current.borrower, sources } }));
|
|
4422
4415
|
}, toggleDraftModel = (route) => {
|
|
4423
4416
|
setDraftModels((current) => current.includes(route) ? current.filter((id) => id !== route) : [...current, route]);
|
|
4424
|
-
}, toggleDraftDevice = (deviceId) => {
|
|
4425
|
-
setDraftDevices((current) => current.includes(deviceId) ? current.filter((id) => id !== deviceId) : [...current, deviceId]);
|
|
4426
4417
|
}, resetDraft = () => {
|
|
4427
|
-
setDraftModels([])
|
|
4418
|
+
setDraftModels([]);
|
|
4428
4419
|
}, saveRule = () => {
|
|
4429
|
-
view === void 0 || draftModels.length === 0 || (enqueue((current) => {
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
},
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
let modelName = view?.localProviders.find((candidate) => candidate.id === provider)?.models.find((candidate) => candidate.id === model)?.name;
|
|
4446
|
-
return `${providerName} / ${modelName ?? model}`;
|
|
4447
|
-
}).join(", "),
|
|
4448
|
-
rule.devices.length === 0 ? t("modelShareAnyDevice") : rule.devices.map(peerName).join(", ")
|
|
4449
|
-
], borrowStatus = (deviceId, source) => {
|
|
4420
|
+
view === void 0 || draftModels.length === 0 || (enqueue((current) => ({
|
|
4421
|
+
...current,
|
|
4422
|
+
host: {
|
|
4423
|
+
...current.host,
|
|
4424
|
+
models: [.../* @__PURE__ */ new Set([...current.host.models, ...draftModels])],
|
|
4425
|
+
enabled: !0
|
|
4426
|
+
}
|
|
4427
|
+
})), resetDraft());
|
|
4428
|
+
}, removeModel = (route) => {
|
|
4429
|
+
view !== void 0 && patchHost({ models: view.store.host.models.filter((model) => model !== route) });
|
|
4430
|
+
}, label = (device) => `${device.name}${device.online ? ` \xB7 ${t("modelShareOnline")}` : device.known ? ` \xB7 ${t("modelShareOffline")}` : ""}`, ruleSummary = (route) => {
|
|
4431
|
+
let separator = route.indexOf(ROUTE_SEPARATOR), provider = route.slice(0, separator), model = route.slice(separator + ROUTE_SEPARATOR.length), providerName = view?.localProviders.find((candidate) => candidate.id === provider)?.name ?? provider;
|
|
4432
|
+
if (model === "*") return `${providerName}: ${t("modelShareAllModels")}`;
|
|
4433
|
+
let modelName = view?.localProviders.find((candidate) => candidate.id === provider)?.models.find((candidate) => candidate.id === model)?.name;
|
|
4434
|
+
return `${providerName} / ${modelName ?? model}`;
|
|
4435
|
+
}, borrowStatus = (deviceId, source) => {
|
|
4450
4436
|
if (view === void 0 || source?.enabled !== !0) return;
|
|
4451
4437
|
let diagnostics = view.borrowerDiagnostics;
|
|
4452
4438
|
if (diagnostics.syncAvailable !== !0)
|
|
@@ -4477,7 +4463,7 @@ DSH Go \u626B\u7801\u6682\u4E0D\u652F\u6301\u591A\u53F0\u8BBE\u5907\u63A7\u5236\
|
|
|
4477
4463
|
React.createElement("p", null, error ?? t("modelShareNotLoaded"))
|
|
4478
4464
|
)
|
|
4479
4465
|
);
|
|
4480
|
-
let { host, borrower } = view.store, disabled = busy || !view.writable || !available, selectedCount = draftModels.length, modelsSummary = selectedCount === 0 ? t("modelShareSelectModelsHint") : t("modelShareSelectedCount", { count: selectedCount }),
|
|
4466
|
+
let { host, borrower } = view.store, disabled = busy || !view.writable || !available, selectedCount = draftModels.length, modelsSummary = selectedCount === 0 ? t("modelShareSelectModelsHint") : t("modelShareSelectedCount", { count: selectedCount }), modelSummaryLine = `${t("modelShareModels")}: ${modelsSummary}`, lendingRows = React.createElement(
|
|
4481
4467
|
"div",
|
|
4482
4468
|
{ className: "dshRemoteAcpList" },
|
|
4483
4469
|
React.createElement(
|
|
@@ -4512,33 +4498,26 @@ DSH Go \u626B\u7801\u6682\u4E0D\u652F\u6301\u591A\u53F0\u8BBE\u5907\u63A7\u5236\
|
|
|
4512
4498
|
),
|
|
4513
4499
|
React.createElement("p", { className: "dshRemoteAcpDiag" }, t("modelShareRuleAnyDeviceHint"))
|
|
4514
4500
|
),
|
|
4515
|
-
...host.
|
|
4501
|
+
...host.models.map((route) => React.createElement(
|
|
4516
4502
|
"div",
|
|
4517
4503
|
{
|
|
4518
|
-
key: `
|
|
4504
|
+
key: `shared-${route}`,
|
|
4519
4505
|
className: "dshRemoteModelShareGrantEntry"
|
|
4520
4506
|
},
|
|
4521
|
-
React.createElement("span", null, ruleSummary(
|
|
4507
|
+
React.createElement("span", null, ruleSummary(route)),
|
|
4522
4508
|
React.createElement(
|
|
4523
4509
|
"div",
|
|
4524
4510
|
{ className: "dshRemoteAcpRowActions" },
|
|
4525
|
-
React.createElement("button", {
|
|
4526
|
-
type: "button",
|
|
4527
|
-
className: "dshRemoteAcpActionBtn",
|
|
4528
|
-
disabled,
|
|
4529
|
-
"aria-label": `${t("modelShareEdit")} #${index + 1}`,
|
|
4530
|
-
onClick: () => startEdit(index)
|
|
4531
|
-
}, t("modelShareEdit")),
|
|
4532
4511
|
React.createElement("button", {
|
|
4533
4512
|
type: "button",
|
|
4534
4513
|
className: "dshRemoteAcpRemoveBtn",
|
|
4535
4514
|
disabled,
|
|
4536
|
-
"aria-label": `${t("modelShareRemove")}
|
|
4537
|
-
onClick: () =>
|
|
4515
|
+
"aria-label": `${t("modelShareRemove")}: ${route}`,
|
|
4516
|
+
onClick: () => removeModel(route)
|
|
4538
4517
|
}, t("modelShareRemove"))
|
|
4539
4518
|
)
|
|
4540
4519
|
)),
|
|
4541
|
-
host.
|
|
4520
|
+
host.models.length === 0 ? React.createElement("p", { className: "dshRemoteAcpDiag" }, t("modelShareNoGrants")) : null,
|
|
4542
4521
|
React.createElement(
|
|
4543
4522
|
"div",
|
|
4544
4523
|
{ className: "dshRemoteAcpAddForm" },
|
|
@@ -4550,8 +4529,8 @@ DSH Go \u626B\u7801\u6682\u4E0D\u652F\u6301\u591A\u53F0\u8BBE\u5907\u63A7\u5236\
|
|
|
4550
4529
|
className: "dshRemoteAcpAddTrigger",
|
|
4551
4530
|
disabled: disabled || draftModels.length === 0,
|
|
4552
4531
|
onClick: saveRule
|
|
4553
|
-
}, t(
|
|
4554
|
-
draftModels.length > 0
|
|
4532
|
+
}, t("modelShareAddGrant")),
|
|
4533
|
+
draftModels.length > 0 ? React.createElement("button", {
|
|
4555
4534
|
type: "button",
|
|
4556
4535
|
className: "dshRemoteAcpAddTrigger",
|
|
4557
4536
|
disabled,
|
|
@@ -4604,40 +4583,6 @@ DSH Go \u626B\u7801\u6682\u4E0D\u652F\u6301\u591A\u53F0\u8BBE\u5907\u63A7\u5236\
|
|
|
4604
4583
|
);
|
|
4605
4584
|
})
|
|
4606
4585
|
)
|
|
4607
|
-
),
|
|
4608
|
-
// Collapsible multi-device selection; empty means every peer.
|
|
4609
|
-
React.createElement(
|
|
4610
|
-
"details",
|
|
4611
|
-
{ className: "dshRemoteModelSharePicker" },
|
|
4612
|
-
React.createElement("summary", null, deviceSummaryLine),
|
|
4613
|
-
React.createElement(
|
|
4614
|
-
"div",
|
|
4615
|
-
{ className: "dshRemoteModelSharePickerList", role: "group", "aria-label": t("modelShareDevice") },
|
|
4616
|
-
React.createElement(
|
|
4617
|
-
"label",
|
|
4618
|
-
null,
|
|
4619
|
-
React.createElement("input", {
|
|
4620
|
-
type: "checkbox",
|
|
4621
|
-
checked: draftAnyDevice,
|
|
4622
|
-
disabled,
|
|
4623
|
-
"aria-label": t("modelShareAnyDevice"),
|
|
4624
|
-
onChange: (event) => setDraftAnyDevice(event.target.checked)
|
|
4625
|
-
}),
|
|
4626
|
-
t("modelShareAnyDevice")
|
|
4627
|
-
),
|
|
4628
|
-
...view.peers.map((device) => React.createElement(
|
|
4629
|
-
"label",
|
|
4630
|
-
{ key: `device-${device.deviceId}` },
|
|
4631
|
-
React.createElement("input", {
|
|
4632
|
-
type: "checkbox",
|
|
4633
|
-
checked: draftDevices.includes(device.deviceId),
|
|
4634
|
-
disabled: disabled || draftAnyDevice,
|
|
4635
|
-
"aria-label": label(device),
|
|
4636
|
-
onChange: () => toggleDraftDevice(device.deviceId)
|
|
4637
|
-
}),
|
|
4638
|
-
label(device)
|
|
4639
|
-
))
|
|
4640
|
-
)
|
|
4641
4586
|
)
|
|
4642
4587
|
)
|
|
4643
4588
|
), borrowingRows = React.createElement(
|
|
@@ -4708,7 +4653,7 @@ DSH Go \u626B\u7801\u6682\u4E0D\u652F\u6301\u591A\u53F0\u8BBE\u5907\u63A7\u5236\
|
|
|
4708
4653
|
React.createElement(
|
|
4709
4654
|
"span",
|
|
4710
4655
|
{ className: "dshRemoteAcpSummaryMeta" },
|
|
4711
|
-
React.createElement("span", { className: "dshRemoteAcpCountText" }, String(host.
|
|
4656
|
+
React.createElement("span", { className: "dshRemoteAcpCountText" }, String(host.models.length)),
|
|
4712
4657
|
Chevron(React)
|
|
4713
4658
|
)
|
|
4714
4659
|
),
|
|
@@ -5873,14 +5818,13 @@ DSH Go \u626B\u7801\u6682\u4E0D\u652F\u6301\u591A\u53F0\u8BBE\u5907\u63A7\u5236\
|
|
|
5873
5818
|
sidebarEntrySetting,
|
|
5874
5819
|
resetIdentitySetting,
|
|
5875
5820
|
acpSetting,
|
|
5876
|
-
//
|
|
5877
|
-
//
|
|
5821
|
+
// model-share block inside the options list.
|
|
5822
|
+
// 专用的模型借出/借用配置区块。
|
|
5878
5823
|
React.createElement(ModelSharingSection, {
|
|
5879
5824
|
control: props.control,
|
|
5880
5825
|
t,
|
|
5881
5826
|
available: writable
|
|
5882
5827
|
}),
|
|
5883
|
-
// [model-sharing] END
|
|
5884
5828
|
React.createElement(
|
|
5885
5829
|
"div",
|
|
5886
5830
|
{ className: "dshRemoteAuthorizationSetting" },
|
|
@@ -5972,14 +5916,13 @@ DSH Go \u626B\u7801\u6682\u4E0D\u652F\u6301\u591A\u53F0\u8BBE\u5907\u63A7\u5236\
|
|
|
5972
5916
|
sidebarEntrySetting,
|
|
5973
5917
|
resetIdentitySetting,
|
|
5974
5918
|
acpSetting,
|
|
5975
|
-
//
|
|
5976
|
-
//
|
|
5919
|
+
// model-share block inside the options list.
|
|
5920
|
+
// 专用的模型借出/借用配置区块。
|
|
5977
5921
|
React.createElement(ModelSharingSection, {
|
|
5978
5922
|
control: props.control,
|
|
5979
5923
|
t,
|
|
5980
5924
|
available: writable
|
|
5981
5925
|
}),
|
|
5982
|
-
// [model-sharing] END
|
|
5983
5926
|
React.createElement(
|
|
5984
5927
|
"div",
|
|
5985
5928
|
{ className: "dshRemoteSettingsSignIn" },
|
|
@@ -6028,7 +5971,6 @@ DSH Go \u626B\u7801\u6682\u4E0D\u652F\u6301\u591A\u53F0\u8BBE\u5907\u63A7\u5236\
|
|
|
6028
5971
|
// Browser navigation still targets the Desktop machine until Harness exposes
|
|
6029
5972
|
// a Remote URL resolver. Hide the native guide entry in Remote mode only.
|
|
6030
5973
|
"[data-dsh-remote-message-file]{cursor:pointer}",
|
|
6031
|
-
'html.dshRemoteBrowserUnavailable [data-sidebar-right-guide-entry="browser"]{display:none!important}',
|
|
6032
5974
|
'html.dshRemoteTargetActive button[aria-label="\u6DFB\u52A0\u5DE5\u4F5C\u533A"],html.dshRemoteTargetActive button[aria-label="Add workspace"]{display:none!important}',
|
|
6033
5975
|
'html.dshRemoteCodexTargetActive [data-composer-card] button[aria-haspopup="listbox"][aria-label="\u6307\u4EE4"],html.dshRemoteCodexTargetActive [data-composer-card] button[aria-haspopup="listbox"][aria-label="Commands"]{display:none!important}',
|
|
6034
5976
|
"[data-dsh-remote-hidden-action]{display:none!important}",
|
|
@@ -6093,15 +6035,13 @@ DSH Go \u626B\u7801\u6682\u4E0D\u652F\u6301\u591A\u53F0\u8BBE\u5907\u63A7\u5236\
|
|
|
6093
6035
|
".dshRemoteAcpList{display:flex;flex-direction:column;margin-top:10px;padding-left:16px;border-top:1px solid var(--dsw-alias-border-l3)}.dshRemoteAcpRow{display:flex;flex-direction:column;gap:4px;padding:10px 0}.dshRemoteAcpRow+.dshRemoteAcpRow{border-top:1px solid var(--dsw-alias-border-l3)}.dshRemoteAcpRowMain{display:grid;grid-template-columns:minmax(0,1fr) auto 38px;align-items:center;column-gap:16px;min-width:0}.dshRemoteAcpRowInfo{display:flex;align-items:center;gap:12px;min-width:0}.dshRemoteAcpName{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:500;line-height:1.45;color:var(--dsw-alias-label-primary)}",
|
|
6094
6036
|
'.dshRemoteAcpStatus{display:inline-flex;align-items:center;gap:6px;min-width:0;font-size:12px;font-weight:400;line-height:1.45;color:var(--dsw-alias-label-tertiary);white-space:nowrap}.dshRemoteAcpStatus::before{content:"";width:5px;height:5px;border-radius:50%;background:var(--dsw-alias-label-dimmed);flex:0 0 auto}.dshRemoteAcpStatus.isPassed{color:var(--dsw-alias-label-secondary)}.dshRemoteAcpStatus.isPassed::before{background:var(--dsw-alias-state-success-primary)}.dshRemoteAcpStatus.isFailed{color:var(--dsw-alias-state-danger-primary)}.dshRemoteAcpStatus.isFailed::before{background:var(--dsw-alias-state-danger-primary)}.dshRemoteAcpStatus.isChecking{color:var(--dsw-alias-label-secondary)}.dshRemoteAcpStatus.isChecking::before{background:var(--dsw-alias-brand-primary)}',
|
|
6095
6037
|
".dshRemoteAcpRowActions{display:inline-flex;align-items:center;justify-content:flex-end;gap:4px;justify-self:end}.dshRemoteAcpActionBtn,.dshRemoteAcpRemoveBtn,.dshRemoteAcpAddTrigger{appearance:none;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:5px;height:28px;padding:0 8px;border:0;border-radius:6px;background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:12px;font-weight:500;line-height:1;white-space:nowrap;cursor:pointer;transition:color .14s,background .14s}.dshRemoteAcpActionBtn:hover:not(:disabled){color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}.dshRemoteAcpActionBtn.isConfigure{color:var(--dsw-alias-brand-primary)}.dshRemoteAcpActionBtn.isConfigure:hover:not(:disabled){color:var(--dsw-alias-brand-primary);background:color-mix(in srgb,var(--dsw-alias-brand-primary) 10%,transparent)}.dshRemoteAcpActionBtn:disabled,.dshRemoteAcpRemoveBtn:disabled,.dshRemoteAcpAddTrigger:disabled{opacity:.45;cursor:default}.dshRemoteAcpRemoveBtn{color:var(--dsw-alias-label-tertiary)}.dshRemoteAcpRemoveBtn:hover:not(:disabled){color:var(--dsw-alias-state-danger-primary);background:color-mix(in srgb,var(--dsw-alias-state-danger-primary) 10%,transparent)}",
|
|
6096
|
-
//
|
|
6038
|
+
// the settings section reuses the ACP row classes;
|
|
6097
6039
|
// this selector only adds the select / number controls it introduces.
|
|
6098
6040
|
".dshRemoteAcpAddInputs select,.dshRemoteAcpRowActions input[type=number]{box-sizing:border-box;min-width:0;height:32px;border:1px solid var(--dsw-alias-border-l2);border-radius:7px;background:var(--dsw-alias-bg-layer-3);color:var(--dsw-alias-label-primary);padding:0 10px;font:inherit;font-size:12px}.dshRemoteAcpAddInputs select:focus-visible,.dshRemoteAcpRowActions input[type=number]:focus-visible{border-color:var(--dsw-alias-brand-primary);outline:none}.dshRemoteAcpRowActions input[type=number]{width:72px;text-align:center}",
|
|
6099
|
-
// [model-sharing] END
|
|
6100
6041
|
".dshRemoteAcpDiag{margin:0;font-size:12px;line-height:1.45;color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere}.dshRemoteAcpAddTrigger{margin-top:6px;margin-left:8px;align-self:flex-start;color:var(--dsw-alias-label-tertiary)}.dshRemoteAcpAddTrigger:hover:not(:disabled){color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}.dshRemoteAcpAddForm{margin-top:8px;padding:12px 0 2px 16px;border-top:1px solid var(--dsw-alias-border-l3)}.dshRemoteAcpAddInputs{display:grid;grid-template-columns:minmax(90px,.85fr) minmax(130px,1.15fr) minmax(90px,.9fr) auto auto;gap:8px;align-items:center}.dshRemoteAcpAddInputs input{box-sizing:border-box;width:100%;min-width:0;height:32px;border:1px solid var(--dsw-alias-border-l2);border-radius:7px;background:var(--dsw-alias-bg-layer-3);color:var(--dsw-alias-label-primary);padding:0 10px;font:inherit;font-size:12px}.dshRemoteAcpAddInputs input:focus-visible{border-color:var(--dsw-alias-brand-primary);outline:none}.dshRemoteAcpAddInputs button{box-sizing:border-box;height:32px;border:1px solid var(--dsw-alias-border-l2);border-radius:7px;background:transparent;color:var(--dsw-alias-label-primary);padding:0 12px;cursor:pointer;font:inherit;font-size:12px;font-weight:500;white-space:nowrap;transition:border-color .15s,background .15s}.dshRemoteAcpAddInputs button.isGhost{border-color:transparent;color:var(--dsw-alias-label-tertiary)}.dshRemoteAcpAddInputs button:hover:not(:disabled){border-color:var(--dsw-alias-label-dimmed);background:var(--dsw-alias-interactive-bg-hover)}.dshRemoteAcpAddInputs button.isGhost:hover:not(:disabled){border-color:transparent;color:var(--dsw-alias-label-primary)}.dshRemoteAcpAddInputs button:disabled{opacity:.45;cursor:default}@media(prefers-reduced-motion:reduce){.dshRemoteAcpChevron{transition:none}}",
|
|
6101
|
-
//
|
|
6042
|
+
// collapsible checkbox pickers and grant rows inside
|
|
6102
6043
|
// the model-share settings section; everything else reuses dshRemoteAcp*.
|
|
6103
6044
|
'.dshRemoteModelSharePicker{margin:8px 0 0 8px;font-size:12px;color:var(--dsw-alias-label-tertiary)}.dshRemoteModelSharePicker>summary{display:inline-flex;align-items:center;gap:6px;cursor:pointer;list-style:none;user-select:none;color:var(--dsw-alias-label-secondary);line-height:1.45;overflow-wrap:anywhere}.dshRemoteModelSharePicker>summary::-webkit-details-marker{display:none}.dshRemoteModelSharePicker>summary::before{content:"\u25B8";font-size:10px;transition:transform .15s ease-out}.dshRemoteModelSharePicker[open]>summary::before{transform:rotate(90deg)}.dshRemoteModelSharePicker>summary:hover{color:var(--dsw-alias-label-primary)}.dshRemoteModelSharePickerList{display:flex;flex-direction:column;gap:4px;margin:8px 0 0;padding:8px 10px;border:1px solid var(--dsw-alias-border-l2);border-radius:7px;background:var(--dsw-alias-bg-layer-3);max-height:180px;overflow-y:auto}.dshRemoteModelSharePickerList label{display:flex;align-items:center;gap:8px;min-width:0;font-size:12px;line-height:1.4;color:var(--dsw-alias-label-primary);cursor:pointer;overflow-wrap:anywhere}.dshRemoteModelSharePickerList input[type=checkbox]{flex:0 0 auto;margin:0;accent-color:var(--dsw-alias-brand-primary);cursor:pointer}.dshRemoteModelSharePickerList input[type=checkbox]:disabled{cursor:default;opacity:.5}.dshRemoteModelSharePickerList label:has(input:disabled){color:var(--dsw-alias-label-tertiary)}.dshRemoteModelShareGrantEntry{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:6px 0 0 8px;font-size:12px;line-height:1.45;color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere}.dshRemoteModelShareGrantEntry>span{min-width:0}.dshRemoteModelShareGrantEntry .dshRemoteAcpRemoveBtn{flex:0 0 auto}@media(prefers-reduced-motion:reduce){.dshRemoteModelSharePicker>summary::before{transition:none}}',
|
|
6104
|
-
// [model-sharing] END
|
|
6105
6045
|
".dshRemoteCancelWorkspace{min-height:36px;border:0;background:transparent;color:var(--dsw-alias-label-secondary);padding:6px 0;cursor:pointer}.dshRemoteCancelWorkspace:hover:not(:disabled){color:var(--dsw-alias-label-primary);text-decoration:underline}.dshRemoteCancelWorkspace:disabled{opacity:.5;cursor:default}",
|
|
6106
6046
|
".dshRemoteHostLoading{display:flex;align-items:center;justify-content:center;gap:8px;position:absolute;left:50%;transform:translateX(-50%);white-space:nowrap;color:var(--dsw-alias-label-secondary)}",
|
|
6107
6047
|
'.dshRemoteHostList{display:flex;flex-direction:column;border-top:1px solid var(--dsw-alias-border-l2);max-height:296px;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}.dshRemoteHostList.isCollapsed{max-height:none;overflow-y:visible}.dshRemoteHostList>button{min-height:58px;flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:16px;text-align:left;border:0;border-bottom:1px solid var(--dsw-alias-border-l2);background:transparent;padding:10px 20px 10px 4px;cursor:pointer}.dshRemoteHostList>button:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.dshRemoteHostList>button:disabled{opacity:.5;cursor:default}.dshRemoteHostList>button[aria-current="true"]{background:var(--dsw-alias-interactive-bg-hover)}.dshRemoteHostList>button>span{min-width:0;display:flex;flex-direction:column;gap:3px}.dshRemoteHostList>button strong{font-size:14px;font-weight:500}.dshRemoteHostList small{color:var(--dsw-alias-label-secondary);font-size:12px}',
|
|
@@ -6113,7 +6053,7 @@ DSH Go \u626B\u7801\u6682\u4E0D\u652F\u6301\u591A\u53F0\u8BBE\u5907\u63A7\u5236\
|
|
|
6113
6053
|
".dshRemotePage.hasSelectedHost>.dshRemotePageHeader{flex-shrink:0}.dshRemotePage.hasSelectedHost>.dshRemotePageBody{min-height:0;overflow:hidden}.dshRemotePage.hasSelectedHost .dshRemotePageBody>button,.dshRemotePage.hasSelectedHost .dshRemotePageBody>p{flex-shrink:0}.dshRemotePage.hasSelectedHost .dshRemoteBrowser{min-height:0;flex:1 1 auto}.dshRemoteBrowser>.dshRemoteWorkspaceHeading{flex-shrink:0}.dshRemoteWorkspaceLists,.dshRemoteFolderBrowser{min-height:0;overflow:auto;overscroll-behavior:contain;flex:1 1 auto}",
|
|
6114
6054
|
".dshRemoteDirectoryList{min-height:72px;display:flex;flex-direction:column;border-top:1px solid var(--dsw-alias-border-l2)}.dshRemoteDirectoryList>button{min-height:52px;display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:10px;text-align:left;border:0;border-bottom:1px solid var(--dsw-alias-border-l2);background:transparent;padding:8px 4px;cursor:pointer}.dshRemoteDirectoryList>button:hover,.dshRemoteDirectoryList>button.isSelected{background:var(--dsw-alias-interactive-bg-hover)}.dshRemoteDirectoryList>button.isSelected{color:var(--dsw-alias-label-primary)}.dshRemoteDirectoryList>button>span:first-child,.dshRemoteDirectoryList>button>.dshRemoteWorkspaceIcon{grid-row:1/3}.dshRemoteWorkspaceIcon{box-sizing:border-box;width:22px;height:22px;align-self:center;object-fit:contain}.dshRemoteWorkspaceIcon.isGpt{border-radius:6px}.dshRemoteDirectoryList>button>span:not(:first-child),.dshRemoteDirectoryList>button>small{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dshRemoteDirectoryList>button>small{grid-column:2;color:var(--dsw-alias-label-secondary)}.dshRemoteDirectoryList>p,.dshRemoteHint{margin:12px 0;color:var(--dsw-alias-label-secondary);font-size:13px}",
|
|
6115
6055
|
".dshRemoteAddWorkspace{box-sizing:border-box;width:40px;height:40px;display:inline-grid;place-items:center;flex:0 0 auto;border:0;border-radius:8px;background:transparent;color:var(--dsw-alias-label-secondary);padding:0;cursor:pointer}.dshRemoteAddWorkspace:hover:not(:disabled){color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}.dshRemoteAddWorkspace:disabled{opacity:.5;cursor:default}.dshRemoteAddWorkspaceIcon{width:20px;height:20px}.dshRemoteCodexWorkspaceGroup{margin-top:16px}.dshRemoteWorkspaceSourceHeading{min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 4px 7px}.dshRemoteWorkspaceSourceText{min-width:0;display:flex;flex-direction:column;gap:2px}.dshRemoteWorkspaceSourceText>strong{font-size:13px}.dshRemoteWorkspaceSourceText>small{color:var(--dsw-alias-label-secondary);font-size:11px}.dshRemoteCodexWorkspaceList{min-height:0}.dshRemoteDirectoryList>.dshRemoteWorkspaceMore,.dshRemoteCodexWorkspaceGroup>.dshRemoteWorkspaceMore{box-sizing:border-box;width:100%;min-height:48px;display:flex;align-items:center;justify-content:center;border:0;border-bottom:1px solid var(--dsw-alias-border-l2);background:transparent;color:var(--dsw-alias-label-secondary);padding:8px 4px;text-align:center;font-size:16px;cursor:pointer}.dshRemoteWorkspaceMore>span{display:block;line-height:1;transform:translateY(-2px)}.dshRemoteWorkspaceMore:hover:not(:disabled){color:var(--dsw-alias-label-primary);background:transparent}.dshRemoteWorkspaceMore:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px}.dshRemoteWorkspaceMore:disabled{opacity:.5;cursor:default}",
|
|
6116
|
-
".
|
|
6056
|
+
".dshRemoteDevelopmentSettings{width:100%;margin:0}.dshRemoteDevelopmentSettings .dshRemotePathField{display:flex;flex-direction:column;gap:6px;margin:8px 0}.dshRemoteDevelopmentSettings .dshRemotePathField>label{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:500;line-height:1.5}.dshRemoteDevelopmentSettings .dshRemoteDevelopmentSettings .dshRemoteDevelopmentSettings ",
|
|
6117
6057
|
".dshRemoteFolderBrowser{margin-top:14px}.dshRemoteFolderBrowser>p,.dshRemoteFolderList>p{margin:12px 0;color:var(--dsw-alias-label-secondary);font-size:13px}.dshRemoteFolderList{max-height:260px;overflow:auto;border-block:1px solid var(--dsw-alias-border-l2)}.dshRemoteFolderList>button{width:100%;min-height:42px;display:flex;align-items:center;gap:9px;border:0;border-bottom:1px solid var(--dsw-alias-border-l2);background:transparent;padding:7px 6px;text-align:left;cursor:pointer}.dshRemoteFolderList>button:hover{background:var(--dsw-alias-interactive-bg-hover)}.dshRemoteFolderBrowser>small{display:block;margin-top:8px;color:var(--dsw-alias-state-warn-label)}",
|
|
6118
6058
|
".dshRemotePathField{display:flex;flex-direction:column;gap:6px;margin-top:20px}.dshRemotePathField>span{font-size:13px;font-weight:600}.dshRemotePathField>input{min-height:40px;border:1px solid var(--dsw-alias-border-l2);border-radius:8px;background:var(--dsw-alias-bg-layer-3);color:inherit;padding:0 12px;font:inherit}.dshRemotePathField>small{color:var(--dsw-alias-label-secondary)}",
|
|
6119
6059
|
".dshRemoteOpenBar{flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:20px;padding:14px 0;background:var(--dsw-alias-bg-layer-1);border-top:1px solid var(--dsw-alias-border-l2)}.dshRemotePathBar{display:flex;gap:8px;margin-bottom:8px}.dshRemotePathBar button{flex:none;color:inherit;background:transparent;border:1px solid var(--dsw-alias-border-l2);border-radius:6px;padding:0 12px;cursor:pointer}.dshRemotePathBar input{flex:1;min-height:40px;min-width:0;width:100%;box-sizing:border-box;color:inherit;background:transparent;border:1px solid var(--dsw-alias-border-l2);border-radius:6px;padding:7px 9px}.dshRemoteOpenBar>div{min-width:0;display:flex;flex-direction:column;gap:3px}.dshRemoteOpenBar span{color:var(--dsw-alias-label-secondary);font-size:12px}.dshRemoteOpenBar strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.dshRemoteOpenBar>button,.dshRemoteEnable>button{min-height:40px;flex:0 0 auto;border:0;border-radius:8px;background:var(--dsw-alias-label-primary);color:var(--dsw-alias-bg-layer-1);padding:8px 16px;cursor:pointer}.dshRemoteOpenBar>button:disabled,.dshRemoteEnable>button:disabled{opacity:.5;cursor:default}",
|
|
@@ -6168,7 +6108,7 @@ DSH Go \u626B\u7801\u6682\u4E0D\u652F\u6301\u591A\u53F0\u8BBE\u5907\u63A7\u5236\
|
|
|
6168
6108
|
".dshRemoteSettingsFooter{border-top:1px solid var(--dsw-alias-border-l2);display:flex;justify-content:flex-end;align-items:center;gap:12px;padding:14px 0 4px}.dshRemoteSettingsFooter .dshRemoteError,.dshRemoteNotice{min-width:0;flex:1;margin:0;font-size:12px;line-height:1.5}.dshRemoteNotice{color:var(--dsw-alias-label-tertiary)}.dshRemoteDiscard,.dshRemoteSave{appearance:none;box-sizing:border-box;font:inherit;cursor:pointer;border:1px solid transparent;border-radius:7px;padding:5px 14px;font-size:12.5px;font-weight:500;line-height:1.5;transition:color .15s,border-color .15s,background .15s}.dshRemoteDiscard{border-color:var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);background:transparent}.dshRemoteDiscard:hover:not(:disabled){color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-dimmed);background:var(--dsw-alias-interactive-bg-hover)}.dshRemoteSave{background:var(--dsw-alias-label-primary);color:var(--dsw-alias-bg-layer-3)}.dshRemoteDiscard:disabled,.dshRemoteSave:disabled{opacity:.4;cursor:default}.dshRemoteDiscard:focus-visible,.dshRemoteSave:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}",
|
|
6169
6109
|
'.dshRemoteDebugLogGroup{border-top:1px solid var(--dsw-alias-border-l2);padding:14px 0}.dshRemoteDevelopmentSettings>.dshRemoteDebugLogGroup:first-child{border-top:0}.dshRemoteError+.dshRemoteDevelopmentSettings>.dshRemoteDebugLogGroup:first-child{border-top:1px solid var(--dsw-alias-border-l2)}.dshRemoteDebugLogHeader{display:flex;align-items:center;justify-content:space-between;gap:24px}.dshRemoteDebugLogTrigger{appearance:none;border:0;border-radius:6px;background:transparent;padding:0;margin:0;text-align:left;color:inherit;font:inherit;cursor:pointer;min-width:0;flex:1;white-space:normal}.dshRemoteDebugLogTrigger:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:4px;border-radius:6px}.dshRemoteDebugLogTitleRow{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.dshRemoteDebugLogTitleRow strong{font-size:13px;font-weight:500;line-height:1.45;color:var(--dsw-alias-label-primary)}.dshRemoteDebugLogTrigger p{max-width:58ch;margin:4px 0 0;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.45;white-space:normal}.dshRemoteDebugLogLevelBadge{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;font-weight:500;line-height:1.45;color:var(--dsw-alias-label-tertiary)}.dshRemoteDebugLogLevelBadge::before{content:"";width:5px;height:5px;border-radius:50%;background:var(--dsw-alias-label-dimmed);flex:0 0 auto}.dshRemoteDebugLogLevelBadge.isDebug{color:var(--dsw-alias-label-secondary)}.dshRemoteDebugLogLevelBadge.isDebug::before{background:var(--dsw-alias-state-success-primary)}.dshRemoteDebugLogControls{display:flex;align-items:center;gap:10px;flex:0 0 auto}',
|
|
6170
6110
|
'.dshRemoteLogToggleBtn,.dshRemoteLogActionBtn,.dshRemoteLogFilterBtn{appearance:none;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:4px;font:inherit;cursor:pointer;border:1px solid var(--dsw-alias-border-l2);border-radius:7px;background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-secondary);min-height:28px;padding:0 10px;font-size:12px;font-weight:500;line-height:1;white-space:nowrap;transition:color .14s,border-color .14s,background .14s}.dshRemoteLogToggleBtn{border-color:transparent;background:transparent;padding:0 8px}.dshRemoteLogToggleChevron{flex:0 0 auto;transition:transform .18s ease-out}.dshRemoteLogToggleBtn[aria-expanded="true"] .dshRemoteLogToggleChevron{transform:rotate(180deg)}.dshRemoteLogToggleBtn:hover:not(:disabled){color:var(--dsw-alias-label-primary);border-color:transparent;background:var(--dsw-alias-interactive-bg-hover)}.dshRemoteLogActionBtn:hover:not(:disabled),.dshRemoteLogFilterBtn:hover:not(:disabled){color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-dimmed);background:var(--dsw-alias-interactive-bg-hover)}.dshRemoteLogToggleBtn:disabled,.dshRemoteLogActionBtn:disabled,.dshRemoteLogFilterBtn:disabled{opacity:.45;cursor:default}.dshRemoteLogFilterBtn.isActive{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-3);border-color:var(--dsw-alias-label-secondary);font-weight:500}.dshRemoteLogDrawer{margin-top:12px;padding:12px;border:1px solid var(--dsw-alias-border-l2);border-radius:10px;background:var(--dsw-alias-bg-layer-2,var(--dsw-alias-bg-layer-1));display:flex;flex-direction:column;gap:8px}.dshRemoteLogToolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.dshRemoteLogFilterGroup,.dshRemoteLogActions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.dshRemoteLogMeta{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:11px;color:var(--dsw-alias-label-tertiary);line-height:1.4}.dshRemoteLogMeta code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere}.dshRemoteLogFallback{color:var(--dsw-alias-state-warn-primary)}.dshRemoteLogViewport{box-sizing:border-box;width:100%;max-height:260px;min-height:120px;overflow:auto;padding:10px 12px;border:1px solid var(--dsw-alias-border-l2);border-radius:8px;background:var(--dsw-alias-bg-layer-3);font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11.5px;line-height:1.55;margin:0;white-space:pre-wrap;overflow-wrap:break-word;word-break:normal}.dshRemoteLogLine{display:block;color:var(--dsw-alias-label-primary);margin-bottom:3px}.dshRemoteLogLine:last-child{margin-bottom:0}.dshRemoteLogLine.isDebug{color:var(--dsw-alias-label-tertiary)}.dshRemoteLogLine.isWarn{color:var(--dsw-alias-state-warn-primary)}.dshRemoteLogLine.isError{color:var(--dsw-alias-state-error-primary)}.dshRemoteLogEmpty{color:var(--dsw-alias-label-tertiary);font-size:12px;margin:0;padding:16px 0;text-align:center}',
|
|
6171
|
-
"@media(max-width:620px){.dshRemotePluginCardStatus{display:none}.dshRemoteSettingsTop{gap:10px}.dshRemoteAssociation{grid-template-columns:1fr}.dshRemoteAssociation p{grid-column:1;grid-row:3}.dshRemoteHostIdentity{grid-template-columns:1fr}.dshRemoteConnection{align-items:flex-start}.dshRemoteReconnect{min-height:36px}.
|
|
6111
|
+
"@media(max-width:620px){.dshRemotePluginCardStatus{display:none}.dshRemoteSettingsTop{gap:10px}.dshRemoteAssociation{grid-template-columns:1fr}.dshRemoteAssociation p{grid-column:1;grid-row:3}.dshRemoteHostIdentity{grid-template-columns:1fr}.dshRemoteConnection{align-items:flex-start}.dshRemoteReconnect{min-height:36px}.dshRemoteAcpList{padding-left:8px}.dshRemoteAcpRowMain{column-gap:10px}.dshRemoteAcpAddInputs{grid-template-columns:1fr}.dshRemoteAcpAddInputs button{min-height:36px}}"
|
|
6172
6112
|
].join(""), pageDocument.head.append(style), () => style.remove();
|
|
6173
6113
|
}
|
|
6174
6114
|
function installTerminalAvailabilityNotice(feed, t) {
|
|
@@ -8353,6 +8293,40 @@ DSH Go \u626B\u7801\u6682\u4E0D\u652F\u6301\u591A\u53F0\u8BBE\u5907\u63A7\u5236\
|
|
|
8353
8293
|
};
|
|
8354
8294
|
}
|
|
8355
8295
|
|
|
8296
|
+
// packages/plugin/src/client/workspace-download.ts
|
|
8297
|
+
init_page_globals();
|
|
8298
|
+
function installWorkspaceDownload(menus, status, control, t) {
|
|
8299
|
+
let disposers = ["file", "image"].map((target) => menus.register({
|
|
8300
|
+
id: `ds-harness-remote.workspace-download.${target}`,
|
|
8301
|
+
target,
|
|
8302
|
+
order: 190,
|
|
8303
|
+
resolve: ({ sessionId, path }) => {
|
|
8304
|
+
let current = status.getSnapshot();
|
|
8305
|
+
if (!sessionId || !path || current?.mode !== "remote" || current.backend !== "harness" || current.connected !== !0 || !current.binaryWorkspaceDownload) return [];
|
|
8306
|
+
let targetDeviceId = current.connectedTargetDeviceId;
|
|
8307
|
+
return targetDeviceId ? [{
|
|
8308
|
+
id: "download-original",
|
|
8309
|
+
label: t("downloadRemoteOriginal"),
|
|
8310
|
+
failureLabel: t("downloadRemoteOriginalFailed"),
|
|
8311
|
+
run: async () => {
|
|
8312
|
+
let { ticket } = await control("workspace.download.ticket", { sessionId, path, targetDeviceId });
|
|
8313
|
+
if (!/^[0-9a-f-]{36}$/u.test(ticket)) throw new Error2(t("downloadRemoteOriginalFailed"));
|
|
8314
|
+
let a = pageDocument.createElement("a");
|
|
8315
|
+
a.href = new URL(`ds-harness-remote/workspace.download/${ticket}`, pageDocument.baseURI).href, a.download = "", a.referrerPolicy = "no-referrer", pageDocument.body.append(a);
|
|
8316
|
+
try {
|
|
8317
|
+
a.click();
|
|
8318
|
+
} finally {
|
|
8319
|
+
a.remove();
|
|
8320
|
+
}
|
|
8321
|
+
}
|
|
8322
|
+
}] : [];
|
|
8323
|
+
}
|
|
8324
|
+
}));
|
|
8325
|
+
return () => {
|
|
8326
|
+
for (let dispose of disposers) dispose();
|
|
8327
|
+
};
|
|
8328
|
+
}
|
|
8329
|
+
|
|
8356
8330
|
// packages/plugin/src/client/message-file-preview.ts
|
|
8357
8331
|
init_page_globals();
|
|
8358
8332
|
|
|
@@ -8690,14 +8664,10 @@ DSH Go \u626B\u7801\u6682\u4E0D\u652F\u6301\u591A\u53F0\u8BBE\u5907\u63A7\u5236\
|
|
|
8690
8664
|
() => installRemoteUploadCarrier(service, statusFeed, originalPluginFetch.bind(page), pageDocument.baseURI, t),
|
|
8691
8665
|
"ds-harness-remote: attachment upload carrier"
|
|
8692
8666
|
);
|
|
8693
|
-
}), ctx.effect(() => () => statusFeed.close(), "ds-harness-remote: status stream"), ctx.effect(() => {
|
|
8694
|
-
let
|
|
8695
|
-
|
|
8696
|
-
|
|
8697
|
-
return () => {
|
|
8698
|
-
unsubscribe(), pageDocument.documentElement.classList.remove("dshRemoteBrowserUnavailable");
|
|
8699
|
-
};
|
|
8700
|
-
}, "ds-harness-remote: hide local browser entry in remote mode"), ctx.effect(() => subscribeRemoteRecovery(statusFeed, () => ctx.connection.reconnect?.()), "ds-harness-remote: carrier recovery"), ctx.inject(["uiConversation", "sidebarRight"], (previewContext) => {
|
|
8667
|
+
}), ctx.effect(() => () => statusFeed.close(), "ds-harness-remote: status stream"), ctx.effect(() => subscribeRemoteRecovery(statusFeed, () => ctx.connection.reconnect?.()), "ds-harness-remote: carrier recovery"), isHostcTunnel || ctx.inject(["contextMenus"], (menuContext) => {
|
|
8668
|
+
let menus = menuContext.get("contextMenus");
|
|
8669
|
+
typeof menus?.register == "function" && menuContext.effect(() => installWorkspaceDownload(menus, statusFeed, control, t), "ds-harness-remote: stream original files");
|
|
8670
|
+
}), ctx.inject(["uiConversation", "sidebarRight"], (previewContext) => {
|
|
8701
8671
|
let conversation = previewContext.get("uiConversation"), sidebar = previewContext.get("sidebarRight");
|
|
8702
8672
|
typeof conversation?.binding != "function" || typeof sidebar?.openResource != "function" || previewContext.effect(() => installMessageFilePreview(statusFeed, conversation, sidebar), "ds-harness-remote: message file preview");
|
|
8703
8673
|
}), ctx.effect(() => {
|
|
@@ -8873,8 +8843,8 @@ DSH Go \u626B\u7801\u6682\u4E0D\u652F\u6301\u591A\u53F0\u8BBE\u5907\u63A7\u5236\
|
|
|
8873
8843
|
}, RemoteWorkspaceAction)), ctx.slots.inject("plugins.row.config", () => ctx.slots.register({
|
|
8874
8844
|
name: "plugins.row.config",
|
|
8875
8845
|
// [fork-identity] BEGIN — row slot key must carry the scoped fork name.
|
|
8876
|
-
//
|
|
8877
|
-
//
|
|
8846
|
+
// The key must match the installed package name; the host resolves slot
|
|
8847
|
+
// ownership by it.
|
|
8878
8848
|
key: `${clientModuleId}#ds-harness-remote`,
|
|
8879
8849
|
// [fork-identity] END
|
|
8880
8850
|
locale: localeNamespace,
|