@ch4acko3/dsh-turn-fold 0.4.1 → 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/README.md +6 -3
- package/README.zh-CN.md +1 -1
- package/inline-source.cjs +7 -2
- package/package.json +9 -6
- package/patch.cjs +3 -3
package/README.md
CHANGED
|
@@ -34,9 +34,12 @@ short open/close transition that unmounts the activity after it closes.
|
|
|
34
34
|
|
|
35
35
|
## How it works
|
|
36
36
|
|
|
37
|
-
Three
|
|
38
|
-
`@deepseek-ai/dsh-client-ui-conversation` (`lib/client.js`)
|
|
39
|
-
|
|
37
|
+
Three shape-guarded Source Patches run in memory against the compiled browser
|
|
38
|
+
bundle of `@deepseek-ai/dsh-client-ui-conversation` (`lib/client.js`) from
|
|
39
|
+
`0.1.0-rc.8` up to, but not including, the `0.2.0` prerelease line; installed
|
|
40
|
+
DSH files are never modified. Every selector must still match exactly once, so
|
|
41
|
+
an incompatible compiled shape fails closed instead of modifying an uncertain
|
|
42
|
+
target.
|
|
40
43
|
|
|
41
44
|
| Patch | Selector (expect 1) | Effect |
|
|
42
45
|
| --- | --- | --- |
|
package/README.zh-CN.md
CHANGED
|
@@ -16,7 +16,7 @@ https://github.com/user-attachments/assets/3c9dfdcf-a454-4750-9edf-76771ed5a9a6
|
|
|
16
16
|
|
|
17
17
|
## 工作原理
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
三个带形状校验的 Source Patch 会在内存中修改 `@deepseek-ai/dsh-client-ui-conversation` `>=0.1.0-rc.8 <0.2.0-0` 的编译后浏览器包(`lib/client.js`),不会修改已安装的 DSH 文件。每条选择器仍必须恰好命中一次,因此遇到不兼容的编译形状时会停止应用,而不会修改不确定的目标。
|
|
20
20
|
|
|
21
21
|
| Patch | 选择器(预期命中 1 次) | 作用 |
|
|
22
22
|
| --- | --- | --- |
|
package/inline-source.cjs
CHANGED
|
@@ -318,6 +318,7 @@ function __ch4acko3DshTurnFoldActivityGroup(props) {
|
|
|
318
318
|
"data-ch4acko3-dsh-turn-fold-activity-open": open ? "true" : "false",
|
|
319
319
|
"data-dsh-fold-owner": "@ch4acko3/dsh-turn-fold",
|
|
320
320
|
"data-dsh-fold-scope": "activity-run",
|
|
321
|
+
"data-dsh-fold-keys": JSON.stringify(props.nodeKeys),
|
|
321
322
|
"data-state": state,
|
|
322
323
|
children: [
|
|
323
324
|
react_jsx_runtime.jsx(_deepseek_ai_dsh_client_ui_primitives.DisclosureRow, {
|
|
@@ -871,7 +872,10 @@ function __ch4acko3DshTurnFoldRenderEntries(entries, nodeStore, renderNode, sess
|
|
|
871
872
|
activityEntries.push(next);
|
|
872
873
|
j++;
|
|
873
874
|
}
|
|
874
|
-
var
|
|
875
|
+
var foldKey = "activity:" + String(sessionId) + ":" + String(turn) + ":" + String(entry.key);
|
|
876
|
+
// Focus inside an already-open group belongs to its native disclosure rows.
|
|
877
|
+
// Keep their parent stable when a streaming Session snapshot renders again.
|
|
878
|
+
var selected = !__ch4acko3DshTurnFoldOpenKeys.has(foldKey) && activityEntries.some(function (activityEntry) { return interactionKeys.has(activityEntry.key); });
|
|
875
879
|
if (turn === null || activityEntries.length < 2 || selected) {
|
|
876
880
|
for (var k = 0; k < activityEntries.length; k++) out.push(__ch4acko3DshTurnFoldRenderNativeEntry(activityEntries[k], renderNode, false));
|
|
877
881
|
} else {
|
|
@@ -891,11 +895,11 @@ function __ch4acko3DshTurnFoldRenderEntries(entries, nodeStore, renderNode, sess
|
|
|
891
895
|
}
|
|
892
896
|
if (__ch4acko3DshTurnFoldHasVisibleNonReasoning(entry.node)) out.push(__ch4acko3DshTurnFoldRenderNativeEntry(entry, renderNode, true));
|
|
893
897
|
var facts = __ch4acko3DshTurnFoldToolFacts(toolKeys, nodeStore);
|
|
894
|
-
var foldKey = "activity:" + String(sessionId) + ":" + String(turn) + ":" + String(entry.key);
|
|
895
898
|
out.push(react_jsx_runtime.jsx(__ch4acko3DshTurnFoldActivityGroup, {
|
|
896
899
|
failed: facts.failed,
|
|
897
900
|
foldKey: foldKey,
|
|
898
901
|
items: items,
|
|
902
|
+
nodeKeys: activityEntries.map(function (activityEntry) { return activityEntry.key; }),
|
|
899
903
|
renderNode: renderNode,
|
|
900
904
|
running: facts.running,
|
|
901
905
|
t: t
|
|
@@ -982,6 +986,7 @@ function __ch4acko3DshTurnFoldDisclosure(props) {
|
|
|
982
986
|
"data-ch4acko3-dsh-turn-fold-open": expanded ? "true" : "false",
|
|
983
987
|
"data-dsh-fold-owner": "@ch4acko3/dsh-turn-fold",
|
|
984
988
|
"data-dsh-fold-scope": "turn",
|
|
989
|
+
"data-dsh-fold-keys": JSON.stringify(activity),
|
|
985
990
|
children: [
|
|
986
991
|
react_jsx_runtime.jsx("button", {
|
|
987
992
|
type: "button",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ch4acko3/dsh-turn-fold",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "Codex-style turn folding for the DSH WebUI conversation, implemented as a dsh-harmony provider.",
|
|
5
5
|
"main": "./index.cjs",
|
|
6
6
|
"engines": {
|
|
@@ -30,7 +30,9 @@
|
|
|
30
30
|
"patch": "./harmony.patch.yml"
|
|
31
31
|
},
|
|
32
32
|
"harmony": {
|
|
33
|
-
"patches": [
|
|
33
|
+
"patches": [
|
|
34
|
+
"./patch.cjs"
|
|
35
|
+
]
|
|
34
36
|
},
|
|
35
37
|
"plugin": {
|
|
36
38
|
"schemaVersion": 1,
|
|
@@ -53,17 +55,18 @@
|
|
|
53
55
|
"@deepseek-ai/schemastery": "^3.18.1"
|
|
54
56
|
},
|
|
55
57
|
"peerDependencies": {
|
|
56
|
-
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.0-rc.8",
|
|
57
|
-
"@deepseek-ai/dsh-settings": "^0.1.0-rc.8",
|
|
58
|
-
"dsh-harmony": "^0.7.0"
|
|
58
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.0-rc.8 || ^0.1.1-0",
|
|
59
|
+
"@deepseek-ai/dsh-settings": "^0.1.0-rc.8 || ^0.1.1-0",
|
|
60
|
+
"dsh-harmony": "^0.7.0 || ^0.8.0"
|
|
59
61
|
},
|
|
60
62
|
"devDependencies": {
|
|
61
63
|
"@deepseek-ai/dsh-client-ui-conversation": "0.1.0-rc.8",
|
|
62
64
|
"@deepseek-ai/dsh-settings": "0.1.0-rc.8",
|
|
63
65
|
"@phenomnomnominal/tsquery": "^6.2.0",
|
|
64
|
-
"dsh-harmony": "^0.
|
|
66
|
+
"dsh-harmony": "^0.8.0",
|
|
65
67
|
"react": "18.3.1",
|
|
66
68
|
"react-test-renderer": "18.3.1",
|
|
69
|
+
"semver": "^7.8.5",
|
|
67
70
|
"typescript": "^6.0.3"
|
|
68
71
|
}
|
|
69
72
|
}
|
package/patch.cjs
CHANGED
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
// 3. install-turn-fold-services — registers the plugin's native DSH locale
|
|
14
14
|
// namespace and binds its native settings scope during conversation boot.
|
|
15
15
|
//
|
|
16
|
-
// All three selectors
|
|
17
|
-
// a compiled-shape drift fails loudly in `dsh harmony status`.
|
|
16
|
+
// All three selectors use an exact `expect: 1` inside a bounded target-version
|
|
17
|
+
// range, so a compiled-shape drift still fails loudly in `dsh harmony status`.
|
|
18
18
|
|
|
19
19
|
const INLINE = require('./inline-source.cjs')
|
|
20
20
|
|
|
21
21
|
const TARGET = {
|
|
22
22
|
package: '@deepseek-ai/dsh-client-ui-conversation',
|
|
23
|
-
version: '0.1.0-rc.8',
|
|
23
|
+
version: '>=0.1.0-rc.8 <0.2.0-0',
|
|
24
24
|
file: 'lib/client.js',
|
|
25
25
|
}
|
|
26
26
|
|