@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.
- package/dist/assistant/index.js +2 -2
- package/dist/chat-react/index.js +1 -1
- package/dist/{chunk-KJ2Q27U7.js → chunk-5T5TSBM4.js} +35 -65
- package/dist/chunk-5T5TSBM4.js.map +1 -0
- package/dist/{chunk-2IFGVBNI.js → chunk-FZKNVQYP.js} +2 -1
- package/dist/chunk-FZKNVQYP.js.map +1 -0
- package/dist/theme/tailwind-preset.d.ts +22 -0
- package/dist/theme/tailwind-preset.js +19 -0
- package/dist/theme/tailwind-preset.js.map +1 -1
- package/dist/theme/tokens.css +0 -22
- package/dist/web-react/controls.d.ts +6 -0
- package/dist/web-react/index.js +2 -2
- package/package.json +3 -3
- package/dist/chunk-2IFGVBNI.js.map +0 -1
- package/dist/chunk-KJ2Q27U7.js.map +0 -1
package/dist/assistant/index.js
CHANGED
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
ChatComposer,
|
|
3
3
|
ChatEmptyState,
|
|
4
4
|
ChatMessages
|
|
5
|
-
} from "../chunk-
|
|
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-
|
|
11
|
+
} from "../chunk-FZKNVQYP.js";
|
|
12
12
|
import "../chunk-MLG6XKPV.js";
|
|
13
13
|
import "../chunk-BATKJP3P.js";
|
|
14
14
|
import {
|
package/dist/chat-react/index.js
CHANGED
|
@@ -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-
|
|
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,
|
|
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 && //
|
|
6469
|
-
//
|
|
6470
|
-
//
|
|
6471
|
-
//
|
|
6472
|
-
//
|
|
6473
|
-
//
|
|
6474
|
-
//
|
|
6475
|
-
//
|
|
6476
|
-
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
|
|
6480
|
-
|
|
6481
|
-
"
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
6495
|
-
|
|
6496
|
-
|
|
6497
|
-
|
|
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-
|
|
6816
|
+
//# sourceMappingURL=chunk-5T5TSBM4.js.map
|