@deepseek-ai/dsh-client-ui-settings-general 0.1.6-alpha.2 → 0.1.7-alpha.1
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.i18n.yaml +2 -2
- package/README.md +17 -6
- package/README.zh.md +17 -6
- package/lib/client.js +166 -36
- package/lib/index.js +8 -8
- package/lib/types/client/CurrentVersionRow.d.ts +9 -0
- package/lib/types/client/DesktopUpdateIndicator.d.ts +1 -1
- package/lib/types/client/DeveloperToolsRow.d.ts +16 -0
- package/lib/types/client/desktop-update-source.d.ts +1 -1
- package/lib/types/client/locales.d.ts +8 -0
- package/lib/types/client/shell-contract.d.ts +2 -2
- package/lib/types/index.d.ts +16 -3
- package/lib/types/{client/desktop-update-bridge.d.ts → types.d.ts} +2 -2
- package/package.json +20 -17
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/client/ui-settings-general/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 266fe837899f13d33e7a098b901cc34402da765e
|
|
6
|
+
README.zh.md: 09570948b89089dda33d6705e4f17c7cd2f8481c
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
|
|
|
9
9
|
|
|
10
10
|
## Summary
|
|
11
11
|
|
|
12
|
-
Use this package to give the dsh web client a Settings panel, connection-recovery control, feature-contributed navigation, and sequential first-run onboarding. Users can open it from the sidebar, retry a failed connection immediately, and access a local configuration file when the Host makes one available on a loopback browser. Feature packages supply their own settings rows, sections, and onboarding steps; this package supplies their shared presentation and
|
|
12
|
+
Use this package to give the dsh web client a Settings panel, connection-recovery control, feature-contributed navigation, and sequential first-run onboarding. Users can open it from the sidebar, retry a failed connection immediately, and access a local configuration file when the Host makes one available on a loopback browser. Feature packages supply their own settings rows, sections, and onboarding steps; this package supplies their shared presentation and the Developer tools switch without adding onboarding copy.
|
|
13
13
|
|
|
14
14
|
## Table of Contents
|
|
15
15
|
|
|
@@ -22,16 +22,24 @@ Use this package to give the dsh web client a Settings panel, connection-recover
|
|
|
22
22
|
|
|
23
23
|
-----
|
|
24
24
|
|
|
25
|
+
The Settings panel uses a shared 760 × 500 layout, bounded by the viewport. Longer sections scroll inside the content column; the Account entry uses the account icon.
|
|
26
|
+
|
|
25
27
|
<a id="use-this-package"></a>
|
|
26
28
|
## Use this package
|
|
27
29
|
|
|
28
|
-
Users reach the shell through the sidebar's bottom Settings control; feature plugins contribute their pages and onboarding steps through the slot ledgers this shell projects. In both the expanded sidebar and collapsed rail, the control exposes the localized Settings label as its accessible name. A pale-yellow **Disconnected** action beside Settings indicates browser offline suspension; its permanent retry glyph marks the retry action, which the Chinese outage copy also names (连接异常,刷新重试). Every recovery attempt shows
|
|
30
|
+
Users reach the shell through the sidebar's bottom Settings control; feature plugins contribute their pages and onboarding steps through the slot ledgers this shell projects. In both the expanded sidebar and collapsed rail, the control exposes the localized Settings label as its accessible name. A pale-yellow **Disconnected** action beside Settings indicates browser offline suspension; its permanent retry glyph marks the retry action, which the Chinese outage copy also names (连接异常,刷新重试). Every recovery attempt shows the shared ongoing loader beside **Reconnecting** with one to three dots advancing every 500ms, and an attempt stays visible for at least 800ms so brief retries do not flicker. Selecting either yellow state starts an immediate retry; press feedback stays within the warning palette. Recovery changes the region to pale-green **Connected** for two seconds from the moment the green pill becomes visible. The pill fades in on appearance, fades out over 150ms on removal, and sizes to its current label. Initial startup and uninterrupted healthy operation remain silent. The shell renders the modal panel, the navigation built from `settings.section` entries, and exactly one mounted onboarding step at a time.
|
|
31
|
+
|
|
32
|
+
When the section navigation exceeds the panel's available height, the list scrolls independently of the settings content and keeps the Settings title fixed.
|
|
29
33
|
|
|
30
34
|
In Desktop, the account-row update control shows availability, progress, verification, readiness, and persistent retry feedback. The preload carries semantic phase, version, progress, and classified failures; the component resolves every visible and accessible string from the active `settings` locale, including after an in-application language change. Selecting an available update starts downloading; installation requires a separate shell-owned confirmation. A collapsed sidebar shows the same status as a dot on its top expand button. Connection feedback takes priority except during shell-reported installation, when the expected backend disconnect must not hide update status. Failure restores connection feedback. Both controls share one carrier subscription; browser code cannot choose packages or authorize installation. [Desktop updates](../../../apps/desktop/README.md) owns the release workflow.
|
|
31
35
|
|
|
32
36
|
### The General section
|
|
33
37
|
|
|
34
|
-
The
|
|
38
|
+
The current release version appears at the bottom of General Settings in Web and Desktop, using the build’s `DSH_CLIENT_VERSION` metadata and the active language. Partial builds without version metadata omit the row.
|
|
39
|
+
|
|
40
|
+
The Developer tools switch controls the shared preference described by [ui-settings](../ui-settings/README.md#use-this-package). It is available in both Web and desktop, follows accepted changes immediately, and disables duplicate input while a write settles. A failed write displays localized retry guidance.
|
|
41
|
+
|
|
42
|
+
The General section holds the built-in Developer tools and Current version rows alongside rows registered into `settings.general.item` by feature packages. Each registrant owns its row copy and behavior. The Appearance row, for example, lives in ui-theme.
|
|
35
43
|
|
|
36
44
|
### Opening the configuration file
|
|
37
45
|
|
|
@@ -46,10 +54,12 @@ The onboarding ledger projects in ascending order and mounts exactly one step at
|
|
|
46
54
|
<a id="understand-the-implementation"></a>
|
|
47
55
|
## Understand the implementation
|
|
48
56
|
|
|
57
|
+
The shell declares settings.launcher for an account-owned sidebar menu and retains the Settings button as its fallback. Closing the dialog returns focus to the active launcher.
|
|
58
|
+
|
|
49
59
|
<details>
|
|
50
60
|
<summary>Implementation internals — click to expand</summary>
|
|
51
61
|
|
|
52
|
-
The shell owns the chrome and the projections;
|
|
62
|
+
The shell owns the chrome and the projections; it contributes the Developer tools and Current version rows, while feature registrants own their additional content and copy.
|
|
53
63
|
|
|
54
64
|
### Ledger projections
|
|
55
65
|
|
|
@@ -65,7 +75,7 @@ On a loopback page, the Client loads the provider's `hasDocument` capability thr
|
|
|
65
75
|
|
|
66
76
|
### Host half
|
|
67
77
|
|
|
68
|
-
The Host half
|
|
78
|
+
The Host half declares `welcomeNoticeVersion` as a volatile field of the `ui-settings-general` entry Config. The welcome step contributed by ui-settings-models reads and writes its `welcomeNoticeVersion` through the existing public settings boundary; the shell itself remains policy-free.
|
|
69
79
|
|
|
70
80
|
</details>
|
|
71
81
|
|
|
@@ -100,7 +110,8 @@ None; this package neither assembles nor sends a provider request.
|
|
|
100
110
|
|
|
101
111
|
These limits define what the shell itself provides versus what features must supply; they are current package constraints.
|
|
102
112
|
|
|
103
|
-
- **
|
|
113
|
+
- **Additional General rows require their feature plugins** — the shell supplies Developer tools and Current version; feature plugins supply the remaining preferences.
|
|
114
|
+
- **The Windows caption badge keeps a side-opening bubble** — `DesktopUpdateBadge` occupies `sidebar.toggle.badge` in the caption and requests `side="right"`, so the Desktop-owned menu text can cover its bubble while the sidebar is collapsed on Windows; the sidebar toggle and New Session bubbles open below the caption instead (#4688).
|
|
104
115
|
|
|
105
116
|
<a id="dev-note"></a>
|
|
106
117
|
### Dev Note
|
package/README.zh.md
CHANGED
|
@@ -9,7 +9,7 @@ kind: "package-reference"
|
|
|
9
9
|
|
|
10
10
|
## 概述
|
|
11
11
|
|
|
12
|
-
使用本包可为 dsh Web 客户端提供 Settings
|
|
12
|
+
使用本包可为 dsh Web 客户端提供 Settings 面板、连接恢复控件、由功能包贡献的导航,以及依次进行的首次运行引导。用户可以从侧边栏打开面板、立即重试失败的连接,并在宿主为回环浏览器提供本地配置文件时访问该文件。各功能包提供自己的设置行、分区和引导步骤;本包提供共享的界面展示和开发者工具开关,但不添加引导文案。
|
|
13
13
|
|
|
14
14
|
## 目录
|
|
15
15
|
|
|
@@ -22,16 +22,24 @@ kind: "package-reference"
|
|
|
22
22
|
|
|
23
23
|
-----
|
|
24
24
|
|
|
25
|
+
设置面板采用各页面共享的 760 × 500 布局,并受视口大小约束。较长的页面在内容栏内部滚动;账号入口使用账号图标。
|
|
26
|
+
|
|
25
27
|
<a id="use-this-package"></a>
|
|
26
28
|
## 使用本包
|
|
27
29
|
|
|
28
|
-
用户通过侧边栏底部的 Settings 控件进入外壳;功能插件通过本外壳所投影的 slot 账本贡献自己的页面与引导步骤。在展开侧边栏和收起轨道中,该控件都会把本地化的 Settings 文案作为其可访问名称。Settings
|
|
30
|
+
用户通过侧边栏底部的 Settings 控件进入外壳;功能插件通过本外壳所投影的 slot 账本贡献自己的页面与引导步骤。在展开侧边栏和收起轨道中,该控件都会把本地化的 Settings 文案作为其可访问名称。Settings 右侧浅黄色的**连接异常**操作表示浏览器离线暂停;其常驻重试图形与中文文案「连接异常,刷新重试」都指明重试动作。每次恢复尝试都显示共享 ongoing loading 加**重新连接中**,其后一至三个点每 500ms 前进一次,且每次尝试至少可见 800ms,短暂重试不会闪动。选中任一黄色状态都会立即发起重试;按压反馈留在黄色色阶内。恢复后该区域变为浅绿色的**连接成功**,从绿色药丸可见起驻留 2 秒再消失。药丸出现时淡入、移除时以 150ms 淡出,宽度随当前文案自适应。首次启动与未曾中断的健康连接保持静默。外壳渲染模态面板、由 `settings.section` 条目构建的导航,以及每次只挂载一个的引导步骤。
|
|
31
|
+
|
|
32
|
+
当分区导航超出面板可用高度时,列表独立于设置内容滚动,并保持「设置」标题固定。
|
|
29
33
|
|
|
30
34
|
在 Desktop 中,账户行更新控件显示可用版本、进度、验证、就绪和持久重试反馈。预加载仅传递语义化阶段、版本、进度和失败类别;组件从当前 `settings` locale 解析全部可见与无障碍文案,并在应用内语言变化后同步更新。选择可用更新即开始下载;安装需要独立的壳拥有的确认。侧栏收起时,其顶部展开按钮以圆点显示相同状态。连接反馈通常优先展示,但壳报告正在安装时,预期的后端断开不能遮盖更新状态;失败后恢复连接反馈。两个控件共用一次载体订阅;浏览器代码不能选择安装包或授权安装。[Desktop 更新](../../../apps/desktop/README.zh.md)负责发布流程。
|
|
31
35
|
|
|
32
36
|
### 「通用」分区
|
|
33
37
|
|
|
34
|
-
|
|
38
|
+
Web 与桌面端的通用设置底部显示当前发布版本,使用构建注入的 `DSH_CLIENT_VERSION` 元数据和当前语言。缺少版本元数据的局部构建不显示该行。
|
|
39
|
+
|
|
40
|
+
开发者工具开关控制 [ui-settings](../ui-settings/README.zh.md#use-this-package) 定义的共享偏好。Web 和桌面端均提供此开关,立即跟随已接受的变更,并在写入完成前禁用重复输入。写入失败时显示本地化的重试提示。
|
|
41
|
+
|
|
42
|
+
「通用」分区承载内置的开发者工具行与当前版本行,以及功能包注册进 `settings.general.item` 的行。每个注册方拥有自己的行文案与行为。例如「外观」行位于 ui-theme。
|
|
35
43
|
|
|
36
44
|
### 打开配置文件
|
|
37
45
|
|
|
@@ -46,10 +54,12 @@ kind: "package-reference"
|
|
|
46
54
|
<a id="understand-the-implementation"></a>
|
|
47
55
|
## 理解实现
|
|
48
56
|
|
|
57
|
+
外壳声明 settings.launcher,供账号功能提供侧边栏菜单,并以设置按钮作为回退。关闭对话框后,焦点返回当前入口。
|
|
58
|
+
|
|
49
59
|
<details>
|
|
50
60
|
<summary>实现细节——点击展开</summary>
|
|
51
61
|
|
|
52
|
-
|
|
62
|
+
外壳拥有界面框架与投影,并提供开发者工具行与当前版本行;功能注册方拥有其余内容与文案。
|
|
53
63
|
|
|
54
64
|
### 账本投影
|
|
55
65
|
|
|
@@ -65,7 +75,7 @@ kind: "package-reference"
|
|
|
65
75
|
|
|
66
76
|
### 宿主端
|
|
67
77
|
|
|
68
|
-
|
|
78
|
+
宿主端在 `ui-settings-general` 条目的 Config 中把 `welcomeNoticeVersion` 声明为 volatile 字段。`ui-settings-models` 提供的欢迎步骤通过既有公开 settings 边界读写其中的 `welcomeNoticeVersion`;外壳本身仍不持有产品策略。
|
|
69
79
|
|
|
70
80
|
</details>
|
|
71
81
|
|
|
@@ -100,7 +110,8 @@ kind: "package-reference"
|
|
|
100
110
|
|
|
101
111
|
这些限制说明外壳自身提供什么、功能包必须提供什么;它们是当前包约束。
|
|
102
112
|
|
|
103
|
-
-
|
|
113
|
+
- **额外的通用设置行需要相应功能插件**:外壳提供开发者工具与当前版本;功能插件提供其他偏好。
|
|
114
|
+
- **Windows 顶栏徽标的气泡仍向右展开**:`DesktopUpdateBadge` 占用顶栏的 `sidebar.toggle.badge` 且请求 `side="right"`,侧栏收起时其气泡会被 Desktop 菜单文字遮挡;侧栏开关与新建会话的气泡则改在顶栏下方展开(#4688)。
|
|
104
115
|
|
|
105
116
|
<a id="dev-note"></a>
|
|
106
117
|
### 开发备注
|
package/lib/client.js
CHANGED
|
@@ -25,13 +25,13 @@ window.__ModuleLoader__.load({
|
|
|
25
25
|
}
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-settings-general/src/client/SettingsRoot.module.css.mjs
|
|
28
|
-
const css$
|
|
29
|
-
const tagId$
|
|
30
|
-
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$
|
|
28
|
+
const css$6 = ".VOzbGW_triggerRow{flex:none;align-items:center;gap:8px;width:calc(100% + 4px);margin:4px -2px;display:flex;position:relative}.VOzbGW_triggerRow.VOzbGW_railRow{width:36px;margin:8px 0 10px}.VOzbGW_trigger{box-sizing:border-box;cursor:pointer;width:auto;min-width:0;height:42px;color:var(--dsw-alias-label-primary);background:0 0;border:none;border-radius:12px;flex:1;align-items:center;gap:8px;margin:0;padding:0 10px 0 8px;font-family:inherit;font-size:14px;line-height:22px;display:flex;overflow:hidden}.VOzbGW_trigger:hover{background:var(--dsw-alias-interactive-bg-hover)}.VOzbGW_trigger.VOzbGW_rail{flex:none;justify-content:center;gap:0;width:36px;height:36px;margin:0;padding:0}.VOzbGW_triggerLabel{white-space:nowrap;overflow:hidden}.VOzbGW_overlay{z-index:1000;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.VOzbGW_mask{background:var(--dsw-alias-bg-mask-1);backdrop-filter:var(--dsw-mask-blur);position:absolute;inset:0}.VOzbGW_panel{z-index:1;width:800px;height:min(800px, calc(100vh - 2 * max(24px, var(--dsh-frame-top-clearance,24px))));background:var(--dsw-alias-bg-layer-2);max-width:calc(100vw - 48px);box-shadow:var(--dsw-elevation-prominent);--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);border-radius:32px;display:flex;position:relative;overflow:hidden}.VOzbGW_nav{box-sizing:border-box;flex-direction:column;flex:none;gap:18px;width:188px;padding:22px 12px 0;display:flex}.VOzbGW_navTitle{color:var(--dsw-alias-label-primary);padding:0 12px;font-size:16px;font-weight:500;line-height:24px}.VOzbGW_navList{flex-direction:column;gap:4px;display:flex;overflow-y:auto}.VOzbGW_navCell{box-sizing:border-box;cursor:pointer;height:40px;color:var(--dsw-alias-label-primary);text-align:left;background:0 0;border:none;border-radius:12px;align-items:center;gap:8px;padding:9px 16px 9px 12px;font-family:inherit;font-size:14px;font-weight:400;line-height:22px;display:flex}.VOzbGW_navCell:hover{background:var(--dsw-specific-sidebar-nav-item-hover)}.VOzbGW_navCell.VOzbGW_active{background:var(--dsw-specific-sidebar-nav-item-active)}.VOzbGW_navIcon{flex:none}.VOzbGW_navLabel{white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;overflow:hidden}.VOzbGW_content{flex-direction:column;flex:1;min-width:0;display:flex}.VOzbGW_header{box-sizing:border-box;flex:none;justify-content:space-between;align-items:flex-start;gap:8px;height:54px;padding:20px 14px 8px 10px;display:flex}.VOzbGW_actions{justify-content:flex-end;align-items:center;gap:8px;min-width:0;margin-left:auto;display:flex}.VOzbGW_close{cursor:pointer;width:28px;height:28px;color:var(--dsw-alias-label-primary);background:0 0;border:none;border-radius:28px;justify-content:center;align-items:center;padding:0;display:inline-flex}.VOzbGW_close:hover{background:var(--dsw-alias-interactive-bg-hover)}.VOzbGW_options{flex:1;min-height:0;padding:0 24px 24px;overflow-y:auto}.VOzbGW_hiddenLabel{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}[data-platform=darwin] .VOzbGW_overlay{-webkit-app-region:no-drag}";
|
|
29
|
+
const tagId$6 = "@deepseek-ai/dsh-client-ui-settings-general/SettingsRoot.module.css";
|
|
30
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$6) + "]") === null) {
|
|
31
31
|
const tag = document.createElement("style");
|
|
32
32
|
tag.dataset.plugin = "@deepseek-ai/dsh-client-ui-settings-general";
|
|
33
|
-
tag.dataset.pluginCss = tagId$
|
|
34
|
-
tag.textContent = css$
|
|
33
|
+
tag.dataset.pluginCss = tagId$6;
|
|
34
|
+
tag.textContent = css$6;
|
|
35
35
|
document.head.appendChild(tag);
|
|
36
36
|
}
|
|
37
37
|
var SettingsRoot_module_css_default = {
|
|
@@ -59,13 +59,13 @@ window.__ModuleLoader__.load({
|
|
|
59
59
|
};
|
|
60
60
|
//#endregion
|
|
61
61
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-settings-general/src/client/DesktopUpdateIndicator.module.css.mjs
|
|
62
|
-
const css$
|
|
63
|
-
const tagId$
|
|
64
|
-
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$
|
|
62
|
+
const css$5 = ".DOUpOa_indicator{border:1px solid color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 20%, transparent);color:var(--dsw-alias-brand-primary-new-colorprimary-new-color);background:color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 8%, transparent);font:inherit;white-space:nowrap;cursor:pointer;border-radius:6px;flex:none;align-items:center;gap:6px;margin-inline-end:4px;padding:1px 8px;font-size:12px;line-height:20px;display:inline-flex}.DOUpOa_indicator[data-error]{color:var(--dsw-alias-state-error-primary)}.DOUpOa_badge{inset-inline-end:2px;corner-shape:round;background:var(--dsw-alias-brand-primary-new-colorprimary-new-color);border-radius:50%;width:6px;height:6px;position:absolute;top:2px}.DOUpOa_badge[data-error],.DOUpOa_errorDot{background:var(--dsw-alias-state-error-primary)}.DOUpOa_errorDot{corner-shape:round;border-radius:50%;width:6px;height:6px}.DOUpOa_spinner{animation:1s linear infinite DOUpOa_spin}@keyframes DOUpOa_spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.DOUpOa_spinner{animation:none}}.DOUpOa_indicator[aria-disabled=true]{cursor:default}";
|
|
63
|
+
const tagId$5 = "@deepseek-ai/dsh-client-ui-settings-general/DesktopUpdateIndicator.module.css";
|
|
64
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$5) + "]") === null) {
|
|
65
65
|
const tag = document.createElement("style");
|
|
66
66
|
tag.dataset.plugin = "@deepseek-ai/dsh-client-ui-settings-general";
|
|
67
|
-
tag.dataset.pluginCss = tagId$
|
|
68
|
-
tag.textContent = css$
|
|
67
|
+
tag.dataset.pluginCss = tagId$5;
|
|
68
|
+
tag.textContent = css$5;
|
|
69
69
|
document.head.appendChild(tag);
|
|
70
70
|
}
|
|
71
71
|
var DesktopUpdateIndicator_module_css_default = {
|
|
@@ -154,10 +154,10 @@ window.__ModuleLoader__.load({
|
|
|
154
154
|
children: [error ? (0, react_jsx_runtime.jsx)("span", {
|
|
155
155
|
className: DesktopUpdateIndicator_module_css_default.errorDot,
|
|
156
156
|
"aria-hidden": "true"
|
|
157
|
-
}) : busy ? (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
157
|
+
}) : busy ? (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconLoadingOutlineRegular, {
|
|
158
158
|
className: DesktopUpdateIndicator_module_css_default.spinner,
|
|
159
159
|
size: 16
|
|
160
|
-
}) : (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
160
|
+
}) : (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconDownloadOutlineRegular, { size: 14 }), (0, react_jsx_runtime.jsx)("span", { children: label })]
|
|
161
161
|
})
|
|
162
162
|
});
|
|
163
163
|
}
|
|
@@ -190,7 +190,7 @@ window.__ModuleLoader__.load({
|
|
|
190
190
|
//#region lib/types/client/SettingsRoot.js
|
|
191
191
|
/**
|
|
192
192
|
* Settings shell root: the sidebar-foot trigger row plus the centered modal
|
|
193
|
-
* panel (figma
|
|
193
|
+
* panel (figma 2552:26025, 760x500) with the section nav rail. The shell is
|
|
194
194
|
* a pure composition face — slot-owned text (trigger label, panel title,
|
|
195
195
|
* close label, sections) arrives from registrants through slots; accessible
|
|
196
196
|
* names resolve from localized content (trigger: shell locale; dialog:
|
|
@@ -205,23 +205,27 @@ window.__ModuleLoader__.load({
|
|
|
205
205
|
const CONNECTING_MIN_VISIBLE_MS = 800;
|
|
206
206
|
/** Nav glyph by section id; unknown ids fall back to the settings gear. */
|
|
207
207
|
function navIcon(id) {
|
|
208
|
-
if (id === "
|
|
208
|
+
if (id === "account") return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconUserOutlineMedium, {
|
|
209
|
+
className: SettingsRoot_module_css_default.navIcon,
|
|
210
|
+
size: 16
|
|
211
|
+
});
|
|
212
|
+
if (id === "models") return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconDataOutlineMedium, {
|
|
209
213
|
className: SettingsRoot_module_css_default.navIcon,
|
|
210
214
|
size: 16
|
|
211
215
|
});
|
|
212
|
-
if (id === "agent-presets") return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
216
|
+
if (id === "agent-presets") return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconAgentPresetOutlineMedium, {
|
|
213
217
|
className: SettingsRoot_module_css_default.navIcon,
|
|
214
218
|
size: 16
|
|
215
219
|
});
|
|
216
|
-
if (id === "plugins") return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
220
|
+
if (id === "plugins") return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconPersonalizationOutlineMedium, {
|
|
217
221
|
className: SettingsRoot_module_css_default.navIcon,
|
|
218
222
|
size: 16
|
|
219
223
|
});
|
|
220
|
-
if (id === "archived-sessions") return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
224
|
+
if (id === "archived-sessions") return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconArchiveOutlineMedium, {
|
|
221
225
|
className: SettingsRoot_module_css_default.navIcon,
|
|
222
226
|
size: 16
|
|
223
227
|
});
|
|
224
|
-
return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
228
|
+
return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSettingsOutlineMedium, {
|
|
225
229
|
className: SettingsRoot_module_css_default.navIcon,
|
|
226
230
|
size: 16
|
|
227
231
|
});
|
|
@@ -292,7 +296,7 @@ window.__ModuleLoader__.load({
|
|
|
292
296
|
type: "button",
|
|
293
297
|
className: SettingsRoot_module_css_default.close,
|
|
294
298
|
onClick: onClose,
|
|
295
|
-
children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
299
|
+
children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCloseOutlineRegular, { size: 14 }), (0, react_jsx_runtime.jsx)("span", {
|
|
296
300
|
className: SettingsRoot_module_css_default.hiddenLabel,
|
|
297
301
|
children: renderSlot("settings.close", {})
|
|
298
302
|
})]
|
|
@@ -314,10 +318,12 @@ window.__ModuleLoader__.load({
|
|
|
314
318
|
const { wide, reconnect, useConnectionState, useSections, useOnboardingSteps, useSessions, renderSlot, t, useDesktopUpdate, openDesktopUpdate } = props;
|
|
315
319
|
const [open, setOpen] = (0, react.useState)(false);
|
|
316
320
|
const [activeId, setActiveId] = (0, react.useState)(void 0);
|
|
321
|
+
const [requestedOnboarding, setRequestedOnboarding] = (0, react.useState)();
|
|
317
322
|
const [completedOnboarding, setCompletedOnboarding] = (0, react.useState)(() => /* @__PURE__ */ new Set());
|
|
318
323
|
const [showRecovery, setShowRecovery] = (0, react.useState)(false);
|
|
319
324
|
const [holdConnecting, setHoldConnecting] = (0, react.useState)(false);
|
|
320
325
|
const connectingShownAt = (0, react.useRef)(void 0);
|
|
326
|
+
const triggerRow = (0, react.useRef)(null);
|
|
321
327
|
const triggerButton = (0, react.useRef)(null);
|
|
322
328
|
const wasOpen = (0, react.useRef)(open);
|
|
323
329
|
const close = (0, react.useCallback)(() => {
|
|
@@ -325,7 +331,7 @@ window.__ModuleLoader__.load({
|
|
|
325
331
|
setActiveId(void 0);
|
|
326
332
|
}, []);
|
|
327
333
|
(0, react.useEffect)(() => {
|
|
328
|
-
if (wasOpen.current && !open)
|
|
334
|
+
if (wasOpen.current && !open) triggerRow.current?.querySelector("button")?.focus();
|
|
329
335
|
wasOpen.current = open;
|
|
330
336
|
}, [open]);
|
|
331
337
|
const openSection = (0, react.useCallback)((id) => {
|
|
@@ -341,7 +347,7 @@ window.__ModuleLoader__.load({
|
|
|
341
347
|
const main = Object.values(state.byId).find((session) => (session.retainedBy.mainView ?? 0) > 0);
|
|
342
348
|
return state.phase === "ready" && (main === void 0 || main.blank);
|
|
343
349
|
});
|
|
344
|
-
const onboardingStep = onboardingActive ? onboardingSteps.find((step) => !completedOnboarding.has(step.id)) : void 0;
|
|
350
|
+
const onboardingStep = requestedOnboarding !== void 0 ? onboardingSteps.find((step) => step.id === requestedOnboarding) : onboardingActive ? onboardingSteps.find((step) => !completedOnboarding.has(step.id)) : void 0;
|
|
345
351
|
(0, react.useEffect)(() => {
|
|
346
352
|
if (onboardingActive) return;
|
|
347
353
|
setCompletedOnboarding(/* @__PURE__ */ new Set());
|
|
@@ -385,6 +391,7 @@ window.__ModuleLoader__.load({
|
|
|
385
391
|
};
|
|
386
392
|
}, [connectionState]);
|
|
387
393
|
const completeOnboardingStep = (0, react.useCallback)((id) => {
|
|
394
|
+
setRequestedOnboarding(void 0);
|
|
388
395
|
setCompletedOnboarding((previous) => {
|
|
389
396
|
if (previous.has(id)) return previous;
|
|
390
397
|
return new Set([...previous, id]);
|
|
@@ -396,9 +403,19 @@ window.__ModuleLoader__.load({
|
|
|
396
403
|
else if (showRecovery) connectionIndicator = "recovered";
|
|
397
404
|
return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
398
405
|
(0, react_jsx_runtime.jsxs)("div", {
|
|
406
|
+
ref: triggerRow,
|
|
399
407
|
className: clsx(SettingsRoot_module_css_default.triggerRow, !wide && SettingsRoot_module_css_default.railRow),
|
|
400
408
|
children: [
|
|
401
|
-
(
|
|
409
|
+
renderSlot("settings.launcher", {
|
|
410
|
+
wide,
|
|
411
|
+
openSettings: () => {
|
|
412
|
+
setOpen(true);
|
|
413
|
+
},
|
|
414
|
+
openOnboarding: (id) => {
|
|
415
|
+
setOpen(false);
|
|
416
|
+
setRequestedOnboarding(id);
|
|
417
|
+
}
|
|
418
|
+
}, { fallback: (0, react_jsx_runtime.jsx)("button", {
|
|
402
419
|
ref: triggerButton,
|
|
403
420
|
type: "button",
|
|
404
421
|
className: clsx(SettingsRoot_module_css_default.trigger, !wide && SettingsRoot_module_css_default.rail),
|
|
@@ -409,7 +426,7 @@ window.__ModuleLoader__.load({
|
|
|
409
426
|
setOpen(true);
|
|
410
427
|
},
|
|
411
428
|
children: renderSlot("settings.trigger", { wide })
|
|
412
|
-
}),
|
|
429
|
+
}) }),
|
|
413
430
|
(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.ConnectionIndicator, {
|
|
414
431
|
state: wide && desktopUpdate.presentation?.phase !== "installing" ? connectionIndicator : void 0,
|
|
415
432
|
disconnectedLabel: t("connection.error"),
|
|
@@ -437,6 +454,7 @@ window.__ModuleLoader__.load({
|
|
|
437
454
|
}),
|
|
438
455
|
onboardingStep !== void 0 && renderSlot("settings.onboarding", {
|
|
439
456
|
stepId: onboardingStep.id,
|
|
457
|
+
explicit: requestedOnboarding !== void 0,
|
|
440
458
|
complete: () => {
|
|
441
459
|
completeOnboardingStep(onboardingStep.id);
|
|
442
460
|
},
|
|
@@ -516,13 +534,13 @@ window.__ModuleLoader__.load({
|
|
|
516
534
|
};
|
|
517
535
|
//#endregion
|
|
518
536
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-settings-general/src/client/chrome.module.css.mjs
|
|
519
|
-
const css$
|
|
520
|
-
const tagId$
|
|
521
|
-
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$
|
|
537
|
+
const css$4 = ".UQsH_q_triggerLabel{white-space:nowrap;overflow:hidden}";
|
|
538
|
+
const tagId$4 = "@deepseek-ai/dsh-client-ui-settings-general/chrome.module.css";
|
|
539
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$4) + "]") === null) {
|
|
522
540
|
const tag = document.createElement("style");
|
|
523
541
|
tag.dataset.plugin = "@deepseek-ai/dsh-client-ui-settings-general";
|
|
524
|
-
tag.dataset.pluginCss = tagId$
|
|
525
|
-
tag.textContent = css$
|
|
542
|
+
tag.dataset.pluginCss = tagId$4;
|
|
543
|
+
tag.textContent = css$4;
|
|
526
544
|
document.head.appendChild(tag);
|
|
527
545
|
}
|
|
528
546
|
var chrome_module_css_default = { "triggerLabel": "UQsH_q_triggerLabel" };
|
|
@@ -540,7 +558,7 @@ window.__ModuleLoader__.load({
|
|
|
540
558
|
* @returns the trigger content fragment.
|
|
541
559
|
*/
|
|
542
560
|
function TriggerContent({ wide, t }) {
|
|
543
|
-
return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
561
|
+
return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSettingsOutlineMedium, { size: wide ? 16 : 18 }), wide && (0, react_jsx_runtime.jsx)("span", {
|
|
544
562
|
className: chrome_module_css_default.triggerLabel,
|
|
545
563
|
children: t("trigger")
|
|
546
564
|
})] });
|
|
@@ -563,13 +581,13 @@ window.__ModuleLoader__.load({
|
|
|
563
581
|
}
|
|
564
582
|
//#endregion
|
|
565
583
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-settings-general/src/client/GeneralSection.module.css.mjs
|
|
566
|
-
const css$
|
|
567
|
-
const tagId$
|
|
568
|
-
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$
|
|
584
|
+
const css$3 = "._WvWnq_section{flex-direction:column;width:100%;display:flex}._WvWnq_section>[data-slot=\"settings.general.item\"]>:last-child{border-bottom:none}";
|
|
585
|
+
const tagId$3 = "@deepseek-ai/dsh-client-ui-settings-general/GeneralSection.module.css";
|
|
586
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$3) + "]") === null) {
|
|
569
587
|
const tag = document.createElement("style");
|
|
570
588
|
tag.dataset.plugin = "@deepseek-ai/dsh-client-ui-settings-general";
|
|
571
|
-
tag.dataset.pluginCss = tagId$
|
|
572
|
-
tag.textContent = css$
|
|
589
|
+
tag.dataset.pluginCss = tagId$3;
|
|
590
|
+
tag.textContent = css$3;
|
|
573
591
|
document.head.appendChild(tag);
|
|
574
592
|
}
|
|
575
593
|
var GeneralSection_module_css_default = { "section": "_WvWnq_section" };
|
|
@@ -587,6 +605,90 @@ window.__ModuleLoader__.load({
|
|
|
587
605
|
});
|
|
588
606
|
}
|
|
589
607
|
//#endregion
|
|
608
|
+
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-settings-general/src/client/CurrentVersionRow.module.css.mjs
|
|
609
|
+
const css$2 = ".yIbyla_row{color:var(--dsw-alias-label-primary);overflow-wrap:anywhere;padding:16px 0;font-size:14px;line-height:22px}";
|
|
610
|
+
const tagId$2 = "@deepseek-ai/dsh-client-ui-settings-general/CurrentVersionRow.module.css";
|
|
611
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]") === null) {
|
|
612
|
+
const tag = document.createElement("style");
|
|
613
|
+
tag.dataset.plugin = "@deepseek-ai/dsh-client-ui-settings-general";
|
|
614
|
+
tag.dataset.pluginCss = tagId$2;
|
|
615
|
+
tag.textContent = css$2;
|
|
616
|
+
document.head.appendChild(tag);
|
|
617
|
+
}
|
|
618
|
+
var CurrentVersionRow_module_css_default = { "row": "yIbyla_row" };
|
|
619
|
+
//#endregion
|
|
620
|
+
//#region lib/types/client/CurrentVersionRow.js
|
|
621
|
+
/**
|
|
622
|
+
* Render the version embedded by the client build; partial builds without metadata omit the row.
|
|
623
|
+
* @param props - runtime share and localized copy.
|
|
624
|
+
* @returns the current release label, or nothing when build metadata is absent.
|
|
625
|
+
*/
|
|
626
|
+
function CurrentVersionRow({ t }) {
|
|
627
|
+
return (0, react_jsx_runtime.jsx)("div", {
|
|
628
|
+
className: CurrentVersionRow_module_css_default.row,
|
|
629
|
+
children: t("general.currentVersion", { version: "0.1.7-alpha.1" })
|
|
630
|
+
});
|
|
631
|
+
}
|
|
632
|
+
//#endregion
|
|
633
|
+
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-settings-general/src/client/DeveloperToolsRow.module.css.mjs
|
|
634
|
+
const css$1 = ".Pt1bsG_row{border-bottom:.5px solid var(--dsw-alias-border-l2);justify-content:space-between;align-items:center;gap:24px;padding:16px 0;display:flex}.Pt1bsG_title{font-size:14px;line-height:20px}.Pt1bsG_description{color:var(--dsw-alias-label-secondary);margin-top:4px;font-size:12px;line-height:18px}";
|
|
635
|
+
const tagId$1 = "@deepseek-ai/dsh-client-ui-settings-general/DeveloperToolsRow.module.css";
|
|
636
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
637
|
+
const tag = document.createElement("style");
|
|
638
|
+
tag.dataset.plugin = "@deepseek-ai/dsh-client-ui-settings-general";
|
|
639
|
+
tag.dataset.pluginCss = tagId$1;
|
|
640
|
+
tag.textContent = css$1;
|
|
641
|
+
document.head.appendChild(tag);
|
|
642
|
+
}
|
|
643
|
+
var DeveloperToolsRow_module_css_default = {
|
|
644
|
+
"description": "Pt1bsG_description",
|
|
645
|
+
"row": "Pt1bsG_row",
|
|
646
|
+
"title": "Pt1bsG_title"
|
|
647
|
+
};
|
|
648
|
+
//#endregion
|
|
649
|
+
//#region lib/types/client/DeveloperToolsRow.js
|
|
650
|
+
/** General Settings control for shared developer-tool visibility and previews. */
|
|
651
|
+
/**
|
|
652
|
+
* Render the developer-tool toggle.
|
|
653
|
+
* @param props - accepted preference, writer and localized copy.
|
|
654
|
+
* @returns the General Settings row.
|
|
655
|
+
*/
|
|
656
|
+
function DeveloperToolsRow({ useDeveloperTools, setEnabled, t }) {
|
|
657
|
+
const enabled = useDeveloperTools((value) => value);
|
|
658
|
+
const [busy, setBusy] = (0, react.useState)(false);
|
|
659
|
+
const [failed, setFailed] = (0, react.useState)(false);
|
|
660
|
+
return (0, react_jsx_runtime.jsxs)("div", {
|
|
661
|
+
className: DeveloperToolsRow_module_css_default.row,
|
|
662
|
+
children: [(0, react_jsx_runtime.jsxs)("div", { children: [
|
|
663
|
+
(0, react_jsx_runtime.jsx)("div", {
|
|
664
|
+
className: DeveloperToolsRow_module_css_default.title,
|
|
665
|
+
children: t("developerTools.title")
|
|
666
|
+
}),
|
|
667
|
+
(0, react_jsx_runtime.jsx)("div", {
|
|
668
|
+
className: DeveloperToolsRow_module_css_default.description,
|
|
669
|
+
children: t("developerTools.description")
|
|
670
|
+
}),
|
|
671
|
+
failed && (0, react_jsx_runtime.jsx)("div", {
|
|
672
|
+
role: "alert",
|
|
673
|
+
children: t("developerTools.error")
|
|
674
|
+
})
|
|
675
|
+
] }), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Switch, {
|
|
676
|
+
checked: enabled,
|
|
677
|
+
disabled: busy,
|
|
678
|
+
label: t("developerTools.title"),
|
|
679
|
+
onChange: (next) => {
|
|
680
|
+
setFailed(false);
|
|
681
|
+
setBusy(true);
|
|
682
|
+
setEnabled(next).catch(() => {
|
|
683
|
+
setFailed(true);
|
|
684
|
+
}).finally(() => {
|
|
685
|
+
setBusy(false);
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
})]
|
|
689
|
+
});
|
|
690
|
+
}
|
|
691
|
+
//#endregion
|
|
590
692
|
//#region \0dsh-css:/home/runner/work/deepseek-harness/deepseek-harness/packages/client/ui-settings-general/src/client/SettingsDocumentAction.module.css.mjs
|
|
591
693
|
const css = ".me01iq_action{align-items:center;gap:8px;min-width:0;display:flex}.me01iq_error{max-width:180px;color:var(--dsw-alias-state-error-primary);text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:18px;overflow:hidden}";
|
|
592
694
|
const tagId = "@deepseek-ai/dsh-client-ui-settings-general/SettingsDocumentAction.module.css";
|
|
@@ -746,6 +848,10 @@ window.__ModuleLoader__.load({
|
|
|
746
848
|
"openDocument": "打开配置文件",
|
|
747
849
|
"openDocument.error": "无法打开配置文件",
|
|
748
850
|
"general.nav": "通用设置",
|
|
851
|
+
"general.currentVersion": "当前版本:{version}",
|
|
852
|
+
"developerTools.title": "开发者工具",
|
|
853
|
+
"developerTools.error": "保存失败,请重试",
|
|
854
|
+
"developerTools.description": "显示用于调试和排查问题的工具与信息",
|
|
749
855
|
"connection.error": "连接异常,刷新重试",
|
|
750
856
|
"connection.connecting": "重新连接中",
|
|
751
857
|
"connection.connected": "连接成功",
|
|
@@ -778,6 +884,10 @@ window.__ModuleLoader__.load({
|
|
|
778
884
|
"openDocument": "Open configuration file",
|
|
779
885
|
"openDocument.error": "Could not open configuration file",
|
|
780
886
|
"general.nav": "General",
|
|
887
|
+
"general.currentVersion": "Current version: {version}",
|
|
888
|
+
"developerTools.title": "Developer tools",
|
|
889
|
+
"developerTools.error": "Could not save. Please try again.",
|
|
890
|
+
"developerTools.description": "Show tools and information for debugging and troubleshooting",
|
|
781
891
|
"connection.error": "Disconnected",
|
|
782
892
|
"connection.connecting": "Reconnecting",
|
|
783
893
|
"connection.connected": "Connected",
|
|
@@ -799,7 +909,7 @@ window.__ModuleLoader__.load({
|
|
|
799
909
|
"connection",
|
|
800
910
|
"remote",
|
|
801
911
|
"remote.settings",
|
|
802
|
-
"
|
|
912
|
+
"configForms"
|
|
803
913
|
];
|
|
804
914
|
/**
|
|
805
915
|
* Register the `settings` dictionaries, the chrome content, and the General
|
|
@@ -807,6 +917,22 @@ window.__ModuleLoader__.load({
|
|
|
807
917
|
* @param ctx - client root context.
|
|
808
918
|
*/
|
|
809
919
|
function apply(ctx) {
|
|
920
|
+
ctx.slots.inject("settings.general.item", () => ctx.slots.register({
|
|
921
|
+
name: "settings.general.item",
|
|
922
|
+
id: "developer-tools",
|
|
923
|
+
order: 15,
|
|
924
|
+
locale: NS,
|
|
925
|
+
inject: () => ({
|
|
926
|
+
hooks: { developerTools: ctx.configForms.developerTools.enabled },
|
|
927
|
+
setEnabled: (enabled) => ctx.configForms.developerTools.setEnabled(enabled)
|
|
928
|
+
})
|
|
929
|
+
}, DeveloperToolsRow));
|
|
930
|
+
ctx.slots.inject("settings.general.item", () => ctx.slots.register({
|
|
931
|
+
name: "settings.general.item",
|
|
932
|
+
id: "current-version",
|
|
933
|
+
order: 100,
|
|
934
|
+
locale: NS
|
|
935
|
+
}, CurrentVersionRow));
|
|
810
936
|
ctx.effect(() => ctx.locale.register(NS, {
|
|
811
937
|
zh,
|
|
812
938
|
en
|
|
@@ -826,7 +952,7 @@ window.__ModuleLoader__.load({
|
|
|
826
952
|
} })
|
|
827
953
|
}, DesktopUpdateBadge));
|
|
828
954
|
const t = ctx.locale.bind(NS);
|
|
829
|
-
const documentController = ctx.remote.$host.isLoopback ? new SettingsDocumentStore(ctx, ctx.
|
|
955
|
+
const documentController = ctx.remote.$host.isLoopback ? new SettingsDocumentStore(ctx, ctx.configForms.describe()) : void 0;
|
|
830
956
|
const documentInjected = documentController === void 0 ? void 0 : () => ({
|
|
831
957
|
controller: documentController,
|
|
832
958
|
hooks: { snapshot: documentController.store }
|
|
@@ -895,6 +1021,10 @@ window.__ModuleLoader__.load({
|
|
|
895
1021
|
name: "sidebar.settings",
|
|
896
1022
|
locale: NS,
|
|
897
1023
|
children: {
|
|
1024
|
+
"settings.launcher": {
|
|
1025
|
+
kind: "single",
|
|
1026
|
+
scope: "root"
|
|
1027
|
+
},
|
|
898
1028
|
"settings.trigger": {
|
|
899
1029
|
kind: "single",
|
|
900
1030
|
scope: "root"
|
package/lib/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import z from "@deepseek-ai/schemastery";
|
|
2
2
|
//#region lib/types/index.js
|
|
3
|
-
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
/** Live welcome preference. */
|
|
4
|
+
const Config = z.object({ welcomeNoticeVersion: z.string().volatile() });
|
|
5
|
+
/** The browser consumes the configuration form projection.
|
|
6
|
+
* @param ctx Plugin context used for optional settings presentation.
|
|
7
|
+
*/
|
|
8
8
|
function apply(ctx) {
|
|
9
|
-
ctx.inject(["settings"], (
|
|
10
|
-
|
|
9
|
+
ctx.inject(["settings"], (child) => {
|
|
10
|
+
child.effect(() => child.settings.configure({ auto: false }, ctx.fiber));
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
//#endregion
|
|
14
|
-
export { apply };
|
|
14
|
+
export { Config, apply };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Installed release version in General Settings for Web and Desktop. */
|
|
2
|
+
import type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
3
|
+
/**
|
|
4
|
+
* Render the version embedded by the client build; partial builds without metadata omit the row.
|
|
5
|
+
* @param props - runtime share and localized copy.
|
|
6
|
+
* @returns the current release label, or nothing when build metadata is absent.
|
|
7
|
+
*/
|
|
8
|
+
export declare function CurrentVersionRow({ t }: PropsRuntime<'settings.general.item'> & PropsLocale<'settings'>): import("react").JSX.Element | null;
|
|
9
|
+
//# sourceMappingURL=CurrentVersionRow.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
|
-
import type { DesktopUpdateView } from '
|
|
2
|
+
import type { DesktopUpdateView } from '../types.ts';
|
|
3
3
|
import type { SettingsRootInjected } from './shell-contract.ts';
|
|
4
4
|
type SettingsTranslate = PropsLocale<'settings'>['t'];
|
|
5
5
|
/**
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ObservableSnapshot } from '@deepseek-ai/dsh-client-store';
|
|
2
|
+
import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
3
|
+
/** Accepted setting and ordered mutation supplied by the settings owner. */
|
|
4
|
+
export interface DeveloperToolsRowInjected {
|
|
5
|
+
hooks: {
|
|
6
|
+
developerTools: ObservableSnapshot<boolean>;
|
|
7
|
+
};
|
|
8
|
+
setEnabled(enabled: boolean): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Render the developer-tool toggle.
|
|
12
|
+
* @param props - accepted preference, writer and localized copy.
|
|
13
|
+
* @returns the General Settings row.
|
|
14
|
+
*/
|
|
15
|
+
export declare function DeveloperToolsRow({ useDeveloperTools, setEnabled, t }: PropsRuntime<'settings.general.item'> & PropsLocale<'settings'> & InjectFace<DeveloperToolsRowInjected>): import("react").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=DeveloperToolsRow.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DesktopUpdateBridge, DesktopUpdateView } from '
|
|
1
|
+
import type { DesktopUpdateBridge, DesktopUpdateView } from '../types.ts';
|
|
2
2
|
/** Owns one preload subscription across both sidebar locations. */
|
|
3
3
|
export declare class DesktopUpdateSource {
|
|
4
4
|
private readonly bridge;
|
|
@@ -25,6 +25,10 @@ export declare const zh: {
|
|
|
25
25
|
openDocument: string;
|
|
26
26
|
'openDocument.error': string;
|
|
27
27
|
'general.nav': string;
|
|
28
|
+
'general.currentVersion': string;
|
|
29
|
+
'developerTools.title': string;
|
|
30
|
+
'developerTools.error': string;
|
|
31
|
+
'developerTools.description': string;
|
|
28
32
|
'connection.error': string;
|
|
29
33
|
'connection.connecting': string;
|
|
30
34
|
'connection.connected': string;
|
|
@@ -59,6 +63,10 @@ export declare const en: {
|
|
|
59
63
|
openDocument: string;
|
|
60
64
|
'openDocument.error': string;
|
|
61
65
|
'general.nav': string;
|
|
66
|
+
'general.currentVersion': string;
|
|
67
|
+
'developerTools.title': string;
|
|
68
|
+
'developerTools.error': string;
|
|
69
|
+
'developerTools.description': string;
|
|
62
70
|
'connection.error': string;
|
|
63
71
|
'connection.connecting': string;
|
|
64
72
|
'connection.connected': string;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import type { ConnectionState } from '@deepseek-ai/dsh-client-connection/client';
|
|
10
10
|
import type { HostObservable, InjectFace, PropsLocale, PropsRenderSlots, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
11
|
-
import type { DesktopUpdateView } from '
|
|
11
|
+
import type { DesktopUpdateView } from '../types.ts';
|
|
12
12
|
/** One nav row projected from a settings.section registration's options. */
|
|
13
13
|
export interface SettingsSectionRow {
|
|
14
14
|
id: string;
|
|
@@ -47,5 +47,5 @@ export type SettingsRootInjected = {
|
|
|
47
47
|
* (hooks compartment bound to useSections). No store is registered — modal
|
|
48
48
|
* open state and active section id are component-local viewing state.
|
|
49
49
|
*/
|
|
50
|
-
export type SettingsRootComponentProps = PropsRuntime<'sidebar.settings'> & PropsRenderSlots<'settings.trigger' | 'settings.header' | 'settings.action' | 'settings.close' | 'settings.section' | 'settings.onboarding'> & InjectFace<SettingsRootInjected> & PropsLocale<'settings'>;
|
|
50
|
+
export type SettingsRootComponentProps = PropsRuntime<'sidebar.settings'> & PropsRenderSlots<'settings.launcher' | 'settings.trigger' | 'settings.header' | 'settings.action' | 'settings.close' | 'settings.section' | 'settings.onboarding'> & InjectFace<SettingsRootInjected> & PropsLocale<'settings'>;
|
|
51
51
|
//# sourceMappingURL=shell-contract.d.ts.map
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
/**
|
|
1
|
+
import type { Volatile, Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import z from '@deepseek-ai/schemastery';
|
|
3
|
+
/** Runtime preferences projected to the browser. */
|
|
4
|
+
export interface Config {
|
|
5
|
+
/** Last acknowledged welcome notice version. */
|
|
6
|
+
welcomeNoticeVersion: Volatile<string | undefined>;
|
|
7
|
+
}
|
|
8
|
+
/** Live welcome preference. */
|
|
9
|
+
export declare const Config: z<Schemastery.ObjectS<NoInfer<{
|
|
10
|
+
welcomeNoticeVersion: z<string, string, "volatile">;
|
|
11
|
+
}>>, Schemastery.ObjectT<NoInfer<{
|
|
12
|
+
welcomeNoticeVersion: z<string, string, "volatile">;
|
|
13
|
+
}>>, "plain">;
|
|
14
|
+
/** The browser consumes the configuration form projection.
|
|
15
|
+
* @param ctx Plugin context used for optional settings presentation.
|
|
16
|
+
*/
|
|
4
17
|
export declare function apply(ctx: Context): void;
|
|
5
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** Type-only Electron update declarations shared by the settings UI and Desktop compatibility checks. */
|
|
2
2
|
/** Classified failure copy selected by the Web locale without exposing raw updater diagnostics. */
|
|
3
3
|
export type DesktopUpdateFailureKind = 'check' | 'check-network' | 'download' | 'download-network' | 'install' | 'install-network' | 'stop-failed' | 'tasks-changed' | 'tasks-unavailable';
|
|
4
4
|
/** Public semantic preload fields consumed by the settings row. */
|
|
@@ -20,4 +20,4 @@ export interface DesktopUpdateView {
|
|
|
20
20
|
readonly failed: boolean;
|
|
21
21
|
readonly opening: boolean;
|
|
22
22
|
}
|
|
23
|
-
//# sourceMappingURL=
|
|
23
|
+
//# sourceMappingURL=types.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-client-ui-settings-general",
|
|
3
3
|
"description": "Settings ownerless-copy and product onboarding plugin: the General section, shell trigger/header chrome content, settings dictionaries, and the versioned welcome notice",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.7-alpha.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -22,6 +22,9 @@
|
|
|
22
22
|
"types": "./lib/types/client/index.d.ts",
|
|
23
23
|
"default": "./lib/client.js"
|
|
24
24
|
},
|
|
25
|
+
"./types": {
|
|
26
|
+
"types": "./lib/types/types.d.ts"
|
|
27
|
+
},
|
|
25
28
|
"./src/*": "./src/*",
|
|
26
29
|
"./package.json": "./package.json"
|
|
27
30
|
},
|
|
@@ -39,29 +42,29 @@
|
|
|
39
42
|
},
|
|
40
43
|
"license": "MIT",
|
|
41
44
|
"dependencies": {
|
|
42
|
-
"@deepseek-ai/schemastery": "^3.18.
|
|
45
|
+
"@deepseek-ai/schemastery": "^3.18.3"
|
|
43
46
|
},
|
|
44
47
|
"peerDependencies": {
|
|
45
|
-
"@deepseek-ai/cordis": "^4.0.
|
|
48
|
+
"@deepseek-ai/cordis": "^4.0.3"
|
|
46
49
|
},
|
|
47
50
|
"devDependencies": {
|
|
48
51
|
"@types/react": "~18.3.1",
|
|
49
52
|
"clsx": "^2.0.0",
|
|
50
53
|
"react": "^18.2.0",
|
|
51
|
-
"@deepseek-ai/
|
|
52
|
-
"@deepseek-ai/dsh-
|
|
53
|
-
"@deepseek-ai/
|
|
54
|
-
"@deepseek-ai/dsh-client-
|
|
55
|
-
"@deepseek-ai/dsh-client-store": "^0.1.
|
|
56
|
-
"@deepseek-ai/dsh-client-test-runtime": "^0.1.
|
|
57
|
-
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.
|
|
58
|
-
"@deepseek-ai/dsh-client-ui-
|
|
59
|
-
"@deepseek-ai/dsh-client-ui-
|
|
60
|
-
"@deepseek-ai/dsh-client-ui-
|
|
61
|
-
"@deepseek-ai/dsh-
|
|
62
|
-
"@deepseek-ai/dsh-client-ui-
|
|
63
|
-
"@deepseek-ai/dsh-
|
|
64
|
-
"@deepseek-ai/dsh-
|
|
54
|
+
"@deepseek-ai/cordis": "^4.0.3",
|
|
55
|
+
"@deepseek-ai/dsh-api-remotes": "^0.1.7-alpha.1",
|
|
56
|
+
"@deepseek-ai/dsh-client-connection": "^0.1.7-alpha.1",
|
|
57
|
+
"@deepseek-ai/dsh-client-locale": "^0.1.7-alpha.1",
|
|
58
|
+
"@deepseek-ai/dsh-client-store": "^0.1.7-alpha.1",
|
|
59
|
+
"@deepseek-ai/dsh-client-test-runtime": "^0.1.7-alpha.1",
|
|
60
|
+
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.7-alpha.1",
|
|
61
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.7-alpha.1",
|
|
62
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.1.7-alpha.1",
|
|
63
|
+
"@deepseek-ai/dsh-client-ui-session": "^0.1.7-alpha.1",
|
|
64
|
+
"@deepseek-ai/dsh-client-ui-sidebar": "^0.1.7-alpha.1",
|
|
65
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.7-alpha.1",
|
|
66
|
+
"@deepseek-ai/dsh-remote-mock": "^0.1.7-alpha.1",
|
|
67
|
+
"@deepseek-ai/dsh-settings": "^0.1.7-alpha.1"
|
|
65
68
|
},
|
|
66
69
|
"files": [
|
|
67
70
|
"lib/index.js",
|