@tangle-network/agent-app 0.46.25 → 0.46.27
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/README.md +1 -1
- package/dist/assistant/index.js +1 -1
- package/dist/chat-react/index.js +1 -1
- package/dist/{chunk-GAKGTIJ4.js → chunk-MWEX2M6M.js} +24 -62
- package/dist/chunk-MWEX2M6M.js.map +1 -0
- package/dist/{mention-editor-2ZSKDB32.js → mention-editor-NDJAEMRP.js} +1 -1
- package/dist/mention-editor-NDJAEMRP.js.map +1 -0
- package/dist/studio-react/index.js +16 -2
- package/dist/studio-react/index.js.map +1 -1
- package/dist/web-react/index.js +1 -1
- package/package.json +4 -4
- package/dist/chunk-GAKGTIJ4.js.map +0 -1
- package/dist/mention-editor-2ZSKDB32.js.map +0 -1
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ pnpm add @tangle-network/agent-eval @tangle-network/agent-integrations
|
|
|
36
36
|
| Peer | Required by | Range |
|
|
37
37
|
|---|---|---|
|
|
38
38
|
| `@tangle-network/agent-eval` | `/eval`, `/eval-campaign`, `/profile`, `/knowledge` | `>=0.170.0 <0.171.0` |
|
|
39
|
-
| `@tangle-network/agent-runtime` | `/runtime`, `/chat-routes` | `>=0.178.0 <0.
|
|
39
|
+
| `@tangle-network/agent-runtime` | `/runtime`, `/chat-routes` | `>=0.178.0 <0.183.0` |
|
|
40
40
|
| `@tangle-network/agent-integrations` | `/integrations` | `>=0.53.55 <0.54.0` |
|
|
41
41
|
| `@tangle-network/agent-interface` | `/interactions`, `/chat-store`, `/harness` | `^1.8.0` |
|
|
42
42
|
| `@tangle-network/sandbox` | `/sandbox` | `>=0.34.0 <0.35.0` |
|
package/dist/assistant/index.js
CHANGED
package/dist/chat-react/index.js
CHANGED
|
@@ -272,53 +272,26 @@ import {
|
|
|
272
272
|
} from "react";
|
|
273
273
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
274
274
|
function createLazyMentionEditor() {
|
|
275
|
-
return lazy(() => import("./mention-editor-
|
|
275
|
+
return lazy(() => import("./mention-editor-NDJAEMRP.js").then((m) => m.loadMentionEditor()));
|
|
276
276
|
}
|
|
277
277
|
var MentionEditorBoundary = class extends Component {
|
|
278
|
-
state = {
|
|
279
|
-
static getDerivedStateFromError(
|
|
280
|
-
return {
|
|
281
|
-
}
|
|
282
|
-
componentDidCatch() {
|
|
283
|
-
this.props.onFailed();
|
|
278
|
+
state = { failed: false };
|
|
279
|
+
static getDerivedStateFromError() {
|
|
280
|
+
return { failed: true };
|
|
284
281
|
}
|
|
285
282
|
render() {
|
|
286
|
-
if (this.state.
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
message
|
|
299
|
-
] }),
|
|
300
|
-
/* @__PURE__ */ jsx(
|
|
301
|
-
"button",
|
|
302
|
-
{
|
|
303
|
-
type: "button",
|
|
304
|
-
"aria-label": "Retry loading the mention input",
|
|
305
|
-
onClick: this.props.onRetry,
|
|
306
|
-
className: "shrink-0 font-medium underline-offset-2 hover:underline focus:outline-none focus-visible:ring-2 focus-visible:ring-destructive/50",
|
|
307
|
-
children: "Retry"
|
|
308
|
-
}
|
|
309
|
-
)
|
|
310
|
-
] }),
|
|
311
|
-
this.props.draft.trim() !== "" && /* @__PURE__ */ jsx(
|
|
312
|
-
"p",
|
|
313
|
-
{
|
|
314
|
-
"data-testid": "composer-error-held-draft",
|
|
315
|
-
className: "mt-1.5 max-h-20 overflow-y-auto whitespace-pre-wrap rounded-lg border border-destructive/30 bg-card px-2 py-1 text-foreground",
|
|
316
|
-
children: this.props.draft
|
|
317
|
-
}
|
|
318
|
-
)
|
|
319
|
-
]
|
|
320
|
-
}
|
|
321
|
-
);
|
|
283
|
+
if (!this.state.failed) return this.props.children;
|
|
284
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
285
|
+
this.props.fallback,
|
|
286
|
+
/* @__PURE__ */ jsx(
|
|
287
|
+
"div",
|
|
288
|
+
{
|
|
289
|
+
role: "alert",
|
|
290
|
+
className: "rounded-md border border-destructive/40 bg-destructive/5 px-3 py-2 text-xs text-destructive",
|
|
291
|
+
children: "Mentions are unavailable. You can still send."
|
|
292
|
+
}
|
|
293
|
+
)
|
|
294
|
+
] });
|
|
322
295
|
}
|
|
323
296
|
};
|
|
324
297
|
var IS_APPLE_PLATFORM = typeof navigator !== "undefined" && /Mac|iPhone|iPad|iPod/i.test(navigator.platform);
|
|
@@ -425,6 +398,7 @@ function ChatComposer({
|
|
|
425
398
|
const isControlled = value !== void 0;
|
|
426
399
|
const [internal, setInternal] = useState2(initialValue ?? "");
|
|
427
400
|
const text = isControlled ? value : internal;
|
|
401
|
+
const MentionEditor = useMemo(createLazyMentionEditor, []);
|
|
428
402
|
const textRef = useRef2(text);
|
|
429
403
|
textRef.current = text;
|
|
430
404
|
const textareaRef = useRef2(null);
|
|
@@ -432,9 +406,6 @@ function ChatComposer({
|
|
|
432
406
|
const registerRichFocus = useCallback2((focus) => {
|
|
433
407
|
richFocusRef.current = focus;
|
|
434
408
|
}, []);
|
|
435
|
-
const [editorEpoch, setEditorEpoch] = useState2(0);
|
|
436
|
-
const MentionEditor = useMemo(createLazyMentionEditor, [editorEpoch]);
|
|
437
|
-
const [editorFailed, setEditorFailed] = useState2(false);
|
|
438
409
|
const fileInputRef = useRef2(null);
|
|
439
410
|
const folderInputRef = useRef2(null);
|
|
440
411
|
const [dragOver, setDragOver] = useState2(false);
|
|
@@ -528,8 +499,7 @@ function ChatComposer({
|
|
|
528
499
|
const sendableFiles = canSubmitAttachmentsOnly ? pendingFiles : pendingFiles.filter((f) => f.status === "ready");
|
|
529
500
|
const hasSendable = text.trim().length > 0 || sendableFiles.length > 0;
|
|
530
501
|
const sendBlockedByStream = isStreaming && !canSubmitWhileBusy;
|
|
531
|
-
const
|
|
532
|
-
const canSend = hasSendable && !sendBlockedByStream && !disabled && !editorInputLost;
|
|
502
|
+
const canSend = hasSendable && !sendBlockedByStream && !disabled;
|
|
533
503
|
const [failedSend, setFailedSend] = useState2(null);
|
|
534
504
|
const failSend = useCallback2(
|
|
535
505
|
(error, draft, trimmed, parts, caret) => {
|
|
@@ -574,7 +544,7 @@ function ChatComposer({
|
|
|
574
544
|
);
|
|
575
545
|
const send = useCallback2(() => {
|
|
576
546
|
const trimmed = text.trim();
|
|
577
|
-
if (sendBlockedByStream || disabled
|
|
547
|
+
if (sendBlockedByStream || disabled) return;
|
|
578
548
|
const readyFiles = pendingFiles.filter((f) => f.status === "ready");
|
|
579
549
|
const sendable = canSubmitAttachmentsOnly ? pendingFiles : readyFiles;
|
|
580
550
|
if (!trimmed && sendable.length === 0) return;
|
|
@@ -594,7 +564,6 @@ function ChatComposer({
|
|
|
594
564
|
text,
|
|
595
565
|
sendBlockedByStream,
|
|
596
566
|
disabled,
|
|
597
|
-
editorInputLost,
|
|
598
567
|
canSubmitAttachmentsOnly,
|
|
599
568
|
attachmentsNotReadyMessage,
|
|
600
569
|
onSendParts,
|
|
@@ -936,18 +905,12 @@ function ChatComposer({
|
|
|
936
905
|
className: `flex flex-col gap-1.5 rounded-2xl border border-card-edge bg-card px-3 py-2.5 transition focus-within:border-primary/40 focus-within:ring-2 focus-within:ring-primary/15 ${floating ? "shadow-raised" : ""}`,
|
|
937
906
|
children: [
|
|
938
907
|
mention ? (
|
|
939
|
-
// The
|
|
940
|
-
//
|
|
941
|
-
// failed load instead of unmounting the host's region.
|
|
908
|
+
// The basic textarea stays usable through download, initialization,
|
|
909
|
+
// and failure.
|
|
942
910
|
/* @__PURE__ */ jsx(
|
|
943
911
|
MentionEditorBoundary,
|
|
944
912
|
{
|
|
945
|
-
|
|
946
|
-
setEditorFailed(false);
|
|
947
|
-
setEditorEpoch((epoch) => epoch + 1);
|
|
948
|
-
},
|
|
949
|
-
onFailed: () => setEditorFailed(true),
|
|
950
|
-
draft: text,
|
|
913
|
+
fallback: textareaInput,
|
|
951
914
|
children: /* @__PURE__ */ jsx(Suspense, { fallback: textareaInput, children: /* @__PURE__ */ jsx(
|
|
952
915
|
MentionEditor,
|
|
953
916
|
{
|
|
@@ -965,8 +928,7 @@ function ChatComposer({
|
|
|
965
928
|
onPasteFiles: onAttach ? ingestPastedFiles : void 0
|
|
966
929
|
}
|
|
967
930
|
) })
|
|
968
|
-
}
|
|
969
|
-
editorEpoch
|
|
931
|
+
}
|
|
970
932
|
)
|
|
971
933
|
) : (
|
|
972
934
|
// The card draws the keyboard indicator through `focus-within:`, so
|
|
@@ -1875,4 +1837,4 @@ export {
|
|
|
1875
1837
|
ComposerModeControls,
|
|
1876
1838
|
EntryComposer
|
|
1877
1839
|
};
|
|
1878
|
-
//# sourceMappingURL=chunk-
|
|
1840
|
+
//# sourceMappingURL=chunk-MWEX2M6M.js.map
|