@tangle-network/agent-app 0.45.56 → 0.45.57

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,13 +2,13 @@ import {
2
2
  ChatComposer,
3
3
  ChatEmptyState,
4
4
  ChatMessages
5
- } from "../chunk-KJ2Q27U7.js";
5
+ } from "../chunk-5T5TSBM4.js";
6
6
  import "../chunk-FBVLEGEG.js";
7
7
  import "../chunk-ENLRJYVW.js";
8
8
  import "../chunk-GEYACSFW.js";
9
9
  import {
10
10
  ModelPicker
11
- } from "../chunk-2IFGVBNI.js";
11
+ } from "../chunk-FZKNVQYP.js";
12
12
  import "../chunk-MLG6XKPV.js";
13
13
  import "../chunk-BATKJP3P.js";
14
14
  import {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  AgentSessionControls,
3
3
  useComposerAttachments
4
- } from "../chunk-2IFGVBNI.js";
4
+ } from "../chunk-FZKNVQYP.js";
5
5
  import "../chunk-MLG6XKPV.js";
6
6
  import {
7
7
  ATTACHMENT_ACCEPT
@@ -6,13 +6,14 @@ import {
6
6
  workProductPartsFromMessageParts
7
7
  } from "./chunk-ENLRJYVW.js";
8
8
  import {
9
+ BrainGlyph,
9
10
  ChevronDown,
10
11
  OVERLAY_SHADOW,
11
12
  POPOVER_OPTION_FOCUS,
12
13
  PopoverSurface,
13
14
  usePending,
14
15
  usePopover
15
- } from "./chunk-2IFGVBNI.js";
16
+ } from "./chunk-FZKNVQYP.js";
16
17
  import {
17
18
  AsyncView
18
19
  } from "./chunk-3UBAO3N5.js";
@@ -40,8 +41,8 @@ import {
40
41
  } from "./chunk-YJMCRXQQ.js";
41
42
 
42
43
  // src/web-react/index.tsx
43
- import { useEffect as useEffect12, useId as useId4, useMemo as useMemo7, useRef as useRef12, useState as useState16, memo } from "react";
44
- import { InlineToolItem } from "@tangle-network/ui/run";
44
+ import { useEffect as useEffect12, useMemo as useMemo7, useRef as useRef12, useState as useState16, memo } from "react";
45
+ import { InlineToolItem, RunRowShell } from "@tangle-network/ui/run";
45
46
 
46
47
  // src/web-react/smooth-text.ts
47
48
  import { useEffect, useRef, useState } from "react";
@@ -83,12 +84,6 @@ function useSmoothText(target, enabled, opts) {
83
84
  return target.slice(0, Math.floor(shownRef.current));
84
85
  }
85
86
 
86
- // src/web-react/inert.ts
87
- function inertProps(inert) {
88
- if (!inert) return {};
89
- return { inert: "1" };
90
- }
91
-
92
87
  // src/web-react/motion.ts
93
88
  import { useState as useState2 } from "react";
94
89
  function staggerStyle(index, base) {
@@ -6454,7 +6449,6 @@ function AssistantMessageImpl({
6454
6449
  const thinkingSeconds = useThinkingSeconds(
6455
6450
  streaming && !!reasoning && !hasAnswerText
6456
6451
  );
6457
- const reasoningId = useId4();
6458
6452
  const [reasoningToggled, setReasoningToggled] = useState16(null);
6459
6453
  const reasoningOpen = reasoningToggled ?? !hasAnswerText;
6460
6454
  const quiet = chrome === "quiet";
@@ -6465,60 +6459,36 @@ function AssistantMessageImpl({
6465
6459
  formatTokensPerSecond(msg) && /* @__PURE__ */ jsx15("span", { children: formatTokensPerSecond(msg) }),
6466
6460
  formatModelCost(msg, models) && /* @__PURE__ */ jsx15("span", { children: formatModelCost(msg, models) })
6467
6461
  ] }),
6468
- reasoning && // A button + `.agent-disclose` rather than `<details>`: a native
6469
- // disclosure has no transition to give, so the trace SNAPPED to full
6470
- // height the moment the answer arrived the single largest layout jump
6471
- // in a turn, at the exact moment the reader is trying to start reading.
6472
- // The grid row animates the content's REAL height (0fr → 1fr), which a
6473
- // max-height guess cannot do without either clipping a long trace or
6474
- // easing toward a number it never reaches. The keyboard contract
6475
- // `<details>` supplied for free is restated explicitly: a real
6476
- // `<button>` (Enter/Space, focusable, in the tab order) carrying
6477
- // `aria-expanded` and `aria-controls` — which also announces the state
6478
- // that a `<summary>` leaves to the browser.
6479
- /* @__PURE__ */ jsxs13("div", { className: "mb-2 rounded-lg border-l-2 border-border bg-secondary px-3 py-2", children: [
6480
- /* @__PURE__ */ jsxs13(
6481
- "button",
6482
- {
6483
- type: "button",
6484
- onClick: () => setReasoningToggled(!reasoningOpen),
6485
- "aria-expanded": reasoningOpen,
6486
- "aria-controls": reasoningId,
6487
- className: "flex w-full select-none items-center gap-1.5 text-left text-xs font-medium text-muted-foreground [transition:color_var(--motion-control)] hover:text-foreground",
6488
- children: [
6489
- /* @__PURE__ */ jsx15(ChevronDown, { className: `h-3 w-3 shrink-0 [transition:transform_var(--motion-surface)] ${reasoningOpen ? "" : "-rotate-90"}` }),
6490
- !hasAnswerText ? (
6491
- // A pulse dims the whole word on a loop, which is the same cue a
6492
- // skeleton placeholder uses it reads as "nothing here yet". A
6493
- // sweep travels THROUGH the glyphs, which reads as work in
6494
- // flight, and the elapsed seconds say how much. `essential`
6495
- // because it is the only signal separating a working agent from
6496
- // a stuck one — and `essential` is an exemption from the blanket
6497
- // floor, never a licence to sweep forever at someone who asked
6498
- // for less motion: under `prefers-reduced-motion` tokens.css
6499
- // stops this animation and leaves a dotted rule under the word
6500
- // that the settled label ("Thought for 12s") does not carry. The
6501
- // rule is the only difference — measured in Chromium, both labels
6502
- // compute this button's own `text-muted-foreground`, so tone
6503
- // separates neither.
6504
- /* @__PURE__ */ jsxs13("span", { className: "agent-shimmer", "data-motion": "essential", children: [
6505
- "Thinking",
6506
- thinkingSeconds >= 1 ? ` \xB7 ${thinkingSeconds}s` : "\u2026"
6507
- ] })
6508
- ) : thinkMsRef.current != null ? `Thought for ${Math.max(1, Math.round(thinkMsRef.current / 1e3))}s` : "Thought process"
6509
- ]
6510
- }
6511
- ),
6512
- /* @__PURE__ */ jsx15("div", { className: "agent-disclose", "data-open": reasoningOpen ? "true" : "false", children: /* @__PURE__ */ jsx15("div", { ...inertProps(!reasoningOpen), children: /* @__PURE__ */ jsx15(
6513
- "div",
6514
- {
6515
- id: reasoningId,
6516
- ref: reasoningScrollRef,
6517
- className: "mt-2 max-h-48 overflow-y-auto whitespace-pre-wrap text-xs leading-relaxed text-muted-foreground",
6518
- children: reasoning
6519
- }
6520
- ) }) })
6521
- ] }),
6462
+ reasoning && // The canonical run-row grammar (RunRowShell the same shell the tool
6463
+ // rows compose): one family of rows instead of a bespoke disclosure per
6464
+ // kind. The shimmer title is a NODE (ui widened `title` to ReactNode for
6465
+ // exactly this): the sweep through the glyphs is the working-vs-stuck
6466
+ // signal. Open while thinking, auto-collapse on the first answer token,
6467
+ // and a click outranks the default from then on the contract the old
6468
+ // hand-rolled disclosure had, now enforced through the shell's
6469
+ // controlled `open`.
6470
+ /* @__PURE__ */ jsx15(
6471
+ RunRowShell,
6472
+ {
6473
+ className: "mb-2",
6474
+ icon: /* @__PURE__ */ jsx15(BrainGlyph, { className: "h-3.5 w-3.5" }),
6475
+ title: !hasAnswerText ? /* @__PURE__ */ jsxs13("span", { className: "agent-shimmer", "data-motion": "essential", children: [
6476
+ "Thinking",
6477
+ thinkingSeconds >= 1 ? ` \xB7 ${thinkingSeconds}s` : "\u2026"
6478
+ ] }) : thinkMsRef.current != null ? `Thought for ${Math.max(1, Math.round(thinkMsRef.current / 1e3))}s` : "Thought process",
6479
+ status: hasAnswerText ? "idle" : "running",
6480
+ open: reasoningOpen,
6481
+ onOpenChange: (next) => setReasoningToggled(next),
6482
+ children: /* @__PURE__ */ jsx15(
6483
+ "div",
6484
+ {
6485
+ ref: reasoningScrollRef,
6486
+ className: "max-h-48 overflow-y-auto whitespace-pre-wrap px-3 py-2.5 text-xs leading-relaxed text-muted-foreground",
6487
+ children: reasoning
6488
+ }
6489
+ )
6490
+ }
6491
+ ),
6522
6492
  segments && segments.length > 0 ? /* @__PURE__ */ jsx15(
6523
6493
  SegmentedBody,
6524
6494
  {
@@ -6843,4 +6813,4 @@ export {
6843
6813
  useThinkingSeconds,
6844
6814
  ChatMessages
6845
6815
  };
6846
- //# sourceMappingURL=chunk-KJ2Q27U7.js.map
6816
+ //# sourceMappingURL=chunk-5T5TSBM4.js.map