@ch4acko3/dsh-turn-fold 0.6.4 → 0.6.6
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/package.json +5 -7
- package/patch.cjs +7 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ch4acko3/dsh-turn-fold",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.6",
|
|
4
4
|
"description": "Codex-style turn folding for the DSH WebUI conversation, implemented as a dsh-harmony provider.",
|
|
5
5
|
"main": "./index.mjs",
|
|
6
6
|
"engines": {
|
|
@@ -49,16 +49,15 @@
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
|
-
"
|
|
53
|
-
"check": "node test/run.cjs"
|
|
52
|
+
"check": "node --check index.cjs && node --check patch.cjs && node --check inline-source.cjs && node --check settings.cjs && node --check locales.cjs"
|
|
54
53
|
},
|
|
55
54
|
"dependencies": {
|
|
56
55
|
"@deepseek-ai/schemastery": "^3.18.4"
|
|
57
56
|
},
|
|
58
57
|
"peerDependencies": {
|
|
59
|
-
"@deepseek-ai/dsh-client-ui-chat": ">=0.1.2-alpha.5 <0.1.3-0 || >=0.1.3-0 <0.1.4-0 || >=0.1.4-0 <0.1.5-0 || >=0.1.5-0 <0.1.6-0 || >=0.1.6-0 <0.1.7-0 || >=0.1.7-0 <0.1.8-0 || 0.2.0-rc.2 || 0.2.1-alpha.2",
|
|
60
|
-
"@deepseek-ai/dsh-client-ui-conversation": ">=0.1.0-rc.8 <=0.1.1-rc.2 || >=0.1.2-alpha.5 <0.1.3-0 || >=0.1.3-0 <0.1.4-0 || >=0.1.4-0 <0.1.5-0 || >=0.1.5-0 <0.1.6-0 || >=0.1.6-0 <0.1.7-0 || >=0.1.7-0 <0.1.8-0 || 0.2.0-rc.2 || 0.2.1-alpha.2",
|
|
61
|
-
"@deepseek-ai/dsh-settings": ">=0.1.0-rc.8 <=0.1.1-rc.2 || >=0.1.2-alpha.5 <0.1.3-0 || >=0.1.3-0 <0.1.4-0 || >=0.1.4-0 <0.1.5-0 || >=0.1.5-0 <0.1.6-0 || >=0.1.6-0 <0.1.7-0 || >=0.1.7-0 <0.1.8-0 || 0.2.0-rc.2 || 0.2.1-alpha.2",
|
|
58
|
+
"@deepseek-ai/dsh-client-ui-chat": ">=0.1.2-alpha.5 <0.1.3-0 || >=0.1.3-0 <0.1.4-0 || >=0.1.4-0 <0.1.5-0 || >=0.1.5-0 <0.1.6-0 || >=0.1.6-0 <0.1.7-0 || >=0.1.7-0 <0.1.8-0 || 0.2.0-rc.2 || >=0.2.1-alpha.2 <0.3.0-0",
|
|
59
|
+
"@deepseek-ai/dsh-client-ui-conversation": ">=0.1.0-rc.8 <=0.1.1-rc.2 || >=0.1.2-alpha.5 <0.1.3-0 || >=0.1.3-0 <0.1.4-0 || >=0.1.4-0 <0.1.5-0 || >=0.1.5-0 <0.1.6-0 || >=0.1.6-0 <0.1.7-0 || >=0.1.7-0 <0.1.8-0 || 0.2.0-rc.2 || >=0.2.1-alpha.2 <0.3.0-0",
|
|
60
|
+
"@deepseek-ai/dsh-settings": ">=0.1.0-rc.8 <=0.1.1-rc.2 || >=0.1.2-alpha.5 <0.1.3-0 || >=0.1.3-0 <0.1.4-0 || >=0.1.4-0 <0.1.5-0 || >=0.1.5-0 <0.1.6-0 || >=0.1.6-0 <0.1.7-0 || >=0.1.7-0 <0.1.8-0 || 0.2.0-rc.2 || >=0.2.1-alpha.2 <0.3.0-0",
|
|
62
61
|
"dsh-harmony": "^0.8.11"
|
|
63
62
|
},
|
|
64
63
|
"peerDependenciesMeta": {
|
|
@@ -82,7 +81,6 @@
|
|
|
82
81
|
"@phenomnomnominal/tsquery": "^6.2.0",
|
|
83
82
|
"dsh-harmony": "^0.8.11",
|
|
84
83
|
"react": "18.3.1",
|
|
85
|
-
"react-test-renderer": "18.3.1",
|
|
86
84
|
"semver": "^7.8.5",
|
|
87
85
|
"typescript": "^6.0.3"
|
|
88
86
|
}
|
package/patch.cjs
CHANGED
|
@@ -147,16 +147,19 @@ function dsh012Patches(version) {
|
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
function createPatches(version) {
|
|
150
|
-
if (/^0\.2\.1
|
|
150
|
+
if (/^0\.2\.[1-9]\d*(?:-|$)/.test(version)) return dsh021Patches(version)
|
|
151
151
|
return usesUiChat(version) ? dsh012Patches(version) : legacyPatches()
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
function dsh021Patches(version) {
|
|
155
|
-
return commonPatches(target('@deepseek-ai/dsh-client-ui-chat', '0.2.1-alpha.2'), {
|
|
155
|
+
return commonPatches(target('@deepseek-ai/dsh-client-ui-chat', '>=0.2.1-alpha.2 <0.3.0-0'), {
|
|
156
156
|
select: 'FunctionExpression[name.name="ChatFlow"]',
|
|
157
|
-
apply({ node, sourceFile, edit, query }) {
|
|
157
|
+
apply({ node, sourceFile, edit, query, ts }) {
|
|
158
158
|
const rows = query('CallExpression[expression.name.name="map"][expression.expression.name="entries"]', node)
|
|
159
|
-
const flow = query('CallExpression').filter(call =>
|
|
159
|
+
const flow = query('CallExpression').filter(call => {
|
|
160
|
+
const slot = call.arguments[0]
|
|
161
|
+
return call.expression.getText(sourceFile) === 'renderSlot' && slot && ts.isStringLiteralLike(slot) && slot.text === 'conversation.chat.flow'
|
|
162
|
+
})
|
|
160
163
|
if (rows.length !== 1 || flow.length !== 1) throw new Error('@ch4acko3/dsh-turn-fold: expected one ChatFlow render loop and slot')
|
|
161
164
|
const parameters = node.parameters[0].name
|
|
162
165
|
edit.prependLeft(parameters.getStart(sourceFile) + 1, 'sessionId, ')
|