dsh-desktop-enhance 0.2.4 → 0.2.5

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/lib/client.js CHANGED
@@ -2027,13 +2027,11 @@ window.__ModuleLoader__.load({
2027
2027
  const seq = nonNegativeInt(ev.seq);
2028
2028
  if (seq !== void 0 && (windowStartSeq === null || seq < windowStartSeq)) windowStartSeq = seq;
2029
2029
  const range = replaceRangeOf(ev.surfaceOp);
2030
- if (range !== null) {
2031
- replacedRanges.push(range);
2032
- continue;
2033
- }
2030
+ if (range !== null) replacedRanges.push(range);
2034
2031
  const data = asRecord(ev.data);
2035
2032
  const turnInEvent = positiveInt(data?.turn);
2036
- if (turnInEvent !== void 0) currentTurn = turnInEvent;
2033
+ if (range === null && turnInEvent !== void 0) currentTurn = turnInEvent;
2034
+ const effectiveTurn = turnInEvent ?? currentTurn;
2037
2035
  const type = nonEmptyString(ev.type);
2038
2036
  if (type === "compaction/summary" || type === "compaction/prune") {
2039
2037
  const list = data?.shadowedSeqs;
@@ -2053,7 +2051,7 @@ window.__ModuleLoader__.load({
2053
2051
  name,
2054
2052
  trigger: "user",
2055
2053
  seq,
2056
- ...currentTurn === void 0 ? {} : { turn: currentTurn }
2054
+ ...effectiveTurn === void 0 ? {} : { turn: effectiveTurn }
2057
2055
  });
2058
2056
  continue;
2059
2057
  }
@@ -2063,7 +2061,7 @@ window.__ModuleLoader__.load({
2063
2061
  name,
2064
2062
  trigger: "agent",
2065
2063
  seq,
2066
- ...currentTurn === void 0 ? {} : { turn: currentTurn }
2064
+ ...effectiveTurn === void 0 ? {} : { turn: effectiveTurn }
2067
2065
  });
2068
2066
  }
2069
2067
  }
package/lib/index.js CHANGED
@@ -411,13 +411,11 @@ function projectSkills(events) {
411
411
  const seq = nonNegativeInt(ev.seq);
412
412
  if (seq !== void 0 && (windowStartSeq === null || seq < windowStartSeq)) windowStartSeq = seq;
413
413
  const range = replaceRangeOf(ev.surfaceOp);
414
- if (range !== null) {
415
- replacedRanges.push(range);
416
- continue;
417
- }
414
+ if (range !== null) replacedRanges.push(range);
418
415
  const data = asRecord(ev.data);
419
416
  const turnInEvent = positiveInt(data?.turn);
420
- if (turnInEvent !== void 0) currentTurn = turnInEvent;
417
+ if (range === null && turnInEvent !== void 0) currentTurn = turnInEvent;
418
+ const effectiveTurn = turnInEvent ?? currentTurn;
421
419
  const type = nonEmptyString(ev.type);
422
420
  if (type === "compaction/summary" || type === "compaction/prune") {
423
421
  const list = data?.shadowedSeqs;
@@ -437,7 +435,7 @@ function projectSkills(events) {
437
435
  name,
438
436
  trigger: "user",
439
437
  seq,
440
- ...currentTurn === void 0 ? {} : { turn: currentTurn }
438
+ ...effectiveTurn === void 0 ? {} : { turn: effectiveTurn }
441
439
  });
442
440
  continue;
443
441
  }
@@ -447,7 +445,7 @@ function projectSkills(events) {
447
445
  name,
448
446
  trigger: "agent",
449
447
  seq,
450
- ...currentTurn === void 0 ? {} : { turn: currentTurn }
448
+ ...effectiveTurn === void 0 ? {} : { turn: effectiveTurn }
451
449
  });
452
450
  }
453
451
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-desktop-enhance",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "DSH Desktop 界面增强:页内查找(Cmd+F)、轮次编号、上下文压缩行常显、建议、每步耗时、会话信息。",
5
5
  "type": "module",
6
6
  "exports": {