@tangle-network/agent-app 0.46.24 → 0.46.25
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 +1 -1
- package/dist/chat-react/index.js +1 -1
- package/dist/{chunk-P2EC5VHG.js → chunk-GAKGTIJ4.js} +42 -61
- package/dist/chunk-GAKGTIJ4.js.map +1 -0
- package/dist/{mention-editor-WW7UVZMR.js → mention-editor-2ZSKDB32.js} +3 -1
- package/dist/mention-editor-2ZSKDB32.js.map +1 -0
- package/dist/web-react/index.js +1 -1
- package/dist/web-react/mention-editor.d.ts +3 -1
- package/package.json +1 -1
- package/dist/chunk-P2EC5VHG.js.map +0 -1
- package/dist/mention-editor-WW7UVZMR.js.map +0 -1
package/dist/assistant/index.js
CHANGED
package/dist/chat-react/index.js
CHANGED
|
@@ -272,7 +272,7 @@ 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-2ZSKDB32.js").then((m) => m.loadMentionEditor()));
|
|
276
276
|
}
|
|
277
277
|
var MentionEditorBoundary = class extends Component {
|
|
278
278
|
state = { error: null };
|
|
@@ -513,9 +513,9 @@ function ChatComposer({
|
|
|
513
513
|
if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "l") {
|
|
514
514
|
if (mentionEnabled) {
|
|
515
515
|
const focus = richFocusRef.current;
|
|
516
|
-
if (!focus) return;
|
|
517
516
|
e.preventDefault();
|
|
518
|
-
focus();
|
|
517
|
+
if (focus) focus();
|
|
518
|
+
else textareaRef.current?.focus();
|
|
519
519
|
} else {
|
|
520
520
|
e.preventDefault();
|
|
521
521
|
textareaRef.current?.focus();
|
|
@@ -768,6 +768,23 @@ function ChatComposer({
|
|
|
768
768
|
const showAbove = controls != null && controlsPlacement === "above";
|
|
769
769
|
const showInline = controls != null && !showAbove;
|
|
770
770
|
const inputMinHeight = minRows * LINE_HEIGHT + TEXTAREA_PADDING_Y;
|
|
771
|
+
const textareaInput = /* @__PURE__ */ jsx(
|
|
772
|
+
"textarea",
|
|
773
|
+
{
|
|
774
|
+
ref: textareaRef,
|
|
775
|
+
value: text,
|
|
776
|
+
onChange: (e) => setText(e.target.value),
|
|
777
|
+
onKeyDown: handleKeyDown,
|
|
778
|
+
onPaste: onAttach ? handlePaste : void 0,
|
|
779
|
+
placeholder,
|
|
780
|
+
disabled,
|
|
781
|
+
autoFocus,
|
|
782
|
+
rows: minRows,
|
|
783
|
+
style: { minHeight: inputMinHeight, maxHeight },
|
|
784
|
+
"aria-label": "Message input",
|
|
785
|
+
className: "w-full resize-none bg-transparent px-1.5 py-1 text-base leading-6 text-foreground outline-none placeholder:text-muted-foreground disabled:opacity-50"
|
|
786
|
+
}
|
|
787
|
+
);
|
|
771
788
|
return /* @__PURE__ */ jsxs(
|
|
772
789
|
"div",
|
|
773
790
|
{
|
|
@@ -919,11 +936,9 @@ function ChatComposer({
|
|
|
919
936
|
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" : ""}`,
|
|
920
937
|
children: [
|
|
921
938
|
mention ? (
|
|
922
|
-
// The editor arrives as a lazy chunk
|
|
923
|
-
//
|
|
924
|
-
//
|
|
925
|
-
// missing-peer error) to the input area instead of unmounting the
|
|
926
|
-
// host's region.
|
|
939
|
+
// The editor arrives as a lazy chunk. The basic textarea stays usable
|
|
940
|
+
// through its download and initialization. The boundary contains a
|
|
941
|
+
// failed load instead of unmounting the host's region.
|
|
927
942
|
/* @__PURE__ */ jsx(
|
|
928
943
|
MentionEditorBoundary,
|
|
929
944
|
{
|
|
@@ -933,64 +948,30 @@ function ChatComposer({
|
|
|
933
948
|
},
|
|
934
949
|
onFailed: () => setEditorFailed(true),
|
|
935
950
|
draft: text,
|
|
936
|
-
children: /* @__PURE__ */ jsx(
|
|
937
|
-
|
|
951
|
+
children: /* @__PURE__ */ jsx(Suspense, { fallback: textareaInput, children: /* @__PURE__ */ jsx(
|
|
952
|
+
MentionEditor,
|
|
938
953
|
{
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
),
|
|
952
|
-
children: /* @__PURE__ */ jsx(
|
|
953
|
-
MentionEditor,
|
|
954
|
-
{
|
|
955
|
-
value: text,
|
|
956
|
-
onChange: setText,
|
|
957
|
-
onSubmit: send,
|
|
958
|
-
placeholder,
|
|
959
|
-
disabled,
|
|
960
|
-
autoFocus,
|
|
961
|
-
minHeight: inputMinHeight,
|
|
962
|
-
maxHeight,
|
|
963
|
-
mention,
|
|
964
|
-
registerFocus: registerRichFocus,
|
|
965
|
-
onPasteFiles: onAttach ? ingestPastedFiles : void 0
|
|
966
|
-
}
|
|
967
|
-
)
|
|
954
|
+
value: text,
|
|
955
|
+
onChange: setText,
|
|
956
|
+
onSubmit: send,
|
|
957
|
+
placeholder,
|
|
958
|
+
disabled,
|
|
959
|
+
autoFocus,
|
|
960
|
+
minHeight: inputMinHeight,
|
|
961
|
+
maxHeight,
|
|
962
|
+
mention,
|
|
963
|
+
fallback: textareaInput,
|
|
964
|
+
registerFocus: registerRichFocus,
|
|
965
|
+
onPasteFiles: onAttach ? ingestPastedFiles : void 0
|
|
968
966
|
}
|
|
969
|
-
)
|
|
967
|
+
) })
|
|
970
968
|
},
|
|
971
969
|
editorEpoch
|
|
972
970
|
)
|
|
973
971
|
) : (
|
|
974
|
-
//
|
|
975
|
-
//
|
|
976
|
-
|
|
977
|
-
/* @__PURE__ */ jsx(
|
|
978
|
-
"textarea",
|
|
979
|
-
{
|
|
980
|
-
ref: textareaRef,
|
|
981
|
-
value: text,
|
|
982
|
-
onChange: (e) => setText(e.target.value),
|
|
983
|
-
onKeyDown: handleKeyDown,
|
|
984
|
-
onPaste: onAttach ? handlePaste : void 0,
|
|
985
|
-
placeholder,
|
|
986
|
-
disabled,
|
|
987
|
-
autoFocus,
|
|
988
|
-
rows: minRows,
|
|
989
|
-
style: { minHeight: inputMinHeight, maxHeight },
|
|
990
|
-
"aria-label": "Message input",
|
|
991
|
-
className: "w-full resize-none bg-transparent px-1.5 py-1 text-base leading-6 text-foreground outline-none placeholder:text-muted-foreground disabled:opacity-50"
|
|
992
|
-
}
|
|
993
|
-
)
|
|
972
|
+
// The card draws the keyboard indicator through `focus-within:`, so
|
|
973
|
+
// the input does not need a second outline.
|
|
974
|
+
textareaInput
|
|
994
975
|
),
|
|
995
976
|
/* @__PURE__ */ jsxs("div", { className: "flex items-end gap-2", children: [
|
|
996
977
|
onAttach && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -1894,4 +1875,4 @@ export {
|
|
|
1894
1875
|
ComposerModeControls,
|
|
1895
1876
|
EntryComposer
|
|
1896
1877
|
};
|
|
1897
|
-
//# sourceMappingURL=chunk-
|
|
1878
|
+
//# sourceMappingURL=chunk-GAKGTIJ4.js.map
|