@syntrologie/adapt-chatbot 2.8.0-canary.416 → 2.8.0-canary.418

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.
@@ -2,8 +2,8 @@ import {
2
2
  AdaptiveChatBar
3
3
  } from "./chunk-2NX6765N.js";
4
4
  import "./chunk-EWPPVPJ4.js";
5
- import "./chunk-LTG5G6WN.js";
6
- import "./chunk-5PW6T3QF.js";
5
+ import "./chunk-LSJFN2BR.js";
6
+ import "./chunk-QF7ZTKXA.js";
7
7
  import "./chunk-UVKRO5ER.js";
8
8
  export {
9
9
  AdaptiveChatBar
@@ -0,0 +1,2 @@
1
+ import './AdaptiveChatTrail';
2
+ //# sourceMappingURL=AdaptiveChatTrail.anchor-scroll.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AdaptiveChatTrail.anchor-scroll.test.d.ts","sourceRoot":"","sources":["../src/AdaptiveChatTrail.anchor-scroll.test.ts"],"names":[],"mappings":"AA0BA,OAAO,qBAAqB,CAAC"}
@@ -171,6 +171,9 @@ export declare class AdaptiveChatTrail extends LitElement {
171
171
  mountInlineWidget: {
172
172
  attribute: boolean;
173
173
  };
174
+ _messagesBelow: {
175
+ state: boolean;
176
+ };
174
177
  };
175
178
  messages: TrailMessage[];
176
179
  tileReceipts: TileReceipt[];
@@ -192,6 +195,46 @@ export declare class AdaptiveChatTrail extends LitElement {
192
195
  * automatically when the first real message arrives.
193
196
  */
194
197
  greeting: string | undefined;
198
+ /** Follow the bottom on content growth. On by default (history
199
+ * browsing); off from a new user message until the visitor opts back in
200
+ * (pill tap or a user-gesture scroll that reaches the bottom). */
201
+ private _stickToBottom;
202
+ /** The user message the current turn is anchored to. */
203
+ private _anchorMsgId;
204
+ /** Whether a turn anchor is live (drives expand-mid-turn landing). */
205
+ private _anchorActive;
206
+ /** Keep enforcing chip-at-top on updates (late geometry, mode flips)
207
+ * until the user scrolls or opts into following. */
208
+ private _anchorHold;
209
+ /** Number of messages whose BOTTOM edge is still below the viewport —
210
+ * messages the visitor hasn't scrolled past yet. Drives the
211
+ * "⌄ N messages" pill and stays accurate as they scroll (one long
212
+ * streaming reply counts as 1 until its end has been read). Reactive. */
213
+ private _messagesBelow;
214
+ /** Timestamp of the last user scroll gesture (wheel/touch): scroll
215
+ * events outside this window are programmatic (our own pin/anchor) and
216
+ * must not re-engage following — anchoring the newest message clamps AT
217
+ * the bottom in any longer conversation. */
218
+ private _lastUserScrollIntentTs;
219
+ private static readonly _AT_BOTTOM_EPSILON_PX;
220
+ private static readonly _USER_SCROLL_INTENT_WINDOW_MS;
221
+ private get _scrollable();
222
+ private _trailContainer;
223
+ private _isAtBottom;
224
+ /** Count chips whose bottom edge hasn't entered the viewport yet. */
225
+ private _countMessagesBelow;
226
+ private _syncContentBelow;
227
+ private _markUserScrollIntent;
228
+ private _onTrailScroll;
229
+ /** Pill tap: jump to the newest content and follow for the rest of the turn. */
230
+ private _onScrollToRecent;
231
+ /** Scroll so the anchored user chip sits at the top of the trail
232
+ * viewport. Idempotent — safe to re-apply on every update while the
233
+ * hold is live (content grows BELOW the anchor, so the target is
234
+ * stable; re-applying also covers late geometry, e.g. expanding
235
+ * mid-turn from the ambient strip). */
236
+ private _applyAnchor;
237
+ private _pinToBottom;
195
238
  private _onExpand;
196
239
  /**
197
240
  * Approve a pending client tool call. The trail emits a generic
@@ -1 +1 @@
1
- {"version":3,"file":"AdaptiveChatTrail.d.ts","sourceRoot":"","sources":["../src/AdaptiveChatTrail.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,EAAa,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAIrD,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,gBAAgB,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;IACpE;;;;;;;;OA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;;;;;GAYG;AACH,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAStE;AAmaD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,qBAAqB,EAAE,iBAAiB,CAAC;KAC1C;CACF"}
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  AdaptiveChatTrail,
3
3
  looksLikeSerializedModelResponse
4
- } from "./chunk-LTG5G6WN.js";
5
- import "./chunk-5PW6T3QF.js";
4
+ } from "./chunk-LSJFN2BR.js";
5
+ import "./chunk-QF7ZTKXA.js";
6
6
  import "./chunk-UVKRO5ER.js";
7
7
  export {
8
8
  AdaptiveChatTrail,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  ChatAssistantLitMountable,
3
3
  renderFallbackHtml
4
- } from "./chunk-LXKDS4CG.js";
4
+ } from "./chunk-CWRCHWWJ.js";
5
5
  import "./chunk-EWPPVPJ4.js";
6
- import "./chunk-5PW6T3QF.js";
6
+ import "./chunk-QF7ZTKXA.js";
7
7
  import "./chunk-KPWW7N27.js";
8
8
  import "./chunk-UVKRO5ER.js";
9
9
  export {
@@ -7723,6 +7723,9 @@ var AgUiTransport = class {
7723
7723
  },
7724
7724
  onCustomEvent: (params) => {
7725
7725
  const { event } = params;
7726
+ if (typeof event.name === "string" && event.name.startsWith("syntro.recovery.")) {
7727
+ return;
7728
+ }
7726
7729
  this._runProducedOutput = true;
7727
7730
  const payload = event.value;
7728
7731
  this._onA2UIEvent?.(payload);
@@ -8952,4 +8955,4 @@ fast-json-patch/module/duplex.mjs:
8952
8955
  * MIT license
8953
8956
  *)
8954
8957
  */
8955
- //# sourceMappingURL=chunk-LXKDS4CG.js.map
8958
+ //# sourceMappingURL=chunk-CWRCHWWJ.js.map