@tangle-network/agent-app 0.57.12 → 0.57.13
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-7NEO73ZY.js → chunk-WZLE5SPT.js} +8 -5
- package/dist/chunk-WZLE5SPT.js.map +1 -0
- package/dist/web-react/chat-composer.d.ts +3 -1
- package/dist/web-react/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-7NEO73ZY.js.map +0 -1
package/dist/assistant/index.js
CHANGED
package/dist/chat-react/index.js
CHANGED
|
@@ -405,6 +405,7 @@ function ChatComposer({
|
|
|
405
405
|
onCancel,
|
|
406
406
|
isStreaming = false,
|
|
407
407
|
disabled = false,
|
|
408
|
+
sendDisabled = false,
|
|
408
409
|
placeholder = "Message the agent\u2026",
|
|
409
410
|
value,
|
|
410
411
|
onValueChange,
|
|
@@ -548,7 +549,7 @@ function ChatComposer({
|
|
|
548
549
|
const sendableFiles = canSubmitAttachmentsOnly ? pendingFiles : pendingFiles.filter((f) => f.status === "ready");
|
|
549
550
|
const hasSendable = text.trim().length > 0 || sendableFiles.length > 0 || Boolean(selectedSkillId);
|
|
550
551
|
const sendBlockedByStream = isStreaming && !canSubmitWhileBusy;
|
|
551
|
-
const canSend = hasSendable && !sendBlockedByStream && !disabled;
|
|
552
|
+
const canSend = hasSendable && !sendBlockedByStream && !disabled && !sendDisabled;
|
|
552
553
|
const [failedSend, setFailedSend] = useState2(null);
|
|
553
554
|
const failSend = useCallback2(
|
|
554
555
|
(error, draft, trimmed, parts, caret) => {
|
|
@@ -593,7 +594,7 @@ function ChatComposer({
|
|
|
593
594
|
);
|
|
594
595
|
const send = useCallback2(() => {
|
|
595
596
|
const trimmed = text.trim();
|
|
596
|
-
if (sendBlockedByStream || disabled) return;
|
|
597
|
+
if (sendBlockedByStream || disabled || sendDisabled) return;
|
|
597
598
|
const readyFiles = pendingFiles.filter((f) => f.status === "ready");
|
|
598
599
|
const sendable = canSubmitAttachmentsOnly ? pendingFiles : readyFiles;
|
|
599
600
|
if (!trimmed && sendable.length === 0 && !selectedSkillId) return;
|
|
@@ -613,6 +614,7 @@ function ChatComposer({
|
|
|
613
614
|
text,
|
|
614
615
|
sendBlockedByStream,
|
|
615
616
|
disabled,
|
|
617
|
+
sendDisabled,
|
|
616
618
|
canSubmitAttachmentsOnly,
|
|
617
619
|
attachmentsNotReadyMessage,
|
|
618
620
|
onSendParts,
|
|
@@ -623,11 +625,11 @@ function ChatComposer({
|
|
|
623
625
|
]);
|
|
624
626
|
const retryFailedSend = useCallback2(() => {
|
|
625
627
|
const failure = failedSend;
|
|
626
|
-
if (!failure || sendBlockedByStream || disabled) return;
|
|
628
|
+
if (!failure || sendBlockedByStream || disabled || sendDisabled) return;
|
|
627
629
|
setFailedSend(null);
|
|
628
630
|
const caret = { start: failure.text.length, end: failure.text.length };
|
|
629
631
|
dispatchSend(failure.text, failure.trimmed, failure.parts, caret);
|
|
630
|
-
}, [failedSend, sendBlockedByStream, disabled, dispatchSend]);
|
|
632
|
+
}, [failedSend, sendBlockedByStream, disabled, sendDisabled, dispatchSend]);
|
|
631
633
|
const slashPanelRef = useRef2(null);
|
|
632
634
|
const cardRef = useRef2(null);
|
|
633
635
|
const slashListId = useId();
|
|
@@ -1998,6 +2000,7 @@ function EntryComposer({
|
|
|
1998
2000
|
sendLabel,
|
|
1999
2001
|
sendVariant: "icon",
|
|
2000
2002
|
disabled,
|
|
2003
|
+
sendDisabled: !ready,
|
|
2001
2004
|
autoFocus: true,
|
|
2002
2005
|
focusShortcut: false,
|
|
2003
2006
|
canSubmitAttachmentsOnly: true,
|
|
@@ -2042,4 +2045,4 @@ export {
|
|
|
2042
2045
|
ComposerModeControls,
|
|
2043
2046
|
EntryComposer
|
|
2044
2047
|
};
|
|
2045
|
-
//# sourceMappingURL=chunk-
|
|
2048
|
+
//# sourceMappingURL=chunk-WZLE5SPT.js.map
|