dsh-mcp-manager-plus 0.4.2 → 0.4.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/CHANGELOG.md +28 -0
- package/lib/client.js +5 -2
- package/lib/index.js +18 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,33 @@
|
|
|
5
5
|
|
|
6
6
|
0.3.1 之前的开发发生在公开仓库建立之前,历史没有保留。
|
|
7
7
|
|
|
8
|
+
## [0.4.3] - 2026-10-09
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **安装路径含空格时补丁文件被误判为「不可写」**(DSH Desktop / Windows):
|
|
13
|
+
`fromFileUrl()` 用 `new URL().pathname` 读取路径,会保留百分号编码——DSH Desktop
|
|
14
|
+
以 `file://` URL 传入 include 路径,`D:\DeepSeek Harness\` 因此变成
|
|
15
|
+
`DeepSeek%20Harness`,指向一个并不存在的文件,`W_OK` 探测失败后页面报
|
|
16
|
+
「配置文件不可写」并拒绝所有保存。现在改用 `fileURLToPath()`(解码 `%20`
|
|
17
|
+
等转义,并正确处理 Windows 盘符前导斜杠与 UNC 主机),手动解析仅作兜底
|
|
18
|
+
(感谢 @Lzh3070 的报告与定位)
|
|
19
|
+
- **暗色主题下主按钮白底白字、文字不可读**:`.mcpmp-btn-primary` 把前景硬编码成
|
|
20
|
+
`#fff`,而背景用的 `--dsw-alias-brand-primary` 会随主题翻转(亮色 `#0f1115`、
|
|
21
|
+
暗色 `#f9fafb`),暗色下于是成了白字配近白底。现在按 harness 自身主按钮的配对
|
|
22
|
+
改用 `--dsw-alias-button-primary-fill` + `--dsw-alias-label-primary-foreground`
|
|
23
|
+
(分别以 `brand-primary` / `label-primary-inverted` / `#fff` 兜底),hover 换成
|
|
24
|
+
官方的 `--dsw-alias-button-primary-hover`,取代在近白底上几乎无效的
|
|
25
|
+
`filter:brightness(1.08)`(感谢 @OTH-C3 的报告与定位)
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
|
|
29
|
+
- 回归用例:`file://` include 路径含 `%20` 时,`patchPath` 必须指向真实文件且
|
|
30
|
+
`writable` 必须为 `true`;把 `lib/index.js` 还原成旧实现可复现该用例失败
|
|
31
|
+
- 回归用例:任何把「会随主题翻转的填充色」(`brand-primary` /
|
|
32
|
+
`button-primary-fill`)与字面前景色写进同一条规则的样式都会被判失败
|
|
33
|
+
(测试总数 113 → 115)
|
|
34
|
+
|
|
8
35
|
## [0.4.2] - 2026-09-30
|
|
9
36
|
|
|
10
37
|
### Fixed
|
|
@@ -94,6 +121,7 @@
|
|
|
94
121
|
JSON 编辑、宿主路由、bundle 加载、profile 组合与真实 profile 只读验证;
|
|
95
122
|
另附 e2e 导入、往返校验、图标预览等辅助脚本
|
|
96
123
|
|
|
124
|
+
[0.4.3]: https://github.com/appthin/dsh-mcp-manager-plus/compare/v0.4.2...v0.4.3
|
|
97
125
|
[0.4.2]: https://github.com/appthin/dsh-mcp-manager-plus/compare/v0.4.1...v0.4.2
|
|
98
126
|
[0.4.1]: https://github.com/appthin/dsh-mcp-manager-plus/compare/v0.4.0...v0.4.1
|
|
99
127
|
[0.4.0]: https://github.com/appthin/dsh-mcp-manager-plus/compare/v0.3.1...v0.4.0
|
package/lib/client.js
CHANGED
|
@@ -221,8 +221,11 @@ window.__ModuleLoader__.load({
|
|
|
221
221
|
'.mcpmp-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:30px;padding:0 12px;border-radius:8px;border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);font-size:12px;cursor:pointer;white-space:nowrap}',
|
|
222
222
|
'.mcpmp-btn:hover:not(:disabled){background:var(--dsw-alias-bg-layer-2)}',
|
|
223
223
|
'.mcpmp-btn:disabled{opacity:.5;cursor:not-allowed}',
|
|
224
|
-
|
|
225
|
-
|
|
224
|
+
// The primary fill flips with the theme — dark in the light theme,
|
|
225
|
+
// near-white in the dark one — so its label must come from the matching
|
|
226
|
+
// token. A literal white was invisible on the dark theme's fill.
|
|
227
|
+
'.mcpmp-btn-primary{background:var(--dsw-alias-button-primary-fill,var(--dsw-alias-brand-primary));border-color:transparent;color:var(--dsw-alias-label-primary-foreground,var(--dsw-alias-label-primary-inverted,#fff))}',
|
|
228
|
+
'.mcpmp-btn-primary:hover:not(:disabled){background:var(--dsw-alias-button-primary-hover,var(--dsw-alias-button-primary-fill,var(--dsw-alias-brand-primary)))}',
|
|
226
229
|
'.mcpmp-btn-danger{color:var(--dsw-alias-state-error-primary)}',
|
|
227
230
|
'.mcpmp-btn-sm{height:26px;padding:0 9px;font-size:12px}',
|
|
228
231
|
'.mcpmp-icon{width:30px;padding:0}',
|
package/lib/index.js
CHANGED
|
@@ -275,11 +275,27 @@ function resolvePatchPath(ctx) {
|
|
|
275
275
|
return { patchPath: join(profileDir, 'cordis.patch.yml'), profileDir };
|
|
276
276
|
}
|
|
277
277
|
|
|
278
|
-
/**
|
|
278
|
+
/**
|
|
279
|
+
* Resolve a `file://` URL to a native path; a plain path is returned untouched.
|
|
280
|
+
*
|
|
281
|
+
* `new URL(value).pathname` keeps percent-encoding, which is what broke DSH
|
|
282
|
+
* Desktop: it hands over the include path as a file URL, so an install
|
|
283
|
+
* directory containing a space arrived as `DeepSeek%20Harness`, named a file
|
|
284
|
+
* that does not exist, and the writability probe below then reported the patch
|
|
285
|
+
* file as read-only. `fileURLToPath` decodes `%20` (and every other escape)
|
|
286
|
+
* and normalizes the Windows drive-letter slash and UNC hosts.
|
|
287
|
+
* @param value - a `file://` URL or a native path.
|
|
288
|
+
* @returns the native path.
|
|
289
|
+
*/
|
|
279
290
|
function fromFileUrl(value) {
|
|
280
291
|
if (!value.startsWith('file://')) return value;
|
|
281
292
|
try {
|
|
282
|
-
|
|
293
|
+
return fileURLToPath(value);
|
|
294
|
+
} catch {
|
|
295
|
+
// A malformed URL falls through to the manual parse.
|
|
296
|
+
}
|
|
297
|
+
try {
|
|
298
|
+
const path = decodeURIComponent(new URL(value).pathname);
|
|
283
299
|
// Windows file URLs carry a leading slash before the drive letter.
|
|
284
300
|
return /^\/[A-Za-z]:/u.test(path) ? path.slice(1) : path;
|
|
285
301
|
} catch {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-mcp-manager-plus",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "MCP manager settings page for DeepSeek Harness: list, enable, configure and add MCP servers from the browser, written durably to the profile's user patch layer.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"icon": "./icon.svg",
|