@ch4acko3/dsh-turn-fold 0.4.3 → 0.4.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.
Files changed (2) hide show
  1. package/inline-source.cjs +12 -1
  2. package/package.json +1 -1
package/inline-source.cjs CHANGED
@@ -872,7 +872,18 @@ function __ch4acko3DshTurnFoldRenderEntries(entries, nodeStore, renderNode, sess
872
872
  activityEntries.push(next);
873
873
  j++;
874
874
  }
875
- var foldKey = "activity:" + String(sessionId) + ":" + String(turn) + ":" + String(entry.key);
875
+ var foldKeyPrefix = "activity:" + String(sessionId) + ":" + String(turn) + ":";
876
+ var foldKey = foldKeyPrefix + String(entry.key);
877
+ // Preserve an open group's identity when earlier activity joins it during streaming.
878
+ if (!__ch4acko3DshTurnFoldOpenKeys.has(foldKey)) {
879
+ for (var foldKeyIndex = 1; foldKeyIndex < activityEntries.length; foldKeyIndex++) {
880
+ var openFoldKey = foldKeyPrefix + String(activityEntries[foldKeyIndex].key);
881
+ if (__ch4acko3DshTurnFoldOpenKeys.has(openFoldKey)) {
882
+ foldKey = openFoldKey;
883
+ break;
884
+ }
885
+ }
886
+ }
876
887
  // Focus inside an already-open group belongs to its native disclosure rows.
877
888
  // Keep their parent stable when a streaming Session snapshot renders again.
878
889
  var selected = !__ch4acko3DshTurnFoldOpenKeys.has(foldKey) && activityEntries.some(function (activityEntry) { return interactionKeys.has(activityEntry.key); });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ch4acko3/dsh-turn-fold",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
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": {