@michengai/dsh-simplify 0.1.11 → 0.1.13
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 +9 -0
- package/CHANGELOG.zh-CN.md +9 -0
- package/README.md +2 -2
- package/README.zh-CN.md +2 -2
- package/lib/client.d.ts +1 -1
- package/lib/client.js +1 -1
- package/lib/client.js.map +3 -3
- package/package.json +14 -13
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
[简体中文](CHANGELOG.zh-CN.md)
|
|
4
4
|
|
|
5
|
+
## 0.1.13 - 2026-09-30
|
|
6
|
+
|
|
7
|
+
- Slash-menu title and description follow the host language instead of the Chinese registry string. The syntax hint is unchanged.
|
|
8
|
+
|
|
9
|
+
## 0.1.12 - 2026-09-30
|
|
10
|
+
|
|
11
|
+
- Support DSH `0.2.0-rc.2` while retaining `0.2.0-rc.1`, `0.1.7-rc.2`, `0.1.7-rc.1`, `0.1.5-rc.3`, `0.1.5-rc.2`, `0.1.5-rc.1`, and `0.1.2-rc.1`.
|
|
12
|
+
- The declared host range includes `0.1.5-rc.3` and no longer lists `0.1.0-rc.8` or `0.1.1-rc.2`.
|
|
13
|
+
|
|
5
14
|
## 0.1.11 - 2026-09-28
|
|
6
15
|
|
|
7
16
|
- Support DSH `0.2.0-rc.1` while retaining compatibility with `0.1.7-rc.2`, `0.1.7-rc.1`, `0.1.0-rc.8`, `0.1.1-rc.2`, `0.1.2-rc.1`, `0.1.5-rc.1`, and `0.1.5-rc.2`.
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
[English](CHANGELOG.md)
|
|
4
4
|
|
|
5
|
+
## 0.1.13 - 2026-09-30
|
|
6
|
+
|
|
7
|
+
- 斜杠菜单的标题和说明跟随宿主语言,不再沿用注册表里的中文。语法提示保持不变。
|
|
8
|
+
|
|
9
|
+
## 0.1.12 - 2026-09-30
|
|
10
|
+
|
|
11
|
+
- 支持 DSH `0.2.0-rc.2`,继续兼容 `0.2.0-rc.1`、`0.1.7-rc.2`、`0.1.7-rc.1`、`0.1.5-rc.3`、`0.1.5-rc.2`、`0.1.5-rc.1` 和 `0.1.2-rc.1`。
|
|
12
|
+
- 声明的宿主范围纳入 `0.1.5-rc.3`,不再列出 `0.1.0-rc.8` 和 `0.1.1-rc.2`。
|
|
13
|
+
|
|
5
14
|
## 0.1.11 - 2026-09-28
|
|
6
15
|
|
|
7
16
|
- 支持 DSH `0.2.0-rc.1`,继续兼容 `0.1.7-rc.2`、`0.1.7-rc.1`、`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`。
|
package/README.md
CHANGED
|
@@ -54,7 +54,7 @@ For a desktop workbench, download [DSH Codex Desktop](https://github.com/Micheng
|
|
|
54
54
|
## Prerequisites
|
|
55
55
|
|
|
56
56
|
- DeepSeek Harness is installed, `dsh` is available in your terminal, and the host provides the `commands` and `subprocess` services.
|
|
57
|
-
- Host peer dependencies declare `0.1.
|
|
57
|
+
- Host peer dependencies declare `0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2`.
|
|
58
58
|
- Node.js >= 22.19 and Git on PATH.
|
|
59
59
|
- The current session is associated with a local Git project.
|
|
60
60
|
|
|
@@ -200,7 +200,7 @@ The entry point is `lib/index.js`, so build before installing. Keep the source d
|
|
|
200
200
|
|
|
201
201
|
### Verification
|
|
202
202
|
|
|
203
|
-
Development dependencies are pinned to DSH `0.2.0-rc.
|
|
203
|
+
Development dependencies are pinned to DSH `0.2.0-rc.2`. `npm run test:compat` reruns the real command and Git tests on each of the eight isolated host versions.
|
|
204
204
|
|
|
205
205
|
```powershell
|
|
206
206
|
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
package/README.zh-CN.md
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
## 前置条件
|
|
55
55
|
|
|
56
56
|
- 已安装 DeepSeek Harness,可在终端执行 `dsh`,宿主提供 `commands` 和 `subprocess` 服务。
|
|
57
|
-
- 宿主 peer 依赖声明为 `0.1.
|
|
57
|
+
- 宿主 peer 依赖声明为 `0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2`。
|
|
58
58
|
- Node.js >= 22.19,PATH 中可执行 Git。
|
|
59
59
|
- 当前会话关联本地 Git 项目。
|
|
60
60
|
|
|
@@ -200,7 +200,7 @@ dsh plugin --profile web add . --ignore-scripts
|
|
|
200
200
|
|
|
201
201
|
### 验证
|
|
202
202
|
|
|
203
|
-
开发依赖固定为 DSH `0.2.0-rc.
|
|
203
|
+
开发依赖固定为 DSH `0.2.0-rc.2`。`npm run test:compat` 在八个隔离宿主版本上重跑真实命令与 Git 测试。
|
|
204
204
|
|
|
205
205
|
```powershell
|
|
206
206
|
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
package/lib/client.d.ts
CHANGED
|
@@ -5,6 +5,6 @@ interface ClientScope extends Lookup {
|
|
|
5
5
|
inject?(deps: string[], callback: (scope: Lookup) => () => void): unknown;
|
|
6
6
|
effect?(fn: () => () => void): unknown;
|
|
7
7
|
}
|
|
8
|
-
/** 给宿主 `/simplify`
|
|
8
|
+
/** 给宿主 `/simplify` 补官方图标,并按当前界面语言覆盖标题和说明;没有 commandUi 的旧宿主会跳过。 */
|
|
9
9
|
export declare function apply(ctx: ClientScope): unknown;
|
|
10
10
|
export {};
|
package/lib/client.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
window.__ModuleLoader__.load({id:"@michengai/dsh-simplify",factory:(require)=>{var module={exports:{}};var exports=module.exports;
|
|
2
|
-
"use strict";var k=Object.create;var s=Object.defineProperty;var
|
|
2
|
+
"use strict";var k=Object.create;var s=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var w=(n,o)=>{for(var e in o)s(n,e,{get:o[e],enumerable:!0})},d=(n,o,e,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of y(o))!v.call(n,i)&&i!==e&&s(n,i,{get:()=>o[i],enumerable:!(t=g(o,i))||t.enumerable});return n};var b=(n,o,e)=>(e=n!=null?k(h(n)):{},d(o||!n||!n.__esModule?s(e,"default",{value:n,enumerable:!0}):e,n)),L=n=>d(s({},"__esModule",{value:!0}),n);var E={};w(E,{apply:()=>C});module.exports=L(E);var S=b(require("@deepseek-ai/dsh-client-ui-primitives"),1),l=S,j=l.IconEnhanceOutline16??l.IconEnhanceOutlineRegular,r={icon:j,zh:{label:"\u7B80\u5316",description:"\u7B80\u5316\u6700\u8FD1\u6539\u52A8\u7684\u4EE3\u7801\uFF0C\u4FDD\u6301\u529F\u80FD\u5E76\u9650\u5B9A\u4FEE\u6539\u8303\u56F4"},en:{label:"Simplify",description:"Simplify recent code changes, preserve behavior, and limit the edit scope."}};function A(n){let e=n.get?.("locale")?.snapshot?.active;return typeof e=="string"&&/^en(?:-|$)/i.test(e.replace(/_/g,"-"))}function f(n,o){let e=n,t=e?.candidates;return!e||typeof t!="function"?()=>{}:(e.candidates=async(...i)=>{let u=await t.apply(e,i);if(!Array.isArray(u))return u;let m=A(o);return u.map(c=>{if(!c||typeof c!="object"||!("name"in c)||typeof c.name!="string")return c;let a=c;if(a.name!=="simplify")return a;let p=m?r.en:r.zh;return{...a,...a.icon===void 0&&r.icon!==void 0?{icon:r.icon}:{},label:p.label,description:p.description}})},()=>{e.candidates=t})}function C(n){return typeof n.inject=="function"?n.inject(["commandUi"],o=>f(o.get?.("commandUi"),n)):n.effect?.(()=>f(n.get?.("commandUi"),n))}
|
|
3
3
|
return module.exports;}});
|
|
4
4
|
//# sourceMappingURL=client.js.map
|
package/lib/client.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/client.ts"],
|
|
4
|
-
"sourcesContent": ["import * as primitives from '@deepseek-ai/dsh-client-ui-primitives';\n\n/** 0.1.6 \u5BFC\u51FA IconEnhanceOutline16\uFF1B0.1.7 \u6539\u4E3A Regular\uFF0C\u753B\u5E03\u4ECD\u662F 16\u3002 */\nconst icons = primitives as Record<string, unknown>;\nconst enhanceIcon = icons.IconEnhanceOutline16 ?? icons.IconEnhanceOutlineRegular;\n\n/** Host `/` \u884C\u6CA1\u6709
|
|
5
|
-
"mappings": ";0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA4B,sDAGtBC,EAAQD,EACRE,EAAcD,EAAM,sBAAwBA,EAAM,0BAGlDE,EAAO,
|
|
6
|
-
"names": ["client_exports", "__export", "apply", "__toCommonJS", "primitives", "icons", "enhanceIcon", "FACE", "english", "ctx", "
|
|
4
|
+
"sourcesContent": ["import * as primitives from '@deepseek-ai/dsh-client-ui-primitives';\n\n/** 0.1.6 \u5BFC\u51FA IconEnhanceOutline16\uFF1B0.1.7 \u6539\u4E3A Regular\uFF0C\u753B\u5E03\u4ECD\u662F 16\u3002 */\nconst icons = primitives as Record<string, unknown>;\nconst enhanceIcon = icons.IconEnhanceOutline16 ?? icons.IconEnhanceOutlineRegular;\n\n/** Host `/` \u884C\u6CA1\u6709\u53EF\u672C\u5730\u5316\u7684\u8BF4\u660E\uFF1B\u540C\u540D\u8D21\u732E\u4F1A\u649E\u8F66\uFF0C\u53EA\u80FD\u5728\u6BCF\u6B21 candidates \u4E0A\u8986\u76D6 /simplify\u3002 */\nconst FACE = {\n icon: enhanceIcon,\n zh: { label: '\u7B80\u5316', description: '\u7B80\u5316\u6700\u8FD1\u6539\u52A8\u7684\u4EE3\u7801\uFF0C\u4FDD\u6301\u529F\u80FD\u5E76\u9650\u5B9A\u4FEE\u6539\u8303\u56F4' },\n en: { label: 'Simplify', description: 'Simplify recent code changes, preserve behavior, and limit the edit scope.' },\n} as const;\n\ntype Lookup = { get?: (name: string) => unknown };\n\n/** en\u3001en-US\u3001en_US \u4E3A\u82F1\u6587\uFF1B\u4E0B\u5212\u7EBF\u5148\u6298\u6210\u8FDE\u5B57\u7B26\uFF0C\u518D\u6309 /^en(?:-|$)/i \u5224\u65AD\u3002 */\nfunction english(ctx: Lookup): boolean {\n const locale = ctx.get?.('locale') as { snapshot?: { active?: unknown } } | undefined;\n const active = locale?.snapshot?.active;\n return typeof active === 'string' && /^en(?:-|$)/i.test(active.replace(/_/g, '-'));\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 };\n if (item.name !== 'simplify') return item;\n const copy = en ? FACE.en : FACE.zh;\n return {\n ...item,\n ...(item.icon === undefined && FACE.icon !== undefined ? { icon: FACE.icon } : {}),\n label: copy.label,\n description: copy.description,\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\uFF0C\u5E76\u6309\u5F53\u524D\u754C\u9762\u8BED\u8A00\u8986\u76D6\u6807\u9898\u548C\u8BF4\u660E\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": ";0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA4B,sDAGtBC,EAAQD,EACRE,EAAcD,EAAM,sBAAwBA,EAAM,0BAGlDE,EAAO,CACX,KAAMD,EACN,GAAI,CAAE,MAAO,eAAM,YAAa,gIAAwB,EACxD,GAAI,CAAE,MAAO,WAAY,YAAa,4EAA6E,CACrH,EAKA,SAASE,EAAQC,EAAsB,CAErC,IAAMC,EADSD,EAAI,MAAM,QAAQ,GACV,UAAU,OACjC,OAAO,OAAOC,GAAW,UAAY,cAAc,KAAKA,EAAO,QAAQ,KAAM,GAAG,CAAC,CACnF,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,GAAIC,EAAK,OAAS,WAAY,OAAOA,EACrC,IAAMC,EAAOH,EAAKV,EAAK,GAAKA,EAAK,GACjC,MAAO,CACL,GAAGY,EACH,GAAIA,EAAK,OAAS,QAAaZ,EAAK,OAAS,OAAY,CAAE,KAAMA,EAAK,IAAK,EAAI,CAAC,EAChF,MAAOa,EAAK,MACZ,YAAaA,EAAK,WACpB,CACF,CAAC,CACH,EACO,IAAM,CAAEP,EAAK,WAAaC,CAAU,EAC7C,CAQO,SAASZ,EAAMO,EAA2B,CAC/C,OAAI,OAAOA,EAAI,QAAW,WAAmBA,EAAI,OAAO,CAAC,WAAW,EAAGY,GAASV,EAAkBU,EAAM,MAAM,WAAW,EAAGZ,CAAG,CAAC,EACzHA,EAAI,SAAS,IAAME,EAAkBF,EAAI,MAAM,WAAW,EAAGA,CAAG,CAAC,CAC1E",
|
|
6
|
+
"names": ["client_exports", "__export", "apply", "__toCommonJS", "primitives", "icons", "enhanceIcon", "FACE", "english", "ctx", "active", "decorateSlashFace", "commandUi", "live", "original", "args", "rows", "en", "row", "item", "copy", "scope"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@michengai/dsh-simplify",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
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": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"./client": {
|
|
26
26
|
"default": "./lib/client.js"
|
|
27
|
-
}
|
|
27
|
+
},
|
|
28
|
+
"./package.json": "./package.json"
|
|
28
29
|
},
|
|
29
30
|
"files": [
|
|
30
31
|
"lib",
|
|
@@ -62,11 +63,11 @@
|
|
|
62
63
|
},
|
|
63
64
|
"peerDependencies": {
|
|
64
65
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
65
|
-
"@deepseek-ai/dsh-commands": "0.1.
|
|
66
|
-
"@deepseek-ai/dsh-llm": "0.1.
|
|
67
|
-
"@deepseek-ai/dsh-subprocess": "0.1.
|
|
68
|
-
"@deepseek-ai/dsh-client-ui-commands": "0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1",
|
|
69
|
-
"@deepseek-ai/dsh-client-ui-primitives": "0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1"
|
|
66
|
+
"@deepseek-ai/dsh-commands": "0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2",
|
|
67
|
+
"@deepseek-ai/dsh-llm": "0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2",
|
|
68
|
+
"@deepseek-ai/dsh-subprocess": "0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2",
|
|
69
|
+
"@deepseek-ai/dsh-client-ui-commands": "0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2",
|
|
70
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2"
|
|
70
71
|
},
|
|
71
72
|
"peerDependenciesMeta": {
|
|
72
73
|
"@deepseek-ai/dsh-client-ui-commands": {
|
|
@@ -78,12 +79,12 @@
|
|
|
78
79
|
},
|
|
79
80
|
"devDependencies": {
|
|
80
81
|
"@deepseek-ai/cordis": "4.0.4",
|
|
81
|
-
"@deepseek-ai/dsh-client-ui-commands": "0.2.0-rc.
|
|
82
|
-
"@deepseek-ai/dsh-client-ui-primitives": "0.2.0-rc.
|
|
83
|
-
"@deepseek-ai/dsh-commands": "0.2.0-rc.
|
|
84
|
-
"@deepseek-ai/dsh-llm": "0.2.0-rc.
|
|
85
|
-
"@deepseek-ai/dsh-subprocess": "0.2.0-rc.
|
|
86
|
-
"@deepseek-ai/dsh-subprocess-local": "0.2.0-rc.
|
|
82
|
+
"@deepseek-ai/dsh-client-ui-commands": "0.2.0-rc.2",
|
|
83
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.2.0-rc.2",
|
|
84
|
+
"@deepseek-ai/dsh-commands": "0.2.0-rc.2",
|
|
85
|
+
"@deepseek-ai/dsh-llm": "0.2.0-rc.2",
|
|
86
|
+
"@deepseek-ai/dsh-subprocess": "0.2.0-rc.2",
|
|
87
|
+
"@deepseek-ai/dsh-subprocess-local": "0.2.0-rc.2",
|
|
87
88
|
"@types/node": "^22.19.0",
|
|
88
89
|
"esbuild": "^0.25.0",
|
|
89
90
|
"typescript": "~5.7.2"
|