@kesike/dsh-exit 0.2.1 → 0.2.3

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 CHANGED
@@ -7,7 +7,7 @@
7
7
  [![dsh web plugin](https://img.shields.io/badge/dsh-web%20plugin-4f46e5?style=for-the-badge)](https://npmjs.com/package/@deepseek-ai/dsh)
8
8
  [![npm](https://img.shields.io/npm/v/%40kesike%2Fdsh-exit?style=for-the-badge&label=npm)](https://www.npmjs.com/package/@kesike/dsh-exit)
9
9
  [![Platform](https://img.shields.io/badge/platform-web-0ea5e9?style=for-the-badge)](https://github.com/KeS1Ke/dsh-exit)
10
- [![Version](https://img.shields.io/badge/version-0.2.1-64748b?style=for-the-badge)](package.json)
10
+ [![Version](https://img.shields.io/badge/version-0.2.3-64748b?style=for-the-badge)](package.json)
11
11
  [![Dependencies](https://img.shields.io/badge/runtime%20dependencies-none-16a34a?style=for-the-badge)](package.json)
12
12
 
13
13
  [简体中文](https://github.com/KeS1Ke/dsh-exit/blob/main/README.zh-CN.md)
@@ -25,7 +25,7 @@
25
25
  - Keeps the **Exit** section at the bottom of the settings navigation.
26
26
  - Calls the typed `dshExit/exit` Remote method only after confirmation.
27
27
  - Gives the gateway a short acknowledgement window, then ends the host process.
28
- - Releases every port held by that process, including the usual `127.0.0.1:3080`.
28
+ - Releases every port held by that process; the settings page displays the current dsh Web host and port.
29
29
  - Keeps the terminal window and browser tab available for the next action.
30
30
  - Uses the existing dsh design tokens and the Lucide `power` icon.
31
31
 
@@ -34,23 +34,23 @@
34
34
  The animation, video, and screenshot below are repository showcase assets. They stay in GitHub for documentation and are intentionally excluded from the npm package.
35
35
 
36
36
  <p align="center">
37
- <img src="docs/dsh-exit-landscape.webp" alt="Landscape animated dsh-exit flow generated by Archify" width="720">
37
+ <img src="https://raw.githubusercontent.com/KeS1Ke/dsh-exit/main/docs/dsh-exit-landscape.webp" alt="Landscape animated dsh-exit flow generated by Archify" width="720">
38
38
  </p>
39
39
 
40
40
  <p align="center">
41
- <video controls muted loop playsinline width="720" poster="docs/dsh-exit-landscape.webp">
42
- <source src="docs/dsh-exit-landscape.mp4" type="video/mp4">
43
- <source src="docs/dsh-exit-landscape.webm" type="video/webm">
41
+ <video controls muted loop playsinline width="720" poster="https://raw.githubusercontent.com/KeS1Ke/dsh-exit/main/docs/dsh-exit-landscape.webp">
42
+ <source src="https://raw.githubusercontent.com/KeS1Ke/dsh-exit/main/docs/dsh-exit-landscape.mp4" type="video/mp4">
43
+ <source src="https://raw.githubusercontent.com/KeS1Ke/dsh-exit/main/docs/dsh-exit-landscape.webm" type="video/webm">
44
44
  <a href="https://github.com/KeS1Ke/dsh-exit/blob/main/docs/dsh-exit-landscape.mp4">Download the exit-flow video</a>
45
45
  </video>
46
46
  </p>
47
47
 
48
48
  ## 📸 Real dsh UI
49
49
 
50
- The capture below comes from a running dsh Web profile with `dsh-exit` installed. The Exit control is now provided by the final section in the settings navigation.
50
+ The capture below is a current dsh settings view with `dsh-exit` installed. The red **Exit** entry is the plugin's real navigation item at the bottom of the settings list.
51
51
 
52
52
  <p align="center">
53
- <img src="docs/dsh-exit-real.png" alt="Running dsh Web UI with the dsh-exit power button in the lower-right corner" width="720">
53
+ <img src="https://raw.githubusercontent.com/KeS1Ke/dsh-exit/main/docs/dsh-exit-real.png" alt="Running dsh Web UI with the dsh-exit Exit entry at the bottom of Settings navigation" width="720">
54
54
  </p>
55
55
 
56
56
  ## 🧱 npm package contents
@@ -68,6 +68,7 @@ The npm package contains only the four core runtime files above plus package met
68
68
  | --- | --- |
69
69
  | Animated WebP | [`docs/dsh-exit-landscape.webp`](https://github.com/KeS1Ke/dsh-exit/blob/main/docs/dsh-exit-landscape.webp) |
70
70
  | MP4 / WebM video | [`docs/dsh-exit-landscape.mp4`](https://github.com/KeS1Ke/dsh-exit/blob/main/docs/dsh-exit-landscape.mp4) · [`docs/dsh-exit-landscape.webm`](https://github.com/KeS1Ke/dsh-exit/blob/main/docs/dsh-exit-landscape.webm) |
71
+ | Archify source | [`docs/exit-flow-landscape.html`](https://github.com/KeS1Ke/dsh-exit/blob/main/docs/exit-flow-landscape.html) · [`docs/exit-flow-landscape.workflow.json`](https://github.com/KeS1Ke/dsh-exit/blob/main/docs/exit-flow-landscape.workflow.json) |
71
72
  | Real UI capture | [`docs/dsh-exit-real.png`](https://github.com/KeS1Ke/dsh-exit/blob/main/docs/dsh-exit-real.png) |
72
73
 
73
74
 
@@ -90,7 +91,7 @@ dsh plugin --profile web remove @kesike/dsh-exit
90
91
 
91
92
  | Interaction | Result |
92
93
  | --- | --- |
93
- | Click the floating power button | Opens the confirmation modal. |
94
+ | Click the red **Exit** item at the bottom of Settings navigation | Opens the exit section and confirmation action. |
94
95
  | Click **Cancel**, press **Esc**, or click outside | Closes the modal without changing the host. |
95
96
  | Click **Confirm exit** | Disables duplicate actions and invokes the host Remote method. |
96
97
  | Remote call fails | Restores the controls and shows an inline error message. |
@@ -122,10 +123,10 @@ node --check lib/client.js
122
123
 
123
124
  - **Target:** DeepSeek Harness web profile
124
125
  - **Install mode:** npm package
125
- - **Surface:** lower-right floating control
126
+ - **Surface:** final section in the Settings navigation
126
127
  - **Action:** terminate the dsh host process
127
- - **Default port mentioned by dsh:** `127.0.0.1:3080`
128
- - **Repository topics:** `dsh` · `deepseek-harness` · `plugin` · `javascript` · `web`
128
+ - **Runtime port:** read from the current dsh Web address in the settings page
129
+ - **Repository topics:** `dsh` · `deepseek-harness` · `dsh-plugin` · `plugin` · `javascript` · `web`
129
130
 
130
131
  The power icon comes from [Lucide](https://lucide.dev/icons/power) and is used under its ISC license.
131
132
 
package/README.zh-CN.md CHANGED
@@ -7,7 +7,7 @@
7
7
  [![dsh Web 插件](https://img.shields.io/badge/dsh-Web%20%E6%8F%92%E4%BB%B6-4f46e5?style=for-the-badge)](https://npmjs.com/package/@deepseek-ai/dsh)
8
8
  [![npm](https://img.shields.io/npm/v/%40kesike%2Fdsh-exit?style=for-the-badge&label=npm)](https://www.npmjs.com/package/@kesike/dsh-exit)
9
9
  [![平台](https://img.shields.io/badge/%E5%B9%B3%E5%8F%B0-Web-0ea5e9?style=for-the-badge)](https://github.com/KeS1Ke/dsh-exit)
10
- [![版本](https://img.shields.io/badge/%E7%89%88%E6%9C%AC-0.2.1-64748b?style=for-the-badge)](package.json)
10
+ [![版本](https://img.shields.io/badge/%E7%89%88%E6%9C%AC-0.2.3-64748b?style=for-the-badge)](package.json)
11
11
  [![依赖](https://img.shields.io/badge/%E8%BF%90%E8%A1%8C%E6%97%B6%E4%BE%9D%E8%B5%96-%E6%97%A0-16a34a?style=for-the-badge)](package.json)
12
12
 
13
13
  **简体中文** | [English](https://github.com/KeS1Ke/dsh-exit/blob/main/README.md)
@@ -25,7 +25,7 @@
25
25
  - **退出**栏目始终位于设置左侧导航的最底部。
26
26
  - 确认后调用类型化的 `dshExit/exit` Remote 方法。
27
27
  - 先返回调用应答,再等待短暂窗口结束宿主进程。
28
- - 释放该进程占用的全部端口,包括常见的 `127.0.0.1:3080`。
28
+ - 释放该进程占用的全部端口;设置页会显示当前 dsh Web 的真实主机和端口。
29
29
  - 保留宿主终端窗口和浏览器标签页,方便后续操作。
30
30
  - 使用 dsh 现有设计令牌与 Lucide `power` 电源图标。
31
31
 
@@ -34,23 +34,23 @@
34
34
  下面的动画、视频和截图是仓库专用展示素材,保留在 GitHub 用于文档展示,并明确排除在 npm 包之外。
35
35
 
36
36
  <p align="center">
37
- <img src="docs/dsh-exit-landscape.webp" alt="由 Archify 生成的横版 dsh-exit 动态流程图" width="720">
37
+ <img src="https://raw.githubusercontent.com/KeS1Ke/dsh-exit/main/docs/dsh-exit-landscape.webp" alt="由 Archify 生成的横版 dsh-exit 动态流程图" width="720">
38
38
  </p>
39
39
 
40
40
  <p align="center">
41
- <video controls muted loop playsinline width="720" poster="docs/dsh-exit-landscape.webp">
42
- <source src="docs/dsh-exit-landscape.mp4" type="video/mp4">
43
- <source src="docs/dsh-exit-landscape.webm" type="video/webm">
41
+ <video controls muted loop playsinline width="720" poster="https://raw.githubusercontent.com/KeS1Ke/dsh-exit/main/docs/dsh-exit-landscape.webp">
42
+ <source src="https://raw.githubusercontent.com/KeS1Ke/dsh-exit/main/docs/dsh-exit-landscape.mp4" type="video/mp4">
43
+ <source src="https://raw.githubusercontent.com/KeS1Ke/dsh-exit/main/docs/dsh-exit-landscape.webm" type="video/webm">
44
44
  <a href="https://github.com/KeS1Ke/dsh-exit/blob/main/docs/dsh-exit-landscape.mp4">下载退出流程视频</a>
45
45
  </video>
46
46
  </p>
47
47
 
48
48
  ## 📸 真实 dsh 界面
49
49
 
50
- 下图来自已经安装 `dsh-exit` 的真实 dsh Web profile;退出操作现在位于设置左侧导航的最后一栏。
50
+ 下图是已经安装 `dsh-exit` 的真实 dsh 设置界面;红色的**退出**就是设置左侧列表底部的插件导航项。
51
51
 
52
52
  <p align="center">
53
- <img src="docs/dsh-exit-real.png" alt="运行中的 dsh Web 界面与右下角 dsh-exit 电源按钮" width="720">
53
+ <img src="https://raw.githubusercontent.com/KeS1Ke/dsh-exit/main/docs/dsh-exit-real.png" alt="运行中的 dsh Web 设置界面与底部的 dsh-exit 退出栏目" width="720">
54
54
  </p>
55
55
 
56
56
  ## 🧱 npm 包内容
@@ -68,6 +68,7 @@ npm 包只包含上面四个核心运行文件、包元数据和 README;GitHub
68
68
  | --- | --- |
69
69
  | 动画 WebP | [`docs/dsh-exit-landscape.webp`](https://github.com/KeS1Ke/dsh-exit/blob/main/docs/dsh-exit-landscape.webp) |
70
70
  | MP4 / WebM 视频 | [`docs/dsh-exit-landscape.mp4`](https://github.com/KeS1Ke/dsh-exit/blob/main/docs/dsh-exit-landscape.mp4) · [`docs/dsh-exit-landscape.webm`](https://github.com/KeS1Ke/dsh-exit/blob/main/docs/dsh-exit-landscape.webm) |
71
+ | Archify 源文件 | [`docs/exit-flow-landscape.html`](https://github.com/KeS1Ke/dsh-exit/blob/main/docs/exit-flow-landscape.html) · [`docs/exit-flow-landscape.workflow.json`](https://github.com/KeS1Ke/dsh-exit/blob/main/docs/exit-flow-landscape.workflow.json) |
71
72
  | 真实界面截图 | [`docs/dsh-exit-real.png`](https://github.com/KeS1Ke/dsh-exit/blob/main/docs/dsh-exit-real.png) |
72
73
 
73
74
 
@@ -90,7 +91,7 @@ dsh plugin --profile web remove @kesike/dsh-exit
90
91
 
91
92
  | 操作 | 结果 |
92
93
  | --- | --- |
93
- | 点击悬浮电源按钮 | 打开确认弹窗。 |
94
+ | 点击设置左侧列表底部的红色**退出**栏目 | 打开退出栏目和确认操作。 |
94
95
  | 点击**取消**、按 `Esc` 或点击弹窗外部 | 关闭弹窗,不改变宿主状态。 |
95
96
  | 点击**确认退出** | 禁用重复操作并调用宿主 Remote 方法。 |
96
97
  | Remote 调用失败 | 恢复控件并显示行内错误信息。 |
@@ -122,10 +123,10 @@ node --check lib/client.js
122
123
 
123
124
  - **目标:** DeepSeek Harness Web profile
124
125
  - **安装方式:** npm 包
125
- - **界面位置:** 右下角悬浮控件
126
+ - **界面位置:** 设置左侧导航的最后一栏
126
127
  - **执行动作:** 结束 dsh 宿主进程
127
- - **dsh 常见端口:** `127.0.0.1:3080`
128
- - **仓库主题:** `dsh` · `deepseek-harness` · `plugin` · `javascript` · `web`
128
+ - **运行端口:** 从设置页当前 dsh Web 地址动态读取
129
+ - **仓库主题:** `dsh` · `deepseek-harness` · `dsh-plugin` · `plugin` · `javascript` · `web`
129
130
 
130
131
  电源图标来自 [Lucide](https://lucide.dev/icons/power),遵循其 ISC 许可使用。
131
132
 
package/lib/client.js CHANGED
@@ -91,10 +91,10 @@ window.__ModuleLoader__.load({
91
91
  nav: "退出",
92
92
  title: "退出 dsh",
93
93
  description: "从这里安全结束 dsh 宿主进程,并释放它占用的端口。",
94
- warning: "确认后将结束所有运行中的会话并停止后台服务,3080 端口会随之释放。",
94
+ warning: "确认后将结束所有运行中的会话并停止后台服务,当前 dsh Web 端口 {endpoint} 会随之释放。",
95
95
  button: "确认退出",
96
96
  dialogTitle: "退出 DeepSeek Harness?",
97
- dialogBody: "退出后将结束所有运行中的会话并停止后台服务,3080 端口会随之释放。",
97
+ dialogBody: "退出后将结束所有运行中的会话并停止后台服务,当前 dsh Web 端口 {endpoint} 会随之释放。",
98
98
  cancel: "取消",
99
99
  confirm: "确认退出",
100
100
  exiting: "正在退出…",
@@ -104,10 +104,10 @@ window.__ModuleLoader__.load({
104
104
  nav: "Exit",
105
105
  title: "Exit dsh",
106
106
  description: "Safely terminate the dsh host process and release the ports it owns.",
107
- warning: "Confirming ends all running sessions and stops the background service, releasing port 3080.",
107
+ warning: "Confirming ends all running sessions and stops the background service, releasing the current dsh Web port {endpoint}.",
108
108
  button: "Confirm exit",
109
109
  dialogTitle: "Exit DeepSeek Harness?",
110
- dialogBody: "This ends all running sessions and stops the background service, releasing port 3080.",
110
+ dialogBody: "This ends all running sessions and stops the background service, releasing the current dsh Web port {endpoint}.",
111
111
  cancel: "Cancel",
112
112
  confirm: "Confirm exit",
113
113
  exiting: "Exiting…",
@@ -127,8 +127,14 @@ window.__ModuleLoader__.load({
127
127
  document.head.appendChild(tag);
128
128
  }
129
129
 
130
- function textOf(t, key) {
131
- return typeof t === "function" ? t(key) : DICT.zh[key] ?? key;
130
+ function textOf(t, key, values = {}) {
131
+ const raw = typeof t === "function" ? t(key, values) : DICT.zh[key] ?? key;
132
+ return String(raw).replace(/\{([A-Za-z0-9_]+)\}/g, (match, name) => values[name] === undefined ? match : String(values[name]));
133
+ }
134
+
135
+ function currentDshEndpoint() {
136
+ const location = globalThis.location;
137
+ return location?.host || "当前 Web 端口";
132
138
  }
133
139
 
134
140
  /** dsh 的设置壳层为未知 section 使用齿轮图标;给本插件的导航项换成 power 图标。 */
@@ -166,6 +172,7 @@ window.__ModuleLoader__.load({
166
172
  }
167
173
 
168
174
  function ExitSettingsSection({ ctx, t }) {
175
+ const endpoint = currentDshEndpoint();
169
176
  return h("section", {
170
177
  className: "dshExitSettings",
171
178
  "aria-labelledby": "dsh-exit-settings-title"
@@ -182,7 +189,7 @@ window.__ModuleLoader__.load({
182
189
  ])
183
190
  ]),
184
191
  h("div", { className: "dshExitSettingsCard", key: "card" }, [
185
- h("p", { className: "dshExitSettingsWarning", key: "warning" }, textOf(t, "warning")),
192
+ h("p", { className: "dshExitSettingsWarning", key: "warning" }, textOf(t, "warning", { endpoint })),
186
193
  h("button", {
187
194
  type: "button",
188
195
  className: "dshExitSettingsButton",
@@ -209,7 +216,8 @@ window.__ModuleLoader__.load({
209
216
  }
210
217
 
211
218
  function openModal(ctx, exitBtn, t) {
212
- const text = (key) => textOf(t, key);
219
+ const endpoint = currentDshEndpoint();
220
+ const text = (key) => textOf(t, key, { endpoint });
213
221
  closeModal();
214
222
  overlayEl = document.createElement("div");
215
223
  overlayEl.className = "dshExitOverlay";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kesike/dsh-exit",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "type": "module",
5
5
  "description": "在 dsh web 界面提供退出按钮:确认后结束宿主进程并释放端口",
6
6
  "keywords": [