@clagentic/console 1.0.0-beta.3 → 1.0.0-beta.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.
|
@@ -62,6 +62,14 @@ export function processMessage(msg) {
|
|
|
62
62
|
case "history_meta":
|
|
63
63
|
store.set({ historyFrom: msg.from, historyTotal: msg.total, replayingHistory: true });
|
|
64
64
|
updateHistorySentinel();
|
|
65
|
+
// Arm sticky-bottom at the START of replay so the scroll listener's
|
|
66
|
+
// "user scrolled up" detection is suppressed for the entire history
|
|
67
|
+
// append sequence. Without this, scroll events fired during DOM growth
|
|
68
|
+
// can set isUserScrolledUp=true before history_done's arm fires, leaving
|
|
69
|
+
// the user stranded mid-conversation on resume (especially on mobile).
|
|
70
|
+
if (!getPendingNavigate() || !(getPendingNavigate().toolId || getPendingNavigate().assistantUuid)) {
|
|
71
|
+
armStickyBottom(5000);
|
|
72
|
+
}
|
|
65
73
|
break;
|
|
66
74
|
|
|
67
75
|
case "history_prepend":
|
|
@@ -132,10 +132,12 @@ export function armStickyBottom(durationMs) {
|
|
|
132
132
|
stickyBottomQuietMs = durationMs || 750;
|
|
133
133
|
if (stickyBottomQuietTimer) clearTimeout(stickyBottomQuietTimer);
|
|
134
134
|
stickyBottomQuietTimer = setTimeout(disarmStickyBottom, stickyBottomQuietMs);
|
|
135
|
-
// Hard ceiling
|
|
136
|
-
//
|
|
135
|
+
// Hard ceiling: use at least the quiet window + 5s headroom so a long
|
|
136
|
+
// history replay arm (durationMs=5000) can't be cut short by a stale
|
|
137
|
+
// ceiling set from a prior shorter arm.
|
|
138
|
+
var ceiling = Math.max(stickyBottomCeilingMs, (durationMs || 750) + 5000);
|
|
137
139
|
if (stickyBottomCeilingTimer) clearTimeout(stickyBottomCeilingTimer);
|
|
138
|
-
stickyBottomCeilingTimer = setTimeout(disarmStickyBottom,
|
|
140
|
+
stickyBottomCeilingTimer = setTimeout(disarmStickyBottom, ceiling);
|
|
139
141
|
}
|
|
140
142
|
|
|
141
143
|
export function disarmStickyBottom() {
|
package/package.json
CHANGED