@michengai/dsh-simplify 0.1.6 → 0.1.7
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 +5 -0
- package/CHANGELOG.zh-CN.md +5 -0
- package/README.md +5 -5
- package/README.zh-CN.md +5 -5
- package/lib/client.d.ts +10 -0
- package/lib/client.js +4 -0
- package/lib/client.js.map +7 -0
- package/package.json +27 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
[简体中文](CHANGELOG.zh-CN.md)
|
|
4
4
|
|
|
5
|
+
## 0.1.7 - 2026-09-18
|
|
6
|
+
|
|
7
|
+
- Show the official Enhance icon and a Simplify/简化 title on the `/simplify` slash-menu row, matching commands such as BTW and review.
|
|
8
|
+
- Use a bilingual package description so the plugin manager matches the GitHub About text.
|
|
9
|
+
|
|
5
10
|
## 0.1.6 - 2026-09-18
|
|
6
11
|
|
|
7
12
|
- Support DSH `0.1.6-alpha.2` while retaining compatibility with `0.1.0-rc.8`, `0.1.1-rc.2`, `0.1.2-rc.1`, `0.1.5-rc.1`, `0.1.5-rc.2`, and `0.1.6-alpha.1`.
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
[English](CHANGELOG.md)
|
|
4
4
|
|
|
5
|
+
## 0.1.7 - 2026-09-18
|
|
6
|
+
|
|
7
|
+
- `/simplify` 斜杠菜单补上官方 Enhance 图标和「简化」标题,与旁问、审查等命令一致。
|
|
8
|
+
- 插件描述改为中英文双语,插件管理页与仓库简介一致。
|
|
9
|
+
|
|
5
10
|
## 0.1.6 - 2026-09-18
|
|
6
11
|
|
|
7
12
|
- 支持 DSH `0.1.6-alpha.2`,继续兼容 `0.1.0-rc.8`、`0.1.1-rc.2`、`0.1.2-rc.1`、`0.1.5-rc.1`、`0.1.5-rc.2` 和 `0.1.6-alpha.1`。
|
package/README.md
CHANGED
|
@@ -60,14 +60,14 @@ For a desktop workbench, download [DSH Codex Desktop](https://github.com/Micheng
|
|
|
60
60
|
|
|
61
61
|
## Installation
|
|
62
62
|
|
|
63
|
-
The current version is `0.1.
|
|
63
|
+
The current version is `0.1.7`. The commands below use the `web` profile; replace it for your environment. Disable other plugins that register `/simplify` before installation.
|
|
64
64
|
|
|
65
65
|
### Ask an agent to install it (recommended)
|
|
66
66
|
|
|
67
67
|
Send the prompt below to any agent that can run terminal commands on your computer. Replace `web` with your actual profile. Once installed, use the plugin in DSH.
|
|
68
68
|
|
|
69
69
|
```text
|
|
70
|
-
Install the DSH plugin @michengai/dsh-simplify into my local web profile by running: dsh plugin --profile web add @michengai/dsh-simplify@0.1.
|
|
70
|
+
Install the DSH plugin @michengai/dsh-simplify into my local web profile by running: dsh plugin --profile web add @michengai/dsh-simplify@0.1.7 --registry=https://registry.npmjs.org/. Then run dsh --profile web --dump-config, confirm the configuration includes michengai-simplify, and explain how to reload DSH and start using the plugin.
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
### Install from npm
|
|
@@ -76,19 +76,19 @@ Install the DSH plugin @michengai/dsh-simplify into my local web profile by runn
|
|
|
76
76
|
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
|
77
77
|
$OutputEncoding = [System.Text.Encoding]::UTF8
|
|
78
78
|
|
|
79
|
-
dsh plugin --profile web add @michengai/dsh-simplify@0.1.
|
|
79
|
+
dsh plugin --profile web add @michengai/dsh-simplify@0.1.7 --registry=https://registry.npmjs.org/
|
|
80
80
|
```
|
|
81
81
|
|
|
82
82
|
<details>
|
|
83
83
|
<summary>Install from a local package</summary>
|
|
84
84
|
|
|
85
|
-
Download the published tgz from the [GitHub Release](https://github.com/MichengAI/dsh-simplify/releases/tag/v0.1.
|
|
85
|
+
Download the published tgz from the [GitHub Release](https://github.com/MichengAI/dsh-simplify/releases/tag/v0.1.7), then run this from the package directory:
|
|
86
86
|
|
|
87
87
|
```powershell
|
|
88
88
|
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
|
89
89
|
$OutputEncoding = [System.Text.Encoding]::UTF8
|
|
90
90
|
|
|
91
|
-
dsh plugin --profile web add .\michengai-dsh-simplify-0.1.
|
|
91
|
+
dsh plugin --profile web add .\michengai-dsh-simplify-0.1.7.tgz --ignore-scripts
|
|
92
92
|
```
|
|
93
93
|
|
|
94
94
|
</details>
|
package/README.zh-CN.md
CHANGED
|
@@ -60,14 +60,14 @@
|
|
|
60
60
|
|
|
61
61
|
## 安装
|
|
62
62
|
|
|
63
|
-
当前版本为 `0.1.
|
|
63
|
+
当前版本为 `0.1.7`。以下命令使用 `web` profile,请按实际环境替换。安装前停用其他注册 `/simplify` 的插件。
|
|
64
64
|
|
|
65
65
|
### 让 Agent 帮你安装(推荐)
|
|
66
66
|
|
|
67
67
|
把下面这段话发给任意能够执行本机终端命令的 Agent。将 `web` 替换为实际使用的 profile;安装完成后,在 DSH 中使用本插件。
|
|
68
68
|
|
|
69
69
|
```text
|
|
70
|
-
请将 DSH 插件 @michengai/dsh-simplify 安装到本机 web profile,执行:dsh plugin --profile web add @michengai/dsh-simplify@0.1.
|
|
70
|
+
请将 DSH 插件 @michengai/dsh-simplify 安装到本机 web profile,执行:dsh plugin --profile web add @michengai/dsh-simplify@0.1.7 --registry=https://registry.npmjs.org/。安装后执行 dsh --profile web --dump-config,确认配置包含 michengai-simplify,并告诉我如何重新加载 DSH 和开始使用。
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
### 手动从 npm 安装
|
|
@@ -76,19 +76,19 @@
|
|
|
76
76
|
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
|
77
77
|
$OutputEncoding = [System.Text.Encoding]::UTF8
|
|
78
78
|
|
|
79
|
-
dsh plugin --profile web add @michengai/dsh-simplify@0.1.
|
|
79
|
+
dsh plugin --profile web add @michengai/dsh-simplify@0.1.7 --registry=https://registry.npmjs.org/
|
|
80
80
|
```
|
|
81
81
|
|
|
82
82
|
<details>
|
|
83
83
|
<summary>从本地安装包安装</summary>
|
|
84
84
|
|
|
85
|
-
从 [GitHub Release](https://github.com/MichengAI/dsh-simplify/releases/tag/v0.1.
|
|
85
|
+
从 [GitHub Release](https://github.com/MichengAI/dsh-simplify/releases/tag/v0.1.7) 下载已发布的 tgz,然后在安装包所在目录执行:
|
|
86
86
|
|
|
87
87
|
```powershell
|
|
88
88
|
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
|
89
89
|
$OutputEncoding = [System.Text.Encoding]::UTF8
|
|
90
90
|
|
|
91
|
-
dsh plugin --profile web add .\michengai-dsh-simplify-0.1.
|
|
91
|
+
dsh plugin --profile web add .\michengai-dsh-simplify-0.1.7.tgz --ignore-scripts
|
|
92
92
|
```
|
|
93
93
|
|
|
94
94
|
</details>
|
package/lib/client.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type Lookup = {
|
|
2
|
+
get?: (name: string) => unknown;
|
|
3
|
+
};
|
|
4
|
+
interface ClientScope extends Lookup {
|
|
5
|
+
inject?(deps: string[], callback: (scope: Lookup) => () => void): unknown;
|
|
6
|
+
effect?(fn: () => () => void): unknown;
|
|
7
|
+
}
|
|
8
|
+
/** 给宿主 `/simplify` 补官方图标和中英文标题;没有 commandUi 的旧宿主会跳过。 */
|
|
9
|
+
export declare function apply(ctx: ClientScope): unknown;
|
|
10
|
+
export {};
|
package/lib/client.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
window.__ModuleLoader__.load({id:"@michengai/dsh-simplify",factory:(require)=>{var module={exports:{}};var exports=module.exports;
|
|
2
|
+
"use strict";var u=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var y=(n,e)=>{for(var o in e)u(n,o,{get:e[o],enumerable:!0})},g=(n,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of k(e))!m.call(n,t)&&t!==o&&u(n,t,{get:()=>e[t],enumerable:!(i=l(e,t))||i.enumerable});return n};var w=n=>g(u({},"__esModule",{value:!0}),n);var b={};y(b,{apply:()=>v});module.exports=w(b);var p=require("@deepseek-ai/dsh-client-ui-primitives"),r={icon:p.IconEnhanceOutline16,zh:"\u7B80\u5316",en:"Simplify"};function h(n){let e=n.get?.("locale");return typeof e?.snapshot?.active=="string"&&/^en(?:-|$)/i.test(e.snapshot.active)}function f(n,e){let o=n,i=o?.candidates;return!o||typeof i!="function"?()=>{}:(o.candidates=async(...t)=>{let s=await i.apply(o,t);if(!Array.isArray(s))return s;let d=h(e);return s.map(a=>{if(!a||typeof a!="object"||!("name"in a)||typeof a.name!="string")return a;let c=a;return c.name!=="simplify"?c:{...c,...c.icon===void 0?{icon:r.icon}:{},...c.label===void 0?{label:d?r.en:r.zh}:{}}})},()=>{o.candidates=i})}function v(n){return typeof n.inject=="function"?n.inject(["commandUi"],e=>f(e.get?.("commandUi"),n)):n.effect?.(()=>f(n.get?.("commandUi"),n))}
|
|
3
|
+
return module.exports;}});
|
|
4
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/client.ts"],
|
|
4
|
+
"sourcesContent": ["import { IconEnhanceOutline16 } from '@deepseek-ai/dsh-client-ui-primitives';\n\n/** Host `/` \u884C\u6CA1\u6709 icon/label\uFF1B\u5B98\u65B9\u53EA\u7ED9\u4E00\u7B49\u547D\u4EE4\u753B\u8138\u3002\u540C\u540D\u8D21\u732E\u4F1A\u649E\u8F66\uFF0C\u53EA\u80FD\u8865 candidates\u3002 */\nconst FACE = { icon: IconEnhanceOutline16, zh: '\u7B80\u5316', en: 'Simplify' } as const;\n\ntype Lookup = { get?: (name: string) => unknown };\n\nfunction english(ctx: Lookup): boolean {\n const locale = ctx.get?.('locale') as { snapshot?: { active?: unknown } } | undefined;\n return typeof locale?.snapshot?.active === 'string' && /^en(?:-|$)/i.test(locale.snapshot.active);\n}\n\nfunction decorateSlashFace(commandUi: unknown, ctx: Lookup): () => void {\n const live = commandUi as { candidates?: (...args: unknown[]) => unknown } | undefined;\n const original = live?.candidates;\n if (!live || typeof original !== 'function') return () => {};\n live.candidates = async (...args: unknown[]) => {\n const rows = await original.apply(live, args);\n if (!Array.isArray(rows)) return rows;\n const en = english(ctx);\n return rows.map((row: unknown) => {\n if (!row || typeof row !== 'object' || !('name' in row) || typeof (row as { name: unknown }).name !== 'string') return row;\n const item = row as { name: string; icon?: unknown; label?: unknown };\n if (item.name !== 'simplify') return item;\n return {\n ...item,\n ...(item.icon === undefined ? { icon: FACE.icon } : {}),\n ...(item.label === undefined ? { label: en ? FACE.en : FACE.zh } : {}),\n };\n });\n };\n return () => { live.candidates = original; };\n}\n\ninterface ClientScope extends Lookup {\n inject?(deps: string[], callback: (scope: Lookup) => () => void): unknown;\n effect?(fn: () => () => void): unknown;\n}\n\n/** \u7ED9\u5BBF\u4E3B `/simplify` \u8865\u5B98\u65B9\u56FE\u6807\u548C\u4E2D\u82F1\u6587\u6807\u9898\uFF1B\u6CA1\u6709 commandUi \u7684\u65E7\u5BBF\u4E3B\u4F1A\u8DF3\u8FC7\u3002 */\nexport function apply(ctx: ClientScope): unknown {\n if (typeof ctx.inject === 'function') return ctx.inject(['commandUi'], scope => decorateSlashFace(scope.get?.('commandUi'), ctx));\n return ctx.effect?.(() => decorateSlashFace(ctx.get?.('commandUi'), ctx));\n}\n"],
|
|
5
|
+
"mappings": ";yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAqC,iDAG/BC,EAAO,CAAE,KAAM,uBAAsB,GAAI,eAAM,GAAI,UAAW,EAIpE,SAASC,EAAQC,EAAsB,CACrC,IAAMC,EAASD,EAAI,MAAM,QAAQ,EACjC,OAAO,OAAOC,GAAQ,UAAU,QAAW,UAAY,cAAc,KAAKA,EAAO,SAAS,MAAM,CAClG,CAEA,SAASC,EAAkBC,EAAoBH,EAAyB,CACtE,IAAMI,EAAOD,EACPE,EAAWD,GAAM,WACvB,MAAI,CAACA,GAAQ,OAAOC,GAAa,WAAmB,IAAM,CAAC,GAC3DD,EAAK,WAAa,SAAUE,IAAoB,CAC9C,IAAMC,EAAO,MAAMF,EAAS,MAAMD,EAAME,CAAI,EAC5C,GAAI,CAAC,MAAM,QAAQC,CAAI,EAAG,OAAOA,EACjC,IAAMC,EAAKT,EAAQC,CAAG,EACtB,OAAOO,EAAK,IAAKE,GAAiB,CAChC,GAAI,CAACA,GAAO,OAAOA,GAAQ,UAAY,EAAE,SAAUA,IAAQ,OAAQA,EAA0B,MAAS,SAAU,OAAOA,EACvH,IAAMC,EAAOD,EACb,OAAIC,EAAK,OAAS,WAAmBA,EAC9B,CACL,GAAGA,EACH,GAAIA,EAAK,OAAS,OAAY,CAAE,KAAMZ,EAAK,IAAK,EAAI,CAAC,EACrD,GAAIY,EAAK,QAAU,OAAY,CAAE,MAAOF,EAAKV,EAAK,GAAKA,EAAK,EAAG,EAAI,CAAC,CACtE,CACF,CAAC,CACH,EACO,IAAM,CAAEM,EAAK,WAAaC,CAAU,EAC7C,CAQO,SAASV,EAAMK,EAA2B,CAC/C,OAAI,OAAOA,EAAI,QAAW,WAAmBA,EAAI,OAAO,CAAC,WAAW,EAAGW,GAAST,EAAkBS,EAAM,MAAM,WAAW,EAAGX,CAAG,CAAC,EACzHA,EAAI,SAAS,IAAME,EAAkBF,EAAI,MAAM,WAAW,EAAGA,CAAG,CAAC,CAC1E",
|
|
6
|
+
"names": ["client_exports", "__export", "apply", "__toCommonJS", "import_dsh_client_ui_primitives", "FACE", "english", "ctx", "locale", "decorateSlashFace", "commandUi", "live", "original", "args", "rows", "en", "row", "item", "scope"]
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@michengai/dsh-simplify",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "DSH
|
|
3
|
+
"version": "0.1.7",
|
|
4
|
+
"description": "DSH Simplify — 为 DeepSeek Harness 提供限定 Git 变更范围的代码简化,支持未跟踪文件、跨平台路径与可靠的 Git 异常处理 · Git-scoped code simplification with untracked-file support, cross-platform paths, and reliable Git error handling for DeepSeek Harness",
|
|
5
5
|
"repository": { "type": "git", "url": "git+https://github.com/MichengAI/dsh-simplify.git" },
|
|
6
6
|
"homepage": "https://github.com/MichengAI/dsh-simplify#readme",
|
|
7
7
|
"bugs": { "url": "https://github.com/MichengAI/dsh-simplify/issues" },
|
|
@@ -10,11 +10,23 @@
|
|
|
10
10
|
"engines": { "node": ">=22.19.0" },
|
|
11
11
|
"main": "./lib/index.js",
|
|
12
12
|
"types": "./lib/index.d.ts",
|
|
13
|
-
"exports": {
|
|
13
|
+
"exports": {
|
|
14
|
+
".": { "types": "./lib/index.d.ts", "default": "./lib/index.js" },
|
|
15
|
+
"./client": { "default": "./lib/client.js" }
|
|
16
|
+
},
|
|
14
17
|
"files": ["lib", "assets/branding/dsh-simplify-banner.png", "cordis.patch.yml", "README.md", "README.zh-CN.md", "LICENSE", "CHANGELOG.md", "CHANGELOG.zh-CN.md"],
|
|
15
|
-
"dsh": {
|
|
18
|
+
"dsh": {
|
|
19
|
+
"bundle": { "patch": "./cordis.patch.yml" },
|
|
20
|
+
"client": {
|
|
21
|
+
"platform": "web",
|
|
22
|
+
"inject": [
|
|
23
|
+
"@deepseek-ai/dsh-client-ui-commands",
|
|
24
|
+
"@deepseek-ai/dsh-client-ui-primitives"
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
},
|
|
16
28
|
"scripts": {
|
|
17
|
-
"build": "tsc -p tsconfig.json",
|
|
29
|
+
"build": "tsc -p tsconfig.json && node scripts/build-client.mjs",
|
|
18
30
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
19
31
|
"test": "npm run build && node --test tests/*.test.mjs",
|
|
20
32
|
"check": "npm run typecheck && npm test",
|
|
@@ -25,15 +37,24 @@
|
|
|
25
37
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
26
38
|
"@deepseek-ai/dsh-commands": "0.1.0-rc.8 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.6-alpha.1 || 0.1.6-alpha.2",
|
|
27
39
|
"@deepseek-ai/dsh-llm": "0.1.0-rc.8 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.6-alpha.1 || 0.1.6-alpha.2",
|
|
28
|
-
"@deepseek-ai/dsh-subprocess": "0.1.0-rc.8 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.6-alpha.1 || 0.1.6-alpha.2"
|
|
40
|
+
"@deepseek-ai/dsh-subprocess": "0.1.0-rc.8 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.6-alpha.1 || 0.1.6-alpha.2",
|
|
41
|
+
"@deepseek-ai/dsh-client-ui-commands": "0.1.6-alpha.2",
|
|
42
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.1.6-alpha.2"
|
|
43
|
+
},
|
|
44
|
+
"peerDependenciesMeta": {
|
|
45
|
+
"@deepseek-ai/dsh-client-ui-commands": { "optional": true },
|
|
46
|
+
"@deepseek-ai/dsh-client-ui-primitives": { "optional": true }
|
|
29
47
|
},
|
|
30
48
|
"devDependencies": {
|
|
31
49
|
"@deepseek-ai/cordis": "4.0.2",
|
|
50
|
+
"@deepseek-ai/dsh-client-ui-commands": "0.1.6-alpha.2",
|
|
51
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.1.6-alpha.2",
|
|
32
52
|
"@deepseek-ai/dsh-commands": "0.1.6-alpha.2",
|
|
33
53
|
"@deepseek-ai/dsh-llm": "0.1.6-alpha.2",
|
|
34
54
|
"@deepseek-ai/dsh-subprocess": "0.1.6-alpha.2",
|
|
35
55
|
"@deepseek-ai/dsh-subprocess-local": "0.1.6-alpha.2",
|
|
36
56
|
"@types/node": "^22.19.0",
|
|
57
|
+
"esbuild": "^0.25.0",
|
|
37
58
|
"typescript": "~5.7.2"
|
|
38
59
|
}
|
|
39
60
|
}
|