@aparte/core 1.7.0 → 1.8.0

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/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { K as deferHydrationOf, ag as resolveConfig, ao as subscribeConfigChange, aj as runWithConfig, o as AparteElicitationAbortError, w as buildApprovalPanel, x as buildElicitationPanel, at as gateGlide, O as escapeAttr, al as segmentTiming, au as chatBoundaryOf, av as relabelCodeLanguages, aw as relabelCitations, ax as toolCallRenderer, ay as activityRenderer, t as aparteGlobalConfig, az as isMountedRenderer, aA as renderingVersionOf, a3 as onRenderersChange, aB as renderSourceList, aC as mergeSegmentUpdate, a1 as isSegmentSettled, a7 as pluralize, U as formatDuration, aD as toolNameOf, P as escapeHtml, aE as writeStreamedMarkdown, aF as replaceHighlighted, a0 as isSafeUrl, C as copyText, W as getSegmentRenderer, Y as installDefaultRenderersOnce, aG as toolRendererThatDrew, aH as activityRendererThatDrew, r as AparteMessageRepository, aI as CheckpointStateWatcher, aJ as chatIdOf, aK as stampSegmentActivity, aL as stampSegmentOnInsert, aM as stampSegmentOnUpdate, aN as renumberSegments, aO as openSegmentIds, aP as isTerminalStatus, aQ as adoptMessageSegments, _ as isAwaitingReply, a8 as populateBubbleFromMessage, as as uuid, ah as revokeAttachmentUrls, a6 as parseMarkdownToSegments, aR as APARTE_DERIVED_SEGMENTS, aS as rememberConversationStatus, aT as tellConversationStatus, aU as conversationStatusOf, e as APARTE_DEFAULT_LOCALE, aV as visibleReply, aW as usageTokens, q as AparteErrorCode, a2 as measureContext, aX as inRenderedContent, g as APARTE_HOST_ATTR, Z as installDialogTriggersOnce } from "./defer-hydration-o5MFsc_Z.js";
2
- import { A, a, b, c, d, f, h, i, j, k, l, m, n, p, s, S, u, v, y, z, B, D, E, F, G, H, I, J, L, M, N, Q, R, T, V, X, $, a4, a5, a9, aa, ab, ac, ad, ae, af, ai, ak, am, an, ap, aq, ar } from "./defer-hydration-o5MFsc_Z.js";
1
+ import { K as deferHydrationOf, ag as resolveConfig, ao as subscribeConfigChange, aj as runWithConfig, o as AparteElicitationAbortError, w as buildApprovalPanel, x as buildElicitationPanel, at as gateGlide, O as escapeAttr, al as segmentTiming, au as chatBoundaryOf, av as relabelCodeLanguages, aw as relabelCitations, ax as toolCallRenderer, ay as activityRenderer, t as aparteGlobalConfig, az as isMountedRenderer, aA as renderingVersionOf, a3 as onRenderersChange, aB as renderSourceList, aC as mergeSegmentUpdate, a1 as isSegmentSettled, a7 as pluralize, U as formatDuration, aD as toolNameOf, P as escapeHtml, aE as writeStreamedMarkdown, aF as replaceHighlighted, a0 as isSafeUrl, C as copyText, W as getSegmentRenderer, Y as installDefaultRenderersOnce, aG as toolRendererThatDrew, aH as activityRendererThatDrew, r as AparteMessageRepository, aI as CheckpointStateWatcher, aJ as chatIdOf, aK as stampSegmentActivity, aL as stampSegmentOnInsert, aM as stampSegmentOnUpdate, aN as renumberSegments, aO as openSegmentIds, aP as isTerminalStatus, aQ as adoptMessageSegments, _ as isAwaitingReply, a8 as populateBubbleFromMessage, as as uuid, ah as revokeAttachmentUrls, a6 as parseMarkdownToSegments, aR as APARTE_DERIVED_SEGMENTS, aS as rememberConversationStatus, aT as tellConversationStatus, aU as conversationStatusOf, e as APARTE_DEFAULT_LOCALE, aV as visibleReply, aW as usageTokens, q as AparteErrorCode, a2 as measureContext, aX as inRenderedContent, g as APARTE_HOST_ATTR, Z as installDialogTriggersOnce } from "./defer-hydration-BE2ToXC_.js";
2
+ import { A, a, b, c, d, f, h, i, j, k, l, m, n, p, s, S, u, v, y, z, B, D, E, F, G, H, I, J, L, M, N, Q, R, T, V, X, $, a4, a5, a9, aa, ab, ac, ad, ae, af, ai, ak, am, an, ap, aq, ar } from "./defer-hydration-BE2ToXC_.js";
3
3
  import { d as eventOrigin, f as activeElementIn, c as cssEscape, a as enhanceMenu, e as enhanceContextMenu, p as placeFloating, r as rootOf } from "./kit-keyboard-BUSLQ5i4.js";
4
4
  import { b as b2 } from "./kit-keyboard-BUSLQ5i4.js";
5
5
  function presenceOn(value) {
@@ -2117,7 +2117,7 @@ class AparteChatBubble extends HTMLElement {
2117
2117
  this._applySegmentUpdate(segmentId, updated, updates);
2118
2118
  if ("sources" in updates) this._syncSources();
2119
2119
  this._syncCopyAction();
2120
- if ("status" in updates || "isStreaming" in updates) {
2120
+ if ("status" in updates || "isStreaming" in updates || "queued" in updates || "deferred" in updates) {
2121
2121
  this._syncTurns();
2122
2122
  this._updateWaiting();
2123
2123
  }
@@ -2571,7 +2571,8 @@ class AparteChatBubble extends HTMLElement {
2571
2571
  const current = turn.querySelector(":scope > summary > .aparte-turn__current");
2572
2572
  label.classList.toggle("aparte-shimmer", running);
2573
2573
  label.textContent = running ? cfg.t("turnWorking") : this._turnOutcome(steps, calls.length);
2574
- current.textContent = running && calls.length > 0 ? this._stepName(calls.at(-1)) : "";
2574
+ const now = calls.filter((call) => !call.queued && call.deferred?.reason !== "queued").at(-1) ?? calls.at(-1);
2575
+ current.textContent = running && now ? this._stepName(now) : "";
2575
2576
  if (openWhileRunning && !("touched" in turn.dataset)) turn.open = running;
2576
2577
  }
2577
2578
  _turnOutcome(steps, callCount) {