dsh-desktop-kit 2.1.2 → 2.1.4
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 +14 -11
- package/client.js +68 -1
- package/docs/COMPATIBILITY.md +7 -1
- package/docs/INSTALL.md +1 -1
- package/docs/TEST-0.2.2.md +47 -0
- package/docs/images/022-peak-guard.png +0 -0
- package/docs/images/022-skills-studio.png +0 -0
- package/docs/images/022-token-lab.png +0 -0
- package/docs/images/022-transfer.png +0 -0
- package/package.json +1 -1
- package/plugins/dsh-gkb-ru-ui/lib/client.js +68 -1
- package/plugins/dsh-gkb-ru-ui/package.json +2 -2
- package/plugins/dsh-skill-autopilot/index.js +21 -4
- package/plugins/dsh-skill-autopilot/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-gkb-ru-ui",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"description": "Russian language pack for the DSH web GUI + compact AURORA sidebar tiles (skills/tokens/balance/spend) + Skills Studio
|
|
3
|
+
"version": "2.0.1",
|
|
4
|
+
"description": "Russian language pack for the DSH web GUI + compact AURORA sidebar tiles (skills/tokens/balance/spend) + Skills Studio + corrected core translations (retry/stream/cache/queue).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -215,18 +215,19 @@ function latestUserMessage(session) {
|
|
|
215
215
|
const cached = lastMessageCache.get(id);
|
|
216
216
|
let lastSeq = 0;
|
|
217
217
|
try {
|
|
218
|
-
lastSeq = Number(session.seq) || 0;
|
|
218
|
+
lastSeq = Number(session.seq) || Number(session.logRevision) || 0;
|
|
219
219
|
} catch {
|
|
220
220
|
lastSeq = 0;
|
|
221
221
|
}
|
|
222
|
-
if (cached && cached.seq === lastSeq) return cached.value;
|
|
222
|
+
if (lastSeq > 0 && cached && cached.seq === lastSeq) return cached.value;
|
|
223
223
|
let value = null;
|
|
224
224
|
try {
|
|
225
225
|
const nodes = session.surface?.nodes ?? [];
|
|
226
226
|
for (let index = nodes.length - 1; index >= 0; index -= 1) {
|
|
227
227
|
const event = session.eventAt(nodes[index]);
|
|
228
228
|
if (!event || event.type !== "user/message") continue;
|
|
229
|
-
|
|
229
|
+
/* DSH 0.2.1 keeps the Message under data.message; 0.2.2 stores it as data. */
|
|
230
|
+
const text = messageText(event.data?.message ?? event.data);
|
|
230
231
|
if (text.length > 0) {
|
|
231
232
|
value = { seq: Number(event.seq), text };
|
|
232
233
|
break;
|
|
@@ -235,7 +236,23 @@ function latestUserMessage(session) {
|
|
|
235
236
|
} catch {
|
|
236
237
|
value = null;
|
|
237
238
|
}
|
|
238
|
-
|
|
239
|
+
if (!value) {
|
|
240
|
+
try {
|
|
241
|
+
const events = session.snapshotEvents?.() ?? [];
|
|
242
|
+
for (let index = events.length - 1; index >= 0; index -= 1) {
|
|
243
|
+
const event = events[index];
|
|
244
|
+
if (!event || event.type !== "user/message") continue;
|
|
245
|
+
const text = messageText(event.data?.message ?? event.data);
|
|
246
|
+
if (text.length > 0) {
|
|
247
|
+
value = { seq: Number(event.seq), text };
|
|
248
|
+
break;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
} catch {
|
|
252
|
+
value = null;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
if (lastSeq > 0) lastMessageCache.set(id, { seq: lastSeq, value });
|
|
239
256
|
return value;
|
|
240
257
|
}
|
|
241
258
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-skill-autopilot",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Skill autopilot for DSH: reads the current user message and injects a ~80-token routing hint naming the exact skills to load, so skills apply themselves without bloating the context.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|