@agents24/chat-react 0.5.46 → 0.5.48
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 +31 -1
- package/dist/{chunk-YRUYJFPJ.js → chunk-3UKX2RRE.js} +2 -5
- package/dist/chunk-3UKX2RRE.js.map +1 -0
- package/dist/generated/run-usage.d.ts +2 -0
- package/dist/index.cjs +1 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/registry/agents24-chat.json +16 -16
- package/dist/runtime/index.cjs +7 -1
- package/dist/runtime/index.cjs.map +1 -1
- package/dist/runtime/index.js +7 -1
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/use-agent-chat-runtime.d.ts +7 -0
- package/dist/scaffold/app.d.ts +5 -3
- package/dist/scaffold/components/chat/chat-composer.d.ts +4 -2
- package/dist/scaffold/components/chat/chat-message.d.ts +3 -2
- package/dist/scaffold/components/chat/chat-shell.d.ts +3 -2
- package/dist/scaffold/components/chat/message-parts.d.ts +3 -2
- package/dist/scaffold/index.cjs +284 -384
- package/dist/scaffold/index.cjs.map +1 -1
- package/dist/scaffold/index.d.ts +1 -1
- package/dist/scaffold/index.js +267 -366
- package/dist/scaffold/index.js.map +1 -1
- package/dist/styles.css +41 -5
- package/dist/ui/agent-chat-composer.d.ts +4 -1
- package/dist/ui/agent-chat-message.d.ts +3 -1
- package/dist/ui/agent-response-timeline.d.ts +3 -2
- package/dist/ui/attachment-text.d.ts +14 -0
- package/dist/ui/bubble.d.ts +1 -1
- package/dist/ui/completed-tool-activity.d.ts +36 -0
- package/dist/ui/composer-attachments.d.ts +2 -0
- package/dist/ui/index.cjs +2412 -1439
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.ts +6 -0
- package/dist/ui/index.js +2340 -1371
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/message-response.d.ts +1 -1
- package/dist/ui/microphone-input.d.ts +24 -0
- package/dist/ui/pcm-capture.d.ts +14 -0
- package/dist/ui/realtime-dictation.d.ts +30 -0
- package/dist/ui/tool-sessions.d.ts +18 -2
- package/dist/ui/use-agent-chat-composer.d.ts +7 -2
- package/dist/ui/use-agent-chat-dictation.d.ts +65 -0
- package/dist/ui/voice-dictation.d.ts +32 -0
- package/package.json +5 -4
- package/scaffold/src/app.tsx +13 -4
- package/scaffold/src/chat.css +0 -1
- package/scaffold/src/components/chat/chat-composer.tsx +29 -25
- package/scaffold/src/components/chat/chat-message.tsx +4 -1
- package/scaffold/src/components/chat/chat-shell.tsx +8 -3
- package/scaffold/src/components/chat/external-link-dialog.tsx +30 -20
- package/scaffold/src/components/chat/message-parts.tsx +4 -1
- package/scaffold/src/index.tsx +1 -0
- package/dist/chunk-YRUYJFPJ.js.map +0 -1
package/dist/scaffold/index.js
CHANGED
|
@@ -18,12 +18,13 @@ import { CircleAlert, LoaderCircle as LoaderCircle3, SquarePen as SquarePen2, X
|
|
|
18
18
|
import * as React9 from "react";
|
|
19
19
|
|
|
20
20
|
// scaffold/src/components/chat/chat-composer.tsx
|
|
21
|
-
import { ArrowUp, ChevronDown, LoaderCircle,
|
|
21
|
+
import { ArrowUp, ChevronDown, LoaderCircle, Square } from "lucide-react";
|
|
22
22
|
import * as React2 from "react";
|
|
23
23
|
import {
|
|
24
|
+
MicrophoneInput,
|
|
24
25
|
AgentChatContextStatus,
|
|
25
26
|
ChatAttachmentRows,
|
|
26
|
-
|
|
27
|
+
useAgentChatDictation
|
|
27
28
|
} from "@agents24/chat-react/ui";
|
|
28
29
|
import { attachmentFileAccept } from "@agents24/chat-react/runtime";
|
|
29
30
|
|
|
@@ -487,6 +488,7 @@ function TooltipContent({
|
|
|
487
488
|
import { Fragment, jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
488
489
|
function ChatComposer({
|
|
489
490
|
inputContract,
|
|
491
|
+
realtimeDictation,
|
|
490
492
|
queue,
|
|
491
493
|
onRecordingStreamChange,
|
|
492
494
|
disabled,
|
|
@@ -507,36 +509,35 @@ function ChatComposer({
|
|
|
507
509
|
restoredDraft,
|
|
508
510
|
utilityRow = "inline"
|
|
509
511
|
}) {
|
|
512
|
+
const [audioRecording, setAudioRecording] = React2.useState(false);
|
|
510
513
|
const inputRef = React2.useRef(null);
|
|
514
|
+
const textareaRef = React2.useRef(null);
|
|
515
|
+
const voice = useAgentChatDictation({
|
|
516
|
+
props: { inputContract, disabled: disabled || audioRecording, scopeKey, focusKey, forceExpanded, isCancelling, isRunning, restoredDraft, onSubmit },
|
|
517
|
+
textareaRef,
|
|
518
|
+
scopeKey: scopeKey || "default",
|
|
519
|
+
realtime: realtimeDictation,
|
|
520
|
+
onSubmit,
|
|
521
|
+
onEdit: () => void 0,
|
|
522
|
+
onStreamChange: (stream) => onRecordingStreamChange?.(stream)
|
|
523
|
+
});
|
|
524
|
+
const sendingDictation = voice.intent === "send" && ["stopping", "transcribing", "submitting"].includes(voice.phase);
|
|
511
525
|
const {
|
|
512
526
|
text,
|
|
513
527
|
setText,
|
|
514
528
|
files,
|
|
515
529
|
removeFile,
|
|
516
530
|
addFiles,
|
|
517
|
-
textareaRef,
|
|
518
531
|
submit,
|
|
519
532
|
attachmentError,
|
|
520
533
|
attachmentMimeTypes,
|
|
521
534
|
allowAttachments,
|
|
522
|
-
recordingAllowed,
|
|
523
535
|
recorder,
|
|
524
536
|
isExpanded,
|
|
525
537
|
validationError,
|
|
526
538
|
action,
|
|
527
539
|
canSubmit
|
|
528
|
-
} =
|
|
529
|
-
inputContract,
|
|
530
|
-
disabled,
|
|
531
|
-
scopeKey,
|
|
532
|
-
focusKey,
|
|
533
|
-
forceExpanded,
|
|
534
|
-
isCancelling,
|
|
535
|
-
isRunning,
|
|
536
|
-
onSubmit,
|
|
537
|
-
restoredDraft,
|
|
538
|
-
onRecordingStreamChange
|
|
539
|
-
});
|
|
540
|
+
} = voice.composer;
|
|
540
541
|
const selectedAgent = agents.find((item) => item.id === agentId);
|
|
541
542
|
const selectedModel = models.find((item) => item.id === modelId);
|
|
542
543
|
const modelSelector = models.length > 0 ? /* @__PURE__ */ jsx7("div", { className: "w-fit max-w-40", children: /* @__PURE__ */ jsxs3(Select, { disabled: disabled || isRunning, onValueChange: onModelChange, value: modelId || void 0, children: [
|
|
@@ -630,7 +631,7 @@ function ChatComposer({
|
|
|
630
631
|
rows: 1,
|
|
631
632
|
placeholder: "Message the agent",
|
|
632
633
|
"aria-label": "Message",
|
|
633
|
-
disabled,
|
|
634
|
+
disabled: disabled || voice.busy || audioRecording,
|
|
634
635
|
className: cn(
|
|
635
636
|
"agents24-composer-textarea max-h-56 min-h-9 field-sizing-content resize-none overflow-y-auto border-0 bg-transparent px-2 shadow-none focus-visible:ring-0 dark:bg-transparent",
|
|
636
637
|
isExpanded ? "py-2" : "h-9 py-2"
|
|
@@ -649,20 +650,20 @@ function ChatComposer({
|
|
|
649
650
|
/* @__PURE__ */ jsxs3("div", { className: "agents24-composer-actions flex items-center gap-1", children: [
|
|
650
651
|
utilityRow === "inline" ? /* @__PURE__ */ jsx7(AgentChatContextStatus, { contextWindow }) : null,
|
|
651
652
|
utilityRow === "inline" ? runtimeSelector : null,
|
|
652
|
-
|
|
653
|
-
|
|
653
|
+
/* @__PURE__ */ jsx7(
|
|
654
|
+
MicrophoneInput,
|
|
654
655
|
{
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
656
|
+
scopeKey,
|
|
657
|
+
className: "inline-flex size-9 items-center justify-center rounded-full",
|
|
658
|
+
disabled: disabled || voice.composer.isSubmitting,
|
|
659
|
+
dictation: { enabled: realtimeDictation?.feature.enabled === true, phase: voice.phase, start: voice.start, stop: () => voice.finish("edit"), cancel: voice.cancel },
|
|
660
|
+
audioEnabled: inputContract.modalities.audio.enabled && inputContract.modalities.audio.recording_enabled,
|
|
661
|
+
acceptedMimeTypes: inputContract.modalities.audio.allowed_mime_types,
|
|
662
|
+
onRecordingChange: setAudioRecording,
|
|
663
|
+
onStreamChange: onRecordingStreamChange,
|
|
664
|
+
onRecorded: (file) => addFiles([file])
|
|
664
665
|
}
|
|
665
|
-
)
|
|
666
|
+
),
|
|
666
667
|
action === "stop" ? /* @__PURE__ */ jsx7(
|
|
667
668
|
Button,
|
|
668
669
|
{
|
|
@@ -672,10 +673,10 @@ function ChatComposer({
|
|
|
672
673
|
onClick: onStop,
|
|
673
674
|
children: isCancelling ? /* @__PURE__ */ jsx7(LoaderCircle, { className: "animate-spin" }) : /* @__PURE__ */ jsx7(Square, { className: "fill-current" })
|
|
674
675
|
}
|
|
675
|
-
) : validationError ? /* @__PURE__ */ jsxs3(Tooltip, { children: [
|
|
676
|
-
/* @__PURE__ */ jsx7(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx7("span", { tabIndex: 0, "aria-label": validationError, children: /* @__PURE__ */ jsx7(Button, { size: "icon", "aria-label": isRunning ? "Queue message" : "Send message", disabled: true, onClick: () => void submit(), children: /* @__PURE__ */ jsx7(ArrowUp, {}) }) }) }),
|
|
676
|
+
) : validationError && !voice.busy ? /* @__PURE__ */ jsxs3(Tooltip, { children: [
|
|
677
|
+
/* @__PURE__ */ jsx7(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx7("span", { tabIndex: 0, "aria-label": validationError, children: /* @__PURE__ */ jsx7(Button, { size: "icon", "aria-label": isRunning ? "Queue message" : "Send message", disabled: true, onClick: () => void submit(), children: sendingDictation ? /* @__PURE__ */ jsx7(LoaderCircle, { className: "animate-spin" }) : /* @__PURE__ */ jsx7(ArrowUp, {}) }) }) }),
|
|
677
678
|
/* @__PURE__ */ jsx7(TooltipContent, { children: validationError })
|
|
678
|
-
] }) : /* @__PURE__ */ jsx7(Button, { size: "icon", "aria-label": isRunning ? "Queue message" : "Send message", disabled: !canSubmit, onClick: () => void submit(), children: /* @__PURE__ */ jsx7(ArrowUp, {}) })
|
|
679
|
+
] }) : /* @__PURE__ */ jsx7(Button, { size: "icon", "aria-label": isRunning ? "Queue message" : "Send message", "aria-busy": sendingDictation || void 0, disabled: sendingDictation || !canSubmit, onClick: () => void submit(), children: sendingDictation ? /* @__PURE__ */ jsx7(LoaderCircle, { className: "animate-spin" }) : /* @__PURE__ */ jsx7(ArrowUp, {}) })
|
|
679
680
|
] })
|
|
680
681
|
]
|
|
681
682
|
}
|
|
@@ -746,147 +747,18 @@ function CollapsibleUserMessage({ content }) {
|
|
|
746
747
|
|
|
747
748
|
// scaffold/src/components/chat/external-link-dialog.tsx
|
|
748
749
|
import * as React4 from "react";
|
|
749
|
-
|
|
750
|
-
// scaffold/src/components/ui/dialog.tsx
|
|
751
|
-
import { Dialog as DialogPrimitive } from "radix-ui";
|
|
752
|
-
import { XIcon } from "lucide-react";
|
|
753
750
|
import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
754
|
-
function Dialog({
|
|
755
|
-
...props
|
|
756
|
-
}) {
|
|
757
|
-
return /* @__PURE__ */ jsx9(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
|
|
758
|
-
}
|
|
759
|
-
function DialogPortal({
|
|
760
|
-
container,
|
|
761
|
-
...props
|
|
762
|
-
}) {
|
|
763
|
-
const themeContainer = useThemePortalContainer();
|
|
764
|
-
return /* @__PURE__ */ jsx9(DialogPrimitive.Portal, { container: container || themeContainer || void 0, "data-slot": "dialog-portal", ...props });
|
|
765
|
-
}
|
|
766
|
-
function DialogOverlay({
|
|
767
|
-
className,
|
|
768
|
-
...props
|
|
769
|
-
}) {
|
|
770
|
-
return /* @__PURE__ */ jsx9(
|
|
771
|
-
DialogPrimitive.Overlay,
|
|
772
|
-
{
|
|
773
|
-
"data-slot": "dialog-overlay",
|
|
774
|
-
className: cn(
|
|
775
|
-
"fixed inset-0 isolate z-50 bg-black/30 duration-100 supports-backdrop-filter:backdrop-blur-sm data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
776
|
-
className
|
|
777
|
-
),
|
|
778
|
-
...props
|
|
779
|
-
}
|
|
780
|
-
);
|
|
781
|
-
}
|
|
782
|
-
function DialogContent({
|
|
783
|
-
className,
|
|
784
|
-
children,
|
|
785
|
-
showCloseButton = true,
|
|
786
|
-
...props
|
|
787
|
-
}) {
|
|
788
|
-
return /* @__PURE__ */ jsxs5(DialogPortal, { children: [
|
|
789
|
-
/* @__PURE__ */ jsx9(DialogOverlay, {}),
|
|
790
|
-
/* @__PURE__ */ jsxs5(
|
|
791
|
-
DialogPrimitive.Content,
|
|
792
|
-
{
|
|
793
|
-
"data-slot": "dialog-content",
|
|
794
|
-
className: cn(
|
|
795
|
-
"fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-4xl bg-popover p-6 text-sm text-popover-foreground shadow-xl ring-1 ring-foreground/5 duration-100 outline-none sm:max-w-md dark:ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
796
|
-
className
|
|
797
|
-
),
|
|
798
|
-
...props,
|
|
799
|
-
children: [
|
|
800
|
-
children,
|
|
801
|
-
showCloseButton && /* @__PURE__ */ jsx9(DialogPrimitive.Close, { "data-slot": "dialog-close", asChild: true, children: /* @__PURE__ */ jsxs5(
|
|
802
|
-
Button,
|
|
803
|
-
{
|
|
804
|
-
variant: "ghost",
|
|
805
|
-
className: "absolute top-4 right-4 bg-secondary",
|
|
806
|
-
size: "icon-sm",
|
|
807
|
-
children: [
|
|
808
|
-
/* @__PURE__ */ jsx9(
|
|
809
|
-
XIcon,
|
|
810
|
-
{}
|
|
811
|
-
),
|
|
812
|
-
/* @__PURE__ */ jsx9("span", { className: "sr-only", children: "Close" })
|
|
813
|
-
]
|
|
814
|
-
}
|
|
815
|
-
) })
|
|
816
|
-
]
|
|
817
|
-
}
|
|
818
|
-
)
|
|
819
|
-
] });
|
|
820
|
-
}
|
|
821
|
-
function DialogHeader({ className, ...props }) {
|
|
822
|
-
return /* @__PURE__ */ jsx9(
|
|
823
|
-
"div",
|
|
824
|
-
{
|
|
825
|
-
"data-slot": "dialog-header",
|
|
826
|
-
className: cn("flex flex-col gap-1.5", className),
|
|
827
|
-
...props
|
|
828
|
-
}
|
|
829
|
-
);
|
|
830
|
-
}
|
|
831
|
-
function DialogFooter({
|
|
832
|
-
className,
|
|
833
|
-
showCloseButton = false,
|
|
834
|
-
children,
|
|
835
|
-
...props
|
|
836
|
-
}) {
|
|
837
|
-
return /* @__PURE__ */ jsxs5(
|
|
838
|
-
"div",
|
|
839
|
-
{
|
|
840
|
-
"data-slot": "dialog-footer",
|
|
841
|
-
className: cn(
|
|
842
|
-
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
843
|
-
className
|
|
844
|
-
),
|
|
845
|
-
...props,
|
|
846
|
-
children: [
|
|
847
|
-
children,
|
|
848
|
-
showCloseButton && /* @__PURE__ */ jsx9(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx9(Button, { variant: "outline", children: "Close" }) })
|
|
849
|
-
]
|
|
850
|
-
}
|
|
851
|
-
);
|
|
852
|
-
}
|
|
853
|
-
function DialogTitle({
|
|
854
|
-
className,
|
|
855
|
-
...props
|
|
856
|
-
}) {
|
|
857
|
-
return /* @__PURE__ */ jsx9(
|
|
858
|
-
DialogPrimitive.Title,
|
|
859
|
-
{
|
|
860
|
-
"data-slot": "dialog-title",
|
|
861
|
-
className: cn(
|
|
862
|
-
"font-heading text-base leading-none font-medium",
|
|
863
|
-
className
|
|
864
|
-
),
|
|
865
|
-
...props
|
|
866
|
-
}
|
|
867
|
-
);
|
|
868
|
-
}
|
|
869
|
-
function DialogDescription({
|
|
870
|
-
className,
|
|
871
|
-
...props
|
|
872
|
-
}) {
|
|
873
|
-
return /* @__PURE__ */ jsx9(
|
|
874
|
-
DialogPrimitive.Description,
|
|
875
|
-
{
|
|
876
|
-
"data-slot": "dialog-description",
|
|
877
|
-
className: cn(
|
|
878
|
-
"text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
|
|
879
|
-
className
|
|
880
|
-
),
|
|
881
|
-
...props
|
|
882
|
-
}
|
|
883
|
-
);
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
// scaffold/src/components/chat/external-link-dialog.tsx
|
|
887
|
-
import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
888
751
|
function ExternalLinkDialog({ isOpen, onClose, onConfirm, url }) {
|
|
752
|
+
const dialogRef = React4.useRef(null);
|
|
753
|
+
const headingId = React4.useId();
|
|
754
|
+
const descriptionId = React4.useId();
|
|
889
755
|
const [copied, setCopied] = React4.useState(false);
|
|
756
|
+
React4.useEffect(() => {
|
|
757
|
+
const dialog = dialogRef.current;
|
|
758
|
+
if (!dialog) return;
|
|
759
|
+
if (isOpen && !dialog.open) dialog.showModal();
|
|
760
|
+
if (!isOpen && dialog.open) dialog.close();
|
|
761
|
+
}, [isOpen]);
|
|
890
762
|
const close = () => {
|
|
891
763
|
setCopied(false);
|
|
892
764
|
onClose();
|
|
@@ -899,29 +771,44 @@ function ExternalLinkDialog({ isOpen, onClose, onConfirm, url }) {
|
|
|
899
771
|
onConfirm();
|
|
900
772
|
close();
|
|
901
773
|
};
|
|
902
|
-
return /* @__PURE__ */
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
774
|
+
return /* @__PURE__ */ jsx9(
|
|
775
|
+
"dialog",
|
|
776
|
+
{
|
|
777
|
+
"aria-describedby": descriptionId,
|
|
778
|
+
"aria-labelledby": headingId,
|
|
779
|
+
className: "m-auto max-h-[calc(100dvh-2rem)] w-[calc(100%-2rem)] max-w-md overflow-auto rounded-lg border bg-background p-0 text-foreground shadow-lg backdrop:bg-black/50",
|
|
780
|
+
onCancel: (event) => {
|
|
781
|
+
event.preventDefault();
|
|
782
|
+
close();
|
|
783
|
+
},
|
|
784
|
+
onClick: (event) => {
|
|
785
|
+
if (event.target === event.currentTarget) close();
|
|
786
|
+
},
|
|
787
|
+
ref: dialogRef,
|
|
788
|
+
children: /* @__PURE__ */ jsxs5("div", { className: "grid gap-4 p-6", children: [
|
|
789
|
+
/* @__PURE__ */ jsxs5("div", { className: "grid gap-2", children: [
|
|
790
|
+
/* @__PURE__ */ jsx9("h2", { className: "text-lg leading-none font-semibold", id: headingId, children: "Open external link?" }),
|
|
791
|
+
/* @__PURE__ */ jsx9("p", { className: "text-sm text-muted-foreground", id: descriptionId, children: "You\u2019re about to visit an external website." })
|
|
792
|
+
] }),
|
|
793
|
+
/* @__PURE__ */ jsx9("div", { className: "max-h-32 overflow-auto rounded-md bg-muted p-3 font-mono text-xs wrap-break-word", children: url }),
|
|
794
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", children: [
|
|
795
|
+
/* @__PURE__ */ jsx9(Button, { onClick: close, type: "button", variant: "ghost", children: "Cancel" }),
|
|
796
|
+
/* @__PURE__ */ jsx9(Button, { onClick: () => void copyUrl(), type: "button", variant: "outline", children: copied ? "Copied" : "Copy link" }),
|
|
797
|
+
/* @__PURE__ */ jsx9(Button, { onClick: openUrl, type: "button", children: "Open link" })
|
|
798
|
+
] })
|
|
799
|
+
] })
|
|
800
|
+
}
|
|
801
|
+
);
|
|
915
802
|
}
|
|
916
803
|
|
|
917
804
|
// scaffold/src/components/chat/message-parts.tsx
|
|
918
|
-
import { Fragment as Fragment2, jsx as
|
|
805
|
+
import { Fragment as Fragment2, jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
919
806
|
var linkSafety = {
|
|
920
807
|
enabled: true,
|
|
921
|
-
renderModal: (props) => /* @__PURE__ */
|
|
808
|
+
renderModal: (props) => /* @__PURE__ */ jsx10(ExternalLinkDialog, { ...props })
|
|
922
809
|
};
|
|
923
810
|
function ScaffoldTimeline(props) {
|
|
924
|
-
return /* @__PURE__ */
|
|
811
|
+
return /* @__PURE__ */ jsx10(
|
|
925
812
|
AgentResponseTimeline,
|
|
926
813
|
{
|
|
927
814
|
...props,
|
|
@@ -936,15 +823,17 @@ function MessageParts({
|
|
|
936
823
|
message,
|
|
937
824
|
getHitlActionState,
|
|
938
825
|
isLoading,
|
|
826
|
+
timelineOptions,
|
|
939
827
|
onHitlAction,
|
|
940
828
|
Timeline = ScaffoldTimeline
|
|
941
829
|
}) {
|
|
942
830
|
if (message.role === "assistant") {
|
|
943
|
-
return /* @__PURE__ */
|
|
831
|
+
return /* @__PURE__ */ jsx10(
|
|
944
832
|
Timeline,
|
|
945
833
|
{
|
|
946
834
|
getHitlActionState,
|
|
947
835
|
isLoading,
|
|
836
|
+
...timelineOptions,
|
|
948
837
|
message,
|
|
949
838
|
onHitlAction: (part, response, options2) => {
|
|
950
839
|
void onHitlAction(part, response, options2).catch(() => void 0);
|
|
@@ -955,8 +844,8 @@ function MessageParts({
|
|
|
955
844
|
}
|
|
956
845
|
const text = message.parts.filter((part) => part.kind === "text").map((part) => part.kind === "text" ? part.text : "").join("") || message.content;
|
|
957
846
|
const supportingParts = message.parts.filter((part) => part.kind !== "text" && part.kind !== "data");
|
|
958
|
-
return /* @__PURE__ */
|
|
959
|
-
supportingParts.map((part) => /* @__PURE__ */
|
|
847
|
+
return /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
848
|
+
supportingParts.map((part) => /* @__PURE__ */ jsx10(
|
|
960
849
|
AgentChatPart,
|
|
961
850
|
{
|
|
962
851
|
getHitlActionState,
|
|
@@ -968,14 +857,14 @@ function MessageParts({
|
|
|
968
857
|
},
|
|
969
858
|
part.id
|
|
970
859
|
)),
|
|
971
|
-
text ? /* @__PURE__ */
|
|
860
|
+
text ? /* @__PURE__ */ jsx10(CollapsibleUserMessage, { content: text }) : null
|
|
972
861
|
] });
|
|
973
862
|
}
|
|
974
863
|
|
|
975
864
|
// scaffold/src/components/ui/bubble.tsx
|
|
976
865
|
import { cva as cva2 } from "class-variance-authority";
|
|
977
866
|
import { Slot as Slot3 } from "radix-ui";
|
|
978
|
-
import { jsx as
|
|
867
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
979
868
|
var bubbleVariants = cva2(
|
|
980
869
|
"group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full",
|
|
981
870
|
{
|
|
@@ -1001,7 +890,7 @@ function Bubble({
|
|
|
1001
890
|
className,
|
|
1002
891
|
...props
|
|
1003
892
|
}) {
|
|
1004
|
-
return /* @__PURE__ */
|
|
893
|
+
return /* @__PURE__ */ jsx11(
|
|
1005
894
|
"div",
|
|
1006
895
|
{
|
|
1007
896
|
"data-slot": "bubble",
|
|
@@ -1018,7 +907,7 @@ function BubbleContent({
|
|
|
1018
907
|
...props
|
|
1019
908
|
}) {
|
|
1020
909
|
const Comp = asChild ? Slot3.Root : "div";
|
|
1021
|
-
return /* @__PURE__ */
|
|
910
|
+
return /* @__PURE__ */ jsx11(
|
|
1022
911
|
Comp,
|
|
1023
912
|
{
|
|
1024
913
|
"data-slot": "bubble-content",
|
|
@@ -1051,13 +940,13 @@ var bubbleReactionsVariants = cva2(
|
|
|
1051
940
|
);
|
|
1052
941
|
|
|
1053
942
|
// scaffold/src/components/ui/message.tsx
|
|
1054
|
-
import { jsx as
|
|
943
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
1055
944
|
function Message({
|
|
1056
945
|
className,
|
|
1057
946
|
align = "start",
|
|
1058
947
|
...props
|
|
1059
948
|
}) {
|
|
1060
|
-
return /* @__PURE__ */
|
|
949
|
+
return /* @__PURE__ */ jsx12(
|
|
1061
950
|
"div",
|
|
1062
951
|
{
|
|
1063
952
|
"data-slot": "message",
|
|
@@ -1071,7 +960,7 @@ function Message({
|
|
|
1071
960
|
);
|
|
1072
961
|
}
|
|
1073
962
|
function MessageContent({ className, ...props }) {
|
|
1074
|
-
return /* @__PURE__ */
|
|
963
|
+
return /* @__PURE__ */ jsx12(
|
|
1075
964
|
"div",
|
|
1076
965
|
{
|
|
1077
966
|
"data-slot": "message-content",
|
|
@@ -1084,7 +973,7 @@ function MessageContent({ className, ...props }) {
|
|
|
1084
973
|
);
|
|
1085
974
|
}
|
|
1086
975
|
function MessageFooter({ className, ...props }) {
|
|
1087
|
-
return /* @__PURE__ */
|
|
976
|
+
return /* @__PURE__ */ jsx12(
|
|
1088
977
|
"div",
|
|
1089
978
|
{
|
|
1090
979
|
"data-slot": "message-footer",
|
|
@@ -1098,12 +987,13 @@ function MessageFooter({ className, ...props }) {
|
|
|
1098
987
|
}
|
|
1099
988
|
|
|
1100
989
|
// scaffold/src/components/chat/chat-message.tsx
|
|
1101
|
-
import { jsx as
|
|
990
|
+
import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1102
991
|
function ChatMessage({
|
|
1103
992
|
animateCompletion,
|
|
1104
993
|
allowFeedback,
|
|
1105
994
|
getHitlActionState,
|
|
1106
995
|
isLoading,
|
|
996
|
+
timelineOptions,
|
|
1107
997
|
message,
|
|
1108
998
|
onHitlAction,
|
|
1109
999
|
onRegenerate,
|
|
@@ -1114,8 +1004,8 @@ function ChatMessage({
|
|
|
1114
1004
|
const isUser = message.role === "user";
|
|
1115
1005
|
const showCompletionActions = !isUser && message.isFinal !== false && !isLoading;
|
|
1116
1006
|
const animateCompletionActions = useCompletionActionEntrance(showCompletionActions, message.runId, animateCompletion);
|
|
1117
|
-
return /* @__PURE__ */
|
|
1118
|
-
isUser && message.attachments?.length ? /* @__PURE__ */
|
|
1007
|
+
return /* @__PURE__ */ jsx13(Message, { align: isUser ? "end" : "start", children: /* @__PURE__ */ jsxs7(MessageContent, { className: isUser ? "gap-0" : void 0, children: [
|
|
1008
|
+
isUser && message.attachments?.length ? /* @__PURE__ */ jsx13(
|
|
1119
1009
|
ChatAttachmentRows2,
|
|
1120
1010
|
{
|
|
1121
1011
|
attachments: message.attachments,
|
|
@@ -1123,17 +1013,18 @@ function ChatMessage({
|
|
|
1123
1013
|
resolveContent: resolveAttachmentContent
|
|
1124
1014
|
}
|
|
1125
1015
|
) : null,
|
|
1126
|
-
/* @__PURE__ */
|
|
1016
|
+
/* @__PURE__ */ jsx13(Bubble, { variant: isUser ? "secondary" : "ghost", align: isUser ? "end" : "start", className: isUser ? "max-w-[min(75%,42rem)]" : "max-w-full overflow-visible", children: /* @__PURE__ */ jsx13(BubbleContent, { className: isUser ? "px-4 py-2.5" : "w-full overflow-visible", children: /* @__PURE__ */ jsx13(
|
|
1127
1017
|
MessageParts,
|
|
1128
1018
|
{
|
|
1129
1019
|
getHitlActionState,
|
|
1130
1020
|
isLoading,
|
|
1021
|
+
timelineOptions,
|
|
1131
1022
|
message,
|
|
1132
1023
|
onHitlAction,
|
|
1133
1024
|
Timeline
|
|
1134
1025
|
}
|
|
1135
1026
|
) }) }),
|
|
1136
|
-
isUser && /* @__PURE__ */
|
|
1027
|
+
isUser && /* @__PURE__ */ jsx13(AgentChatUserMessageActionRow, { children: /* @__PURE__ */ jsx13(
|
|
1137
1028
|
AgentChatDefaultActions,
|
|
1138
1029
|
{
|
|
1139
1030
|
handlers: {
|
|
@@ -1144,7 +1035,7 @@ function ChatMessage({
|
|
|
1144
1035
|
message
|
|
1145
1036
|
}
|
|
1146
1037
|
) }),
|
|
1147
|
-
showCompletionActions && /* @__PURE__ */
|
|
1038
|
+
showCompletionActions && /* @__PURE__ */ jsx13(MessageFooter, { className: "a24-chat-message-action-row--assistant gap-1", children: /* @__PURE__ */ jsx13(
|
|
1148
1039
|
AgentChatDefaultActions,
|
|
1149
1040
|
{
|
|
1150
1041
|
animateCompletion: animateCompletionActions,
|
|
@@ -1167,7 +1058,7 @@ import * as React5 from "react";
|
|
|
1167
1058
|
import { useAgentClient, partsFromResponseBlocks } from "@agents24/react";
|
|
1168
1059
|
import { AgentResponseTimeline as AgentResponseTimeline2 } from "@agents24/chat-react/ui";
|
|
1169
1060
|
import { useDelegationTasks } from "@agents24/chat-react/runtime";
|
|
1170
|
-
import { jsx as
|
|
1061
|
+
import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1171
1062
|
function SubagentTasks({ threadId }) {
|
|
1172
1063
|
const client = useAgentClient();
|
|
1173
1064
|
const source = React5.useMemo(() => ({ events: (input) => client.threads.delegations.events(input) }), [client]);
|
|
@@ -1175,14 +1066,14 @@ function SubagentTasks({ threadId }) {
|
|
|
1175
1066
|
const [selection, setSelection] = React5.useState({ threadId: null, handle: null });
|
|
1176
1067
|
const selected = selection.threadId === threadId ? selection.handle : null;
|
|
1177
1068
|
if (!threadId || !tasks.length && !error) return null;
|
|
1178
|
-
return /* @__PURE__ */
|
|
1179
|
-
/* @__PURE__ */
|
|
1069
|
+
return /* @__PURE__ */ jsx14("section", { "aria-label": "Subagent tasks", className: "mx-auto w-full max-w-3xl px-4 py-2 text-sm", children: /* @__PURE__ */ jsxs8("details", { children: [
|
|
1070
|
+
/* @__PURE__ */ jsxs8("summary", { className: "cursor-pointer font-medium", children: [
|
|
1180
1071
|
"Tasks (",
|
|
1181
1072
|
tasks.length,
|
|
1182
1073
|
")"
|
|
1183
1074
|
] }),
|
|
1184
|
-
error ? /* @__PURE__ */
|
|
1185
|
-
/* @__PURE__ */
|
|
1075
|
+
error ? /* @__PURE__ */ jsx14("p", { role: "alert", children: "Task updates are unavailable. Retrying\u2026" }) : null,
|
|
1076
|
+
/* @__PURE__ */ jsx14("ul", { className: "max-h-56 overflow-y-auto", children: tasks.map((task) => /* @__PURE__ */ jsx14("li", { style: { paddingInlineStart: Math.max(0, task.depth - 1) * 12 }, children: /* @__PURE__ */ jsxs8(
|
|
1186
1077
|
"button",
|
|
1187
1078
|
{
|
|
1188
1079
|
type: "button",
|
|
@@ -1190,15 +1081,15 @@ function SubagentTasks({ threadId }) {
|
|
|
1190
1081
|
onClick: () => setSelection({ threadId, handle: selected === task.handle ? null : task.handle }),
|
|
1191
1082
|
"aria-expanded": selected === task.handle,
|
|
1192
1083
|
children: [
|
|
1193
|
-
/* @__PURE__ */
|
|
1084
|
+
/* @__PURE__ */ jsxs8("span", { className: "min-w-0 truncate", children: [
|
|
1194
1085
|
task.name,
|
|
1195
1086
|
task.background ? " \xB7 Background" : ""
|
|
1196
1087
|
] }),
|
|
1197
|
-
/* @__PURE__ */
|
|
1088
|
+
/* @__PURE__ */ jsx14("span", { className: "shrink-0 text-xs text-muted-foreground", children: task.status.replaceAll("_", " ") })
|
|
1198
1089
|
]
|
|
1199
1090
|
}
|
|
1200
1091
|
) }, task.handle)) }),
|
|
1201
|
-
tasks.filter((task) => task.handle === selected).map((task) => /* @__PURE__ */
|
|
1092
|
+
tasks.filter((task) => task.handle === selected).map((task) => /* @__PURE__ */ jsx14(TaskConversation, { threadId, task, onChanged: refresh }, `${threadId}:${task.handle}`))
|
|
1202
1093
|
] }) });
|
|
1203
1094
|
}
|
|
1204
1095
|
function TaskConversation({ threadId, task, onChanged }) {
|
|
@@ -1266,22 +1157,22 @@ function TaskConversation({ threadId, task, onChanged }) {
|
|
|
1266
1157
|
}
|
|
1267
1158
|
};
|
|
1268
1159
|
const turns = Array.from(new Map([...earlier, ...history?.turns || []].map((turn) => [turn.id, turn])).values()).sort((a, b) => a.turn_index - b.turn_index);
|
|
1269
|
-
return /* @__PURE__ */
|
|
1270
|
-
/* @__PURE__ */
|
|
1271
|
-
error ? /* @__PURE__ */
|
|
1272
|
-
/* @__PURE__ */
|
|
1273
|
-
task.capabilities.interrupt ? /* @__PURE__ */
|
|
1274
|
-
task.capabilities.cancel ? /* @__PURE__ */
|
|
1275
|
-
before !== null ? /* @__PURE__ */
|
|
1160
|
+
return /* @__PURE__ */ jsxs8("div", { className: "space-y-3 rounded-md bg-muted/30 p-3", children: [
|
|
1161
|
+
/* @__PURE__ */ jsx14("h3", { className: "font-medium", children: task.name }),
|
|
1162
|
+
error ? /* @__PURE__ */ jsx14("p", { role: "alert", children: error }) : null,
|
|
1163
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex flex-wrap gap-2", children: [
|
|
1164
|
+
task.capabilities.interrupt ? /* @__PURE__ */ jsx14(Button, { variant: "secondary", size: "sm", disabled: busy, onClick: () => void act("interrupt"), children: "Interrupt" }) : null,
|
|
1165
|
+
task.capabilities.cancel ? /* @__PURE__ */ jsx14(Button, { variant: "secondary", size: "sm", disabled: busy, onClick: () => void act("cancel"), children: "Cancel task" }) : null,
|
|
1166
|
+
before !== null ? /* @__PURE__ */ jsx14(Button, { variant: "ghost", size: "sm", disabled: busy, onClick: () => void loadEarlier(), children: "Earlier exchanges" }) : null
|
|
1276
1167
|
] }),
|
|
1277
|
-
/* @__PURE__ */
|
|
1278
|
-
turn.assignment_instruction ? /* @__PURE__ */
|
|
1279
|
-
turn.user_input_text ? /* @__PURE__ */
|
|
1280
|
-
turn.exchanges?.map((exchange) => /* @__PURE__ */
|
|
1281
|
-
/* @__PURE__ */
|
|
1168
|
+
/* @__PURE__ */ jsx14("div", { className: "max-h-[55dvh] space-y-4 overflow-y-auto break-words", children: turns.map((turn) => /* @__PURE__ */ jsxs8("article", { className: "space-y-2", children: [
|
|
1169
|
+
turn.assignment_instruction ? /* @__PURE__ */ jsx14("p", { className: "whitespace-pre-wrap text-muted-foreground", children: turn.assignment_instruction }) : null,
|
|
1170
|
+
turn.user_input_text ? /* @__PURE__ */ jsx14("p", { className: "whitespace-pre-wrap", children: turn.user_input_text }) : null,
|
|
1171
|
+
turn.exchanges?.map((exchange) => /* @__PURE__ */ jsxs8("div", { className: "whitespace-pre-wrap break-words text-sm", children: [
|
|
1172
|
+
/* @__PURE__ */ jsx14("p", { className: "text-xs font-medium", children: exchange.sender === "parent" ? "Parent Agent" : "Subagent update" }),
|
|
1282
1173
|
exchange.text
|
|
1283
1174
|
] }, exchange.id)),
|
|
1284
|
-
/* @__PURE__ */
|
|
1175
|
+
/* @__PURE__ */ jsx14(AgentResponseTimeline2, { message: { id: turn.id, role: "assistant", createdAt: turn.created_at, content: turn.assistant_output_text || "", parts: partsFromResponseBlocks(turn.response_blocks) } })
|
|
1285
1176
|
] }, turn.id)) })
|
|
1286
1177
|
] });
|
|
1287
1178
|
}
|
|
@@ -1289,7 +1180,7 @@ function TaskConversation({ threadId, task, onChanged }) {
|
|
|
1289
1180
|
// scaffold/src/components/chat/theme-menu.tsx
|
|
1290
1181
|
import { Laptop, Moon, Sun } from "lucide-react";
|
|
1291
1182
|
import * as React6 from "react";
|
|
1292
|
-
import { jsx as
|
|
1183
|
+
import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1293
1184
|
var options = [
|
|
1294
1185
|
{ value: "system", label: "System", icon: Laptop },
|
|
1295
1186
|
{ value: "light", label: "Light", icon: Sun },
|
|
@@ -1320,8 +1211,8 @@ function ThemeMenu() {
|
|
|
1320
1211
|
}, [open]);
|
|
1321
1212
|
if (inherited) return null;
|
|
1322
1213
|
const label = appearance === "system" ? "System" : appearance === "light" ? "Light" : "Dark";
|
|
1323
|
-
return /* @__PURE__ */
|
|
1324
|
-
/* @__PURE__ */
|
|
1214
|
+
return /* @__PURE__ */ jsxs9("div", { ref: rootRef, className: "relative", children: [
|
|
1215
|
+
/* @__PURE__ */ jsx15(
|
|
1325
1216
|
Button,
|
|
1326
1217
|
{
|
|
1327
1218
|
"aria-controls": menuId,
|
|
@@ -1331,16 +1222,16 @@ function ThemeMenu() {
|
|
|
1331
1222
|
onClick: () => setOpen((value) => !value),
|
|
1332
1223
|
size: "icon-sm",
|
|
1333
1224
|
variant: "ghost",
|
|
1334
|
-
children: /* @__PURE__ */
|
|
1225
|
+
children: /* @__PURE__ */ jsx15(ActiveIcon, {})
|
|
1335
1226
|
}
|
|
1336
1227
|
),
|
|
1337
|
-
open ? /* @__PURE__ */
|
|
1228
|
+
open ? /* @__PURE__ */ jsx15(
|
|
1338
1229
|
"div",
|
|
1339
1230
|
{
|
|
1340
1231
|
id: menuId,
|
|
1341
1232
|
className: "absolute end-0 top-full z-50 mt-1 flex min-w-44 flex-col rounded-xl border bg-popover p-1 text-popover-foreground shadow-md",
|
|
1342
1233
|
role: "menu",
|
|
1343
|
-
children: options.map(({ value, label: optionLabel, icon: Icon }, index) => /* @__PURE__ */
|
|
1234
|
+
children: options.map(({ value, label: optionLabel, icon: Icon }, index) => /* @__PURE__ */ jsxs9(
|
|
1344
1235
|
Button,
|
|
1345
1236
|
{
|
|
1346
1237
|
ref: index === 0 ? firstItemRef : void 0,
|
|
@@ -1354,7 +1245,7 @@ function ThemeMenu() {
|
|
|
1354
1245
|
size: "sm",
|
|
1355
1246
|
variant: "ghost",
|
|
1356
1247
|
children: [
|
|
1357
|
-
/* @__PURE__ */
|
|
1248
|
+
/* @__PURE__ */ jsx15(Icon, {}),
|
|
1358
1249
|
" ",
|
|
1359
1250
|
optionLabel
|
|
1360
1251
|
]
|
|
@@ -1401,31 +1292,31 @@ function useIsMobile() {
|
|
|
1401
1292
|
}
|
|
1402
1293
|
|
|
1403
1294
|
// scaffold/src/components/ui/input.tsx
|
|
1404
|
-
import { jsx as
|
|
1295
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1405
1296
|
|
|
1406
1297
|
// scaffold/src/components/ui/separator.tsx
|
|
1407
1298
|
import { Separator as SeparatorPrimitive } from "radix-ui";
|
|
1408
|
-
import { jsx as
|
|
1299
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1409
1300
|
|
|
1410
1301
|
// scaffold/src/components/ui/sheet.tsx
|
|
1411
1302
|
import { Dialog as SheetPrimitive } from "radix-ui";
|
|
1412
|
-
import { XIcon
|
|
1413
|
-
import { jsx as
|
|
1303
|
+
import { XIcon } from "lucide-react";
|
|
1304
|
+
import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1414
1305
|
function Sheet({ ...props }) {
|
|
1415
|
-
return /* @__PURE__ */
|
|
1306
|
+
return /* @__PURE__ */ jsx18(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
1416
1307
|
}
|
|
1417
1308
|
function SheetPortal({
|
|
1418
1309
|
container,
|
|
1419
1310
|
...props
|
|
1420
1311
|
}) {
|
|
1421
1312
|
const themeContainer = useThemePortalContainer();
|
|
1422
|
-
return /* @__PURE__ */
|
|
1313
|
+
return /* @__PURE__ */ jsx18(SheetPrimitive.Portal, { container: container || themeContainer || void 0, "data-slot": "sheet-portal", ...props });
|
|
1423
1314
|
}
|
|
1424
1315
|
function SheetOverlay({
|
|
1425
1316
|
className,
|
|
1426
1317
|
...props
|
|
1427
1318
|
}) {
|
|
1428
|
-
return /* @__PURE__ */
|
|
1319
|
+
return /* @__PURE__ */ jsx18(
|
|
1429
1320
|
SheetPrimitive.Overlay,
|
|
1430
1321
|
{
|
|
1431
1322
|
"data-slot": "sheet-overlay",
|
|
@@ -1444,9 +1335,9 @@ function SheetContent({
|
|
|
1444
1335
|
showCloseButton = true,
|
|
1445
1336
|
...props
|
|
1446
1337
|
}) {
|
|
1447
|
-
return /* @__PURE__ */
|
|
1448
|
-
/* @__PURE__ */
|
|
1449
|
-
/* @__PURE__ */
|
|
1338
|
+
return /* @__PURE__ */ jsxs10(SheetPortal, { children: [
|
|
1339
|
+
/* @__PURE__ */ jsx18(SheetOverlay, {}),
|
|
1340
|
+
/* @__PURE__ */ jsxs10(
|
|
1450
1341
|
SheetPrimitive.Content,
|
|
1451
1342
|
{
|
|
1452
1343
|
"data-slot": "sheet-content",
|
|
@@ -1458,18 +1349,18 @@ function SheetContent({
|
|
|
1458
1349
|
...props,
|
|
1459
1350
|
children: [
|
|
1460
1351
|
children,
|
|
1461
|
-
showCloseButton && /* @__PURE__ */
|
|
1352
|
+
showCloseButton && /* @__PURE__ */ jsx18(SheetPrimitive.Close, { "data-slot": "sheet-close", asChild: true, children: /* @__PURE__ */ jsxs10(
|
|
1462
1353
|
Button,
|
|
1463
1354
|
{
|
|
1464
1355
|
variant: "ghost",
|
|
1465
1356
|
className: "absolute top-4 right-4 bg-secondary",
|
|
1466
1357
|
size: "icon-sm",
|
|
1467
1358
|
children: [
|
|
1468
|
-
/* @__PURE__ */
|
|
1469
|
-
|
|
1359
|
+
/* @__PURE__ */ jsx18(
|
|
1360
|
+
XIcon,
|
|
1470
1361
|
{}
|
|
1471
1362
|
),
|
|
1472
|
-
/* @__PURE__ */
|
|
1363
|
+
/* @__PURE__ */ jsx18("span", { className: "sr-only", children: "Close" })
|
|
1473
1364
|
]
|
|
1474
1365
|
}
|
|
1475
1366
|
) })
|
|
@@ -1479,7 +1370,7 @@ function SheetContent({
|
|
|
1479
1370
|
] });
|
|
1480
1371
|
}
|
|
1481
1372
|
function SheetHeader({ className, ...props }) {
|
|
1482
|
-
return /* @__PURE__ */
|
|
1373
|
+
return /* @__PURE__ */ jsx18(
|
|
1483
1374
|
"div",
|
|
1484
1375
|
{
|
|
1485
1376
|
"data-slot": "sheet-header",
|
|
@@ -1492,7 +1383,7 @@ function SheetTitle({
|
|
|
1492
1383
|
className,
|
|
1493
1384
|
...props
|
|
1494
1385
|
}) {
|
|
1495
|
-
return /* @__PURE__ */
|
|
1386
|
+
return /* @__PURE__ */ jsx18(
|
|
1496
1387
|
SheetPrimitive.Title,
|
|
1497
1388
|
{
|
|
1498
1389
|
"data-slot": "sheet-title",
|
|
@@ -1508,7 +1399,7 @@ function SheetDescription({
|
|
|
1508
1399
|
className,
|
|
1509
1400
|
...props
|
|
1510
1401
|
}) {
|
|
1511
|
-
return /* @__PURE__ */
|
|
1402
|
+
return /* @__PURE__ */ jsx18(
|
|
1512
1403
|
SheetPrimitive.Description,
|
|
1513
1404
|
{
|
|
1514
1405
|
"data-slot": "sheet-description",
|
|
@@ -1519,11 +1410,11 @@ function SheetDescription({
|
|
|
1519
1410
|
}
|
|
1520
1411
|
|
|
1521
1412
|
// scaffold/src/components/ui/skeleton.tsx
|
|
1522
|
-
import { jsx as
|
|
1413
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1523
1414
|
|
|
1524
1415
|
// scaffold/src/components/ui/sidebar.tsx
|
|
1525
1416
|
import { PanelLeftIcon } from "lucide-react";
|
|
1526
|
-
import { jsx as
|
|
1417
|
+
import { jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1527
1418
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
1528
1419
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
1529
1420
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
@@ -1585,7 +1476,7 @@ function SidebarProvider({
|
|
|
1585
1476
|
}),
|
|
1586
1477
|
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
1587
1478
|
);
|
|
1588
|
-
return /* @__PURE__ */
|
|
1479
|
+
return /* @__PURE__ */ jsx20(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx20(
|
|
1589
1480
|
"div",
|
|
1590
1481
|
{
|
|
1591
1482
|
"data-slot": "sidebar-wrapper",
|
|
@@ -1609,7 +1500,7 @@ function Sidebar({
|
|
|
1609
1500
|
}) {
|
|
1610
1501
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
1611
1502
|
if (collapsible === "none") {
|
|
1612
|
-
return /* @__PURE__ */
|
|
1503
|
+
return /* @__PURE__ */ jsx20(
|
|
1613
1504
|
"div",
|
|
1614
1505
|
{
|
|
1615
1506
|
"data-slot": "sidebar",
|
|
@@ -1623,7 +1514,7 @@ function Sidebar({
|
|
|
1623
1514
|
);
|
|
1624
1515
|
}
|
|
1625
1516
|
if (isMobile) {
|
|
1626
|
-
return /* @__PURE__ */
|
|
1517
|
+
return /* @__PURE__ */ jsx20(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs11(
|
|
1627
1518
|
SheetContent,
|
|
1628
1519
|
{
|
|
1629
1520
|
dir,
|
|
@@ -1633,16 +1524,16 @@ function Sidebar({
|
|
|
1633
1524
|
className: "w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [--sidebar-width:18rem] [&>button]:hidden",
|
|
1634
1525
|
side,
|
|
1635
1526
|
children: [
|
|
1636
|
-
/* @__PURE__ */
|
|
1637
|
-
/* @__PURE__ */
|
|
1638
|
-
/* @__PURE__ */
|
|
1527
|
+
/* @__PURE__ */ jsxs11(SheetHeader, { className: "sr-only", children: [
|
|
1528
|
+
/* @__PURE__ */ jsx20(SheetTitle, { children: "Sidebar" }),
|
|
1529
|
+
/* @__PURE__ */ jsx20(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
1639
1530
|
] }),
|
|
1640
|
-
/* @__PURE__ */
|
|
1531
|
+
/* @__PURE__ */ jsx20("div", { className: "flex h-full w-full flex-col", children })
|
|
1641
1532
|
]
|
|
1642
1533
|
}
|
|
1643
1534
|
) });
|
|
1644
1535
|
}
|
|
1645
|
-
return /* @__PURE__ */
|
|
1536
|
+
return /* @__PURE__ */ jsxs11(
|
|
1646
1537
|
"div",
|
|
1647
1538
|
{
|
|
1648
1539
|
className: "group peer hidden text-sidebar-foreground md:block",
|
|
@@ -1652,7 +1543,7 @@ function Sidebar({
|
|
|
1652
1543
|
"data-side": side,
|
|
1653
1544
|
"data-slot": "sidebar",
|
|
1654
1545
|
children: [
|
|
1655
|
-
/* @__PURE__ */
|
|
1546
|
+
/* @__PURE__ */ jsx20(
|
|
1656
1547
|
"div",
|
|
1657
1548
|
{
|
|
1658
1549
|
"data-slot": "sidebar-gap",
|
|
@@ -1664,7 +1555,7 @@ function Sidebar({
|
|
|
1664
1555
|
)
|
|
1665
1556
|
}
|
|
1666
1557
|
),
|
|
1667
|
-
/* @__PURE__ */
|
|
1558
|
+
/* @__PURE__ */ jsx20(
|
|
1668
1559
|
"div",
|
|
1669
1560
|
{
|
|
1670
1561
|
"data-slot": "sidebar-container",
|
|
@@ -1676,7 +1567,7 @@ function Sidebar({
|
|
|
1676
1567
|
className
|
|
1677
1568
|
),
|
|
1678
1569
|
...props,
|
|
1679
|
-
children: /* @__PURE__ */
|
|
1570
|
+
children: /* @__PURE__ */ jsx20(
|
|
1680
1571
|
"div",
|
|
1681
1572
|
{
|
|
1682
1573
|
"data-sidebar": "sidebar",
|
|
@@ -1697,7 +1588,7 @@ function SidebarTrigger({
|
|
|
1697
1588
|
...props
|
|
1698
1589
|
}) {
|
|
1699
1590
|
const { toggleSidebar } = useSidebar();
|
|
1700
|
-
return /* @__PURE__ */
|
|
1591
|
+
return /* @__PURE__ */ jsxs11(
|
|
1701
1592
|
Button,
|
|
1702
1593
|
{
|
|
1703
1594
|
"data-sidebar": "trigger",
|
|
@@ -1711,15 +1602,15 @@ function SidebarTrigger({
|
|
|
1711
1602
|
},
|
|
1712
1603
|
...props,
|
|
1713
1604
|
children: [
|
|
1714
|
-
/* @__PURE__ */
|
|
1715
|
-
/* @__PURE__ */
|
|
1605
|
+
/* @__PURE__ */ jsx20(PanelLeftIcon, {}),
|
|
1606
|
+
/* @__PURE__ */ jsx20("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
1716
1607
|
]
|
|
1717
1608
|
}
|
|
1718
1609
|
);
|
|
1719
1610
|
}
|
|
1720
1611
|
function SidebarRail({ className, ...props }) {
|
|
1721
1612
|
const { toggleSidebar } = useSidebar();
|
|
1722
|
-
return /* @__PURE__ */
|
|
1613
|
+
return /* @__PURE__ */ jsx20(
|
|
1723
1614
|
"button",
|
|
1724
1615
|
{
|
|
1725
1616
|
"data-sidebar": "rail",
|
|
@@ -1742,7 +1633,7 @@ function SidebarRail({ className, ...props }) {
|
|
|
1742
1633
|
);
|
|
1743
1634
|
}
|
|
1744
1635
|
function SidebarInset({ className, ...props }) {
|
|
1745
|
-
return /* @__PURE__ */
|
|
1636
|
+
return /* @__PURE__ */ jsx20(
|
|
1746
1637
|
"main",
|
|
1747
1638
|
{
|
|
1748
1639
|
"data-slot": "sidebar-inset",
|
|
@@ -1755,7 +1646,7 @@ function SidebarInset({ className, ...props }) {
|
|
|
1755
1646
|
);
|
|
1756
1647
|
}
|
|
1757
1648
|
function SidebarHeader({ className, ...props }) {
|
|
1758
|
-
return /* @__PURE__ */
|
|
1649
|
+
return /* @__PURE__ */ jsx20(
|
|
1759
1650
|
"div",
|
|
1760
1651
|
{
|
|
1761
1652
|
"data-slot": "sidebar-header",
|
|
@@ -1769,7 +1660,7 @@ function SidebarHeader({ className, ...props }) {
|
|
|
1769
1660
|
);
|
|
1770
1661
|
}
|
|
1771
1662
|
function SidebarFooter({ className, ...props }) {
|
|
1772
|
-
return /* @__PURE__ */
|
|
1663
|
+
return /* @__PURE__ */ jsx20(
|
|
1773
1664
|
"div",
|
|
1774
1665
|
{
|
|
1775
1666
|
"data-slot": "sidebar-footer",
|
|
@@ -1780,7 +1671,7 @@ function SidebarFooter({ className, ...props }) {
|
|
|
1780
1671
|
);
|
|
1781
1672
|
}
|
|
1782
1673
|
function SidebarContent({ className, ...props }) {
|
|
1783
|
-
return /* @__PURE__ */
|
|
1674
|
+
return /* @__PURE__ */ jsx20(
|
|
1784
1675
|
"div",
|
|
1785
1676
|
{
|
|
1786
1677
|
"data-slot": "sidebar-content",
|
|
@@ -1794,7 +1685,7 @@ function SidebarContent({ className, ...props }) {
|
|
|
1794
1685
|
);
|
|
1795
1686
|
}
|
|
1796
1687
|
function SidebarGroup({ className, ...props }) {
|
|
1797
|
-
return /* @__PURE__ */
|
|
1688
|
+
return /* @__PURE__ */ jsx20(
|
|
1798
1689
|
"div",
|
|
1799
1690
|
{
|
|
1800
1691
|
"data-slot": "sidebar-group",
|
|
@@ -1808,7 +1699,7 @@ function SidebarGroupContent({
|
|
|
1808
1699
|
className,
|
|
1809
1700
|
...props
|
|
1810
1701
|
}) {
|
|
1811
|
-
return /* @__PURE__ */
|
|
1702
|
+
return /* @__PURE__ */ jsx20(
|
|
1812
1703
|
"div",
|
|
1813
1704
|
{
|
|
1814
1705
|
"data-slot": "sidebar-group-content",
|
|
@@ -1819,7 +1710,7 @@ function SidebarGroupContent({
|
|
|
1819
1710
|
);
|
|
1820
1711
|
}
|
|
1821
1712
|
function SidebarMenu({ className, ...props }) {
|
|
1822
|
-
return /* @__PURE__ */
|
|
1713
|
+
return /* @__PURE__ */ jsx20(
|
|
1823
1714
|
"ul",
|
|
1824
1715
|
{
|
|
1825
1716
|
"data-slot": "sidebar-menu",
|
|
@@ -1830,7 +1721,7 @@ function SidebarMenu({ className, ...props }) {
|
|
|
1830
1721
|
);
|
|
1831
1722
|
}
|
|
1832
1723
|
function SidebarMenuItem({ className, ...props }) {
|
|
1833
|
-
return /* @__PURE__ */
|
|
1724
|
+
return /* @__PURE__ */ jsx20(
|
|
1834
1725
|
"li",
|
|
1835
1726
|
{
|
|
1836
1727
|
"data-slot": "sidebar-menu-item",
|
|
@@ -1871,7 +1762,7 @@ function SidebarMenuButton({
|
|
|
1871
1762
|
}) {
|
|
1872
1763
|
const Comp = asChild ? Slot4.Root : "button";
|
|
1873
1764
|
const { isMobile, state } = useSidebar();
|
|
1874
|
-
const button = /* @__PURE__ */
|
|
1765
|
+
const button = /* @__PURE__ */ jsx20(
|
|
1875
1766
|
Comp,
|
|
1876
1767
|
{
|
|
1877
1768
|
"data-slot": "sidebar-menu-button",
|
|
@@ -1890,9 +1781,9 @@ function SidebarMenuButton({
|
|
|
1890
1781
|
children: tooltip
|
|
1891
1782
|
};
|
|
1892
1783
|
}
|
|
1893
|
-
return /* @__PURE__ */
|
|
1894
|
-
/* @__PURE__ */
|
|
1895
|
-
/* @__PURE__ */
|
|
1784
|
+
return /* @__PURE__ */ jsxs11(Tooltip, { children: [
|
|
1785
|
+
/* @__PURE__ */ jsx20(TooltipTrigger, { asChild: true, children: button }),
|
|
1786
|
+
/* @__PURE__ */ jsx20(
|
|
1896
1787
|
TooltipContent,
|
|
1897
1788
|
{
|
|
1898
1789
|
side: "right",
|
|
@@ -1910,7 +1801,7 @@ function SidebarMenuAction({
|
|
|
1910
1801
|
...props
|
|
1911
1802
|
}) {
|
|
1912
1803
|
const Comp = asChild ? Slot4.Root : "button";
|
|
1913
|
-
return /* @__PURE__ */
|
|
1804
|
+
return /* @__PURE__ */ jsx20(
|
|
1914
1805
|
Comp,
|
|
1915
1806
|
{
|
|
1916
1807
|
"data-slot": "sidebar-menu-action",
|
|
@@ -1926,7 +1817,7 @@ function SidebarMenuAction({
|
|
|
1926
1817
|
}
|
|
1927
1818
|
|
|
1928
1819
|
// scaffold/src/components/chat/identity-control.tsx
|
|
1929
|
-
import { jsx as
|
|
1820
|
+
import { jsx as jsx21, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1930
1821
|
function identityLabel(identity) {
|
|
1931
1822
|
if (identity.displayName) return identity.displayName;
|
|
1932
1823
|
if (identity.state === "authenticated") return "Signed in";
|
|
@@ -1937,42 +1828,42 @@ function identityLabel(identity) {
|
|
|
1937
1828
|
}
|
|
1938
1829
|
function IdentityAvatar({ identity }) {
|
|
1939
1830
|
if (identity.avatarUrl) {
|
|
1940
|
-
return /* @__PURE__ */
|
|
1831
|
+
return /* @__PURE__ */ jsx21("img", { alt: "", className: "size-6 rounded-full object-cover", src: identity.avatarUrl });
|
|
1941
1832
|
}
|
|
1942
|
-
return /* @__PURE__ */
|
|
1833
|
+
return /* @__PURE__ */ jsx21("span", { className: "flex size-6 items-center justify-center rounded-full bg-sidebar-accent text-[10px] font-semibold", "aria-hidden": "true", children: identity.displayName ? identity.displayName.slice(0, 1).toUpperCase() : /* @__PURE__ */ jsx21(UserRound, { className: "size-3.5" }) });
|
|
1943
1834
|
}
|
|
1944
1835
|
function IdentityControl({ identity }) {
|
|
1945
1836
|
const label = identityLabel(identity);
|
|
1946
1837
|
const canSignOut = identity.state === "authenticated" && Boolean(identity.onSignOut);
|
|
1947
1838
|
const canSignIn = (identity.state === "guest" || identity.state === "signed_out" || identity.state === "error") && Boolean(identity.onSignIn);
|
|
1948
|
-
return /* @__PURE__ */
|
|
1949
|
-
/* @__PURE__ */
|
|
1839
|
+
return /* @__PURE__ */ jsx21(SidebarMenu, { className: "w-full min-w-0", children: /* @__PURE__ */ jsx21(SidebarMenuItem, { className: "w-full min-w-0", children: /* @__PURE__ */ jsxs12(DropdownMenu, { children: [
|
|
1840
|
+
/* @__PURE__ */ jsx21(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs12(
|
|
1950
1841
|
SidebarMenuButton,
|
|
1951
1842
|
{
|
|
1952
1843
|
size: "lg",
|
|
1953
1844
|
"aria-label": `Account: ${label}`,
|
|
1954
1845
|
className: "w-full min-w-0 justify-start",
|
|
1955
1846
|
children: [
|
|
1956
|
-
/* @__PURE__ */
|
|
1957
|
-
/* @__PURE__ */
|
|
1958
|
-
/* @__PURE__ */
|
|
1959
|
-
identity.secondaryText ? /* @__PURE__ */
|
|
1847
|
+
/* @__PURE__ */ jsx21(IdentityAvatar, { identity }),
|
|
1848
|
+
/* @__PURE__ */ jsxs12("span", { className: "min-w-0 flex-1 overflow-hidden text-start", children: [
|
|
1849
|
+
/* @__PURE__ */ jsx21("span", { className: "block truncate text-sm font-medium", children: label }),
|
|
1850
|
+
identity.secondaryText ? /* @__PURE__ */ jsx21("span", { className: "block truncate text-xs text-muted-foreground", children: identity.secondaryText }) : null
|
|
1960
1851
|
] })
|
|
1961
1852
|
]
|
|
1962
1853
|
}
|
|
1963
1854
|
) }),
|
|
1964
|
-
/* @__PURE__ */
|
|
1965
|
-
/* @__PURE__ */
|
|
1966
|
-
/* @__PURE__ */
|
|
1967
|
-
identity.secondaryText ? /* @__PURE__ */
|
|
1855
|
+
/* @__PURE__ */ jsxs12(DropdownMenuContent, { align: "start", side: "top", sideOffset: 8, children: [
|
|
1856
|
+
/* @__PURE__ */ jsxs12(DropdownMenuLabel, { children: [
|
|
1857
|
+
/* @__PURE__ */ jsx21("span", { className: "block truncate", children: label }),
|
|
1858
|
+
identity.secondaryText ? /* @__PURE__ */ jsx21("span", { className: "mt-0.5 block truncate text-xs font-normal text-muted-foreground", children: identity.secondaryText }) : null
|
|
1968
1859
|
] }),
|
|
1969
|
-
canSignIn || canSignOut ? /* @__PURE__ */
|
|
1970
|
-
canSignIn ? /* @__PURE__ */
|
|
1971
|
-
/* @__PURE__ */
|
|
1860
|
+
canSignIn || canSignOut ? /* @__PURE__ */ jsx21(DropdownMenuSeparator, {}) : null,
|
|
1861
|
+
canSignIn ? /* @__PURE__ */ jsxs12(DropdownMenuItem, { onSelect: () => identity.onSignIn?.(), children: [
|
|
1862
|
+
/* @__PURE__ */ jsx21(LogIn, {}),
|
|
1972
1863
|
"Sign in"
|
|
1973
1864
|
] }) : null,
|
|
1974
|
-
canSignOut ? /* @__PURE__ */
|
|
1975
|
-
/* @__PURE__ */
|
|
1865
|
+
canSignOut ? /* @__PURE__ */ jsxs12(DropdownMenuItem, { onSelect: () => identity.onSignOut?.(), children: [
|
|
1866
|
+
/* @__PURE__ */ jsx21(LogOut, {}),
|
|
1976
1867
|
"Sign out"
|
|
1977
1868
|
] }) : null
|
|
1978
1869
|
] })
|
|
@@ -1980,26 +1871,26 @@ function IdentityControl({ identity }) {
|
|
|
1980
1871
|
}
|
|
1981
1872
|
|
|
1982
1873
|
// scaffold/src/components/chat/thread-sidebar.tsx
|
|
1983
|
-
import { jsx as
|
|
1874
|
+
import { jsx as jsx22, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1984
1875
|
function ThreadStatus({ thread }) {
|
|
1985
1876
|
const activity = getThreadActivity(thread);
|
|
1986
1877
|
const waiting = ["paused", "waiting", "interrupted"].includes(activity.status || "");
|
|
1987
1878
|
if (!activity.isSpinning && !waiting) return null;
|
|
1988
1879
|
const label = waiting ? "Waiting" : activity.status === "cancelling" ? "Cancelling" : activity.status === "queued" ? "Queued" : "Running";
|
|
1989
|
-
return /* @__PURE__ */
|
|
1880
|
+
return /* @__PURE__ */ jsx22(
|
|
1990
1881
|
"span",
|
|
1991
1882
|
{
|
|
1992
1883
|
className: "pointer-events-none absolute end-1 top-1/2 flex size-5 -translate-y-1/2 items-center justify-center text-muted-foreground transition-opacity group-hover/menu-item:opacity-0",
|
|
1993
1884
|
role: "status",
|
|
1994
1885
|
"aria-label": label,
|
|
1995
1886
|
title: label,
|
|
1996
|
-
children: waiting ? /* @__PURE__ */
|
|
1887
|
+
children: waiting ? /* @__PURE__ */ jsx22(Pause, { className: "size-3.5 text-amber-600" }) : /* @__PURE__ */ jsx22(LoaderCircle2, { className: "size-3.5 animate-spin" })
|
|
1997
1888
|
}
|
|
1998
1889
|
);
|
|
1999
1890
|
}
|
|
2000
1891
|
function ThreadSidebar({ activeThreadId, hasMore, identity, isLoading, isLoadingMore, onDelete, onLoadMore, onNew, onOpen, threads }) {
|
|
2001
1892
|
const { setOpenMobile } = useSidebar();
|
|
2002
|
-
return /* @__PURE__ */
|
|
1893
|
+
return /* @__PURE__ */ jsxs13(
|
|
2003
1894
|
Sidebar,
|
|
2004
1895
|
{
|
|
2005
1896
|
"aria-label": "Conversations",
|
|
@@ -2007,19 +1898,19 @@ function ThreadSidebar({ activeThreadId, hasMore, identity, isLoading, isLoading
|
|
|
2007
1898
|
"data-agents24-chat-sidebar": "",
|
|
2008
1899
|
role: "navigation",
|
|
2009
1900
|
children: [
|
|
2010
|
-
/* @__PURE__ */
|
|
2011
|
-
/* @__PURE__ */
|
|
2012
|
-
/* @__PURE__ */
|
|
1901
|
+
/* @__PURE__ */ jsxs13(SidebarHeader, { className: "gap-1 p-2", children: [
|
|
1902
|
+
/* @__PURE__ */ jsx22("div", { className: "h-8 shrink-0", "aria-hidden": "true" }),
|
|
1903
|
+
/* @__PURE__ */ jsxs13(Button, { className: "w-full justify-start", variant: "ghost", onClick: () => {
|
|
2013
1904
|
onNew();
|
|
2014
1905
|
setOpenMobile(false);
|
|
2015
1906
|
}, children: [
|
|
2016
|
-
/* @__PURE__ */
|
|
1907
|
+
/* @__PURE__ */ jsx22(SquarePen, {}),
|
|
2017
1908
|
" New chat"
|
|
2018
1909
|
] })
|
|
2019
1910
|
] }),
|
|
2020
|
-
/* @__PURE__ */
|
|
2021
|
-
/* @__PURE__ */
|
|
2022
|
-
/* @__PURE__ */
|
|
1911
|
+
/* @__PURE__ */ jsx22(SidebarContent, { children: /* @__PURE__ */ jsx22(SidebarGroup, { children: /* @__PURE__ */ jsxs13(SidebarGroupContent, { children: [
|
|
1912
|
+
/* @__PURE__ */ jsx22(SidebarMenu, { children: threads.map((thread) => /* @__PURE__ */ jsxs13(SidebarMenuItem, { children: [
|
|
1913
|
+
/* @__PURE__ */ jsx22(
|
|
2023
1914
|
SidebarMenuButton,
|
|
2024
1915
|
{
|
|
2025
1916
|
className: "pr-8 pl-3",
|
|
@@ -2029,11 +1920,11 @@ function ThreadSidebar({ activeThreadId, hasMore, identity, isLoading, isLoading
|
|
|
2029
1920
|
void onOpen(thread.id).catch(() => void 0);
|
|
2030
1921
|
setOpenMobile(false);
|
|
2031
1922
|
},
|
|
2032
|
-
children: /* @__PURE__ */
|
|
1923
|
+
children: /* @__PURE__ */ jsx22("span", { className: "min-w-0 truncate", children: String(thread.title || "New conversation") })
|
|
2033
1924
|
}
|
|
2034
1925
|
),
|
|
2035
|
-
/* @__PURE__ */
|
|
2036
|
-
/* @__PURE__ */
|
|
1926
|
+
/* @__PURE__ */ jsx22(ThreadStatus, { thread }),
|
|
1927
|
+
/* @__PURE__ */ jsx22(
|
|
2037
1928
|
SidebarMenuAction,
|
|
2038
1929
|
{
|
|
2039
1930
|
showOnHover: true,
|
|
@@ -2043,12 +1934,12 @@ function ThreadSidebar({ activeThreadId, hasMore, identity, isLoading, isLoading
|
|
|
2043
1934
|
event.stopPropagation();
|
|
2044
1935
|
if (window.confirm("Delete this conversation?")) void onDelete(thread.id).catch(() => void 0);
|
|
2045
1936
|
},
|
|
2046
|
-
children: /* @__PURE__ */
|
|
1937
|
+
children: /* @__PURE__ */ jsx22(Trash2, {})
|
|
2047
1938
|
}
|
|
2048
1939
|
)
|
|
2049
1940
|
] }, thread.id)) }),
|
|
2050
|
-
!isLoading && threads.length === 0 && /* @__PURE__ */
|
|
2051
|
-
hasMore && /* @__PURE__ */
|
|
1941
|
+
!isLoading && threads.length === 0 && /* @__PURE__ */ jsx22("p", { className: "px-2 py-8 text-center text-xs text-muted-foreground", children: "No conversations" }),
|
|
1942
|
+
hasMore && /* @__PURE__ */ jsxs13(
|
|
2052
1943
|
Button,
|
|
2053
1944
|
{
|
|
2054
1945
|
className: "mt-2 w-full",
|
|
@@ -2057,14 +1948,14 @@ function ThreadSidebar({ activeThreadId, hasMore, identity, isLoading, isLoading
|
|
|
2057
1948
|
variant: "ghost",
|
|
2058
1949
|
onClick: () => void onLoadMore().catch(() => void 0),
|
|
2059
1950
|
children: [
|
|
2060
|
-
isLoadingMore && /* @__PURE__ */
|
|
1951
|
+
isLoadingMore && /* @__PURE__ */ jsx22(LoaderCircle2, { className: "animate-spin" }),
|
|
2061
1952
|
"Load more"
|
|
2062
1953
|
]
|
|
2063
1954
|
}
|
|
2064
1955
|
)
|
|
2065
1956
|
] }) }) }),
|
|
2066
|
-
/* @__PURE__ */
|
|
2067
|
-
/* @__PURE__ */
|
|
1957
|
+
/* @__PURE__ */ jsx22(SidebarFooter, { className: "w-full min-w-0 p-2", children: /* @__PURE__ */ jsx22(IdentityControl, { identity }) }),
|
|
1958
|
+
/* @__PURE__ */ jsx22(SidebarRail, {})
|
|
2068
1959
|
]
|
|
2069
1960
|
}
|
|
2070
1961
|
);
|
|
@@ -2072,7 +1963,7 @@ function ThreadSidebar({ activeThreadId, hasMore, identity, isLoading, isLoading
|
|
|
2072
1963
|
|
|
2073
1964
|
// scaffold/src/components/chat/turn-outline.tsx
|
|
2074
1965
|
import { LatestThreadScroller } from "@agents24/chat-react";
|
|
2075
|
-
import { jsx as
|
|
1966
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
2076
1967
|
function turnsFromMessages(messages) {
|
|
2077
1968
|
return messages.reduce((turns, message) => {
|
|
2078
1969
|
if (message.role === "user") {
|
|
@@ -2091,7 +1982,7 @@ function turnsFromMessages(messages) {
|
|
|
2091
1982
|
}, []);
|
|
2092
1983
|
}
|
|
2093
1984
|
function TurnOutline({ messages }) {
|
|
2094
|
-
return /* @__PURE__ */
|
|
1985
|
+
return /* @__PURE__ */ jsx23(
|
|
2095
1986
|
LatestThreadScroller.Outline,
|
|
2096
1987
|
{
|
|
2097
1988
|
items: turnsFromMessages(messages),
|
|
@@ -2118,7 +2009,7 @@ import {
|
|
|
2118
2009
|
LatestThreadScroller as LatestThreadScroller2,
|
|
2119
2010
|
latestThreadAnchorId
|
|
2120
2011
|
} from "@agents24/chat-react";
|
|
2121
|
-
import { Fragment as Fragment3, jsx as
|
|
2012
|
+
import { Fragment as Fragment3, jsx as jsx24, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2122
2013
|
var LOADING_INPUT_CONTRACT = {
|
|
2123
2014
|
version: "agents24.runtime-inputs.v3",
|
|
2124
2015
|
modalities: {
|
|
@@ -2131,31 +2022,31 @@ var LOADING_INPUT_CONTRACT = {
|
|
|
2131
2022
|
retention: { mode: "thread_lifetime" }
|
|
2132
2023
|
};
|
|
2133
2024
|
function PersistentSidebarTrigger() {
|
|
2134
|
-
return /* @__PURE__ */
|
|
2025
|
+
return /* @__PURE__ */ jsx24("div", { className: "pointer-events-none fixed start-3 top-0 z-[60] flex h-12 items-center", children: /* @__PURE__ */ jsx24(SidebarTrigger, { className: "pointer-events-auto [&_svg]:size-[18px]" }) });
|
|
2135
2026
|
}
|
|
2136
2027
|
function CollapsedHeaderActions({ onNew }) {
|
|
2137
2028
|
const { isMobile, openMobile, state } = useSidebar();
|
|
2138
2029
|
const sidebarVisible = isMobile ? openMobile : state === "expanded";
|
|
2139
2030
|
if (sidebarVisible) return null;
|
|
2140
|
-
return /* @__PURE__ */
|
|
2141
|
-
/* @__PURE__ */
|
|
2142
|
-
/* @__PURE__ */
|
|
2031
|
+
return /* @__PURE__ */ jsxs14(Fragment3, { children: [
|
|
2032
|
+
/* @__PURE__ */ jsx24("div", { className: "h-8 w-17 shrink-0", "aria-hidden": "true" }),
|
|
2033
|
+
/* @__PURE__ */ jsx24("div", { className: "pointer-events-none fixed start-12 top-0 z-[60] flex h-12 items-center", children: /* @__PURE__ */ jsx24(Button, { className: "pointer-events-auto", variant: "ghost", size: "icon-sm", "aria-label": "New chat", onClick: onNew, children: /* @__PURE__ */ jsx24(SquarePen2, {}) }) })
|
|
2143
2034
|
] });
|
|
2144
2035
|
}
|
|
2145
2036
|
function OperationErrorNotice({ runtime }) {
|
|
2146
2037
|
const error = runtime.operationError || runtime.backgroundError;
|
|
2147
2038
|
if (!error) return null;
|
|
2148
|
-
return /* @__PURE__ */
|
|
2149
|
-
/* @__PURE__ */
|
|
2150
|
-
/* @__PURE__ */
|
|
2151
|
-
/* @__PURE__ */
|
|
2039
|
+
return /* @__PURE__ */ jsx24("div", { className: "pointer-events-none absolute inset-x-0 top-3 z-40 flex justify-center px-4", children: /* @__PURE__ */ jsxs14("div", { className: "pointer-events-auto flex max-w-lg items-start gap-2 rounded-lg border border-destructive/20 bg-background px-3 py-2 text-sm shadow-md", role: "alert", children: [
|
|
2040
|
+
/* @__PURE__ */ jsx24(CircleAlert, { className: "mt-0.5 size-4 shrink-0 text-destructive" }),
|
|
2041
|
+
/* @__PURE__ */ jsx24("span", { className: "min-w-0 flex-1 wrap-break-word", children: agentChatRuntimeErrorMessage(error) || "The chat could not complete that action." }),
|
|
2042
|
+
/* @__PURE__ */ jsx24(
|
|
2152
2043
|
Button,
|
|
2153
2044
|
{
|
|
2154
2045
|
"aria-label": "Dismiss error",
|
|
2155
2046
|
onClick: runtime.operationError ? runtime.clearOperationError : runtime.controller.clearBackgroundError,
|
|
2156
2047
|
size: "icon-xs",
|
|
2157
2048
|
variant: "ghost",
|
|
2158
|
-
children: /* @__PURE__ */
|
|
2049
|
+
children: /* @__PURE__ */ jsx24(X, {})
|
|
2159
2050
|
}
|
|
2160
2051
|
)
|
|
2161
2052
|
] }) });
|
|
@@ -2164,7 +2055,8 @@ function ChatShell({
|
|
|
2164
2055
|
components,
|
|
2165
2056
|
identity,
|
|
2166
2057
|
runtime,
|
|
2167
|
-
sidebar
|
|
2058
|
+
sidebar,
|
|
2059
|
+
timelineOptions
|
|
2168
2060
|
}) {
|
|
2169
2061
|
const Composer = components?.Composer || ChatComposer;
|
|
2170
2062
|
const { controller } = runtime;
|
|
@@ -2199,15 +2091,15 @@ function ChatShell({
|
|
|
2199
2091
|
resizeObserver.observe(overlay);
|
|
2200
2092
|
return () => resizeObserver.disconnect();
|
|
2201
2093
|
}, [isEmptyState]);
|
|
2202
|
-
return /* @__PURE__ */
|
|
2094
|
+
return /* @__PURE__ */ jsxs14(
|
|
2203
2095
|
SidebarProvider,
|
|
2204
2096
|
{
|
|
2205
2097
|
className: "h-svh min-h-0 overflow-hidden",
|
|
2206
2098
|
"data-agents24-chat": "",
|
|
2207
2099
|
"data-agents24-chat-layout": "",
|
|
2208
2100
|
children: [
|
|
2209
|
-
/* @__PURE__ */
|
|
2210
|
-
sidebar || /* @__PURE__ */
|
|
2101
|
+
/* @__PURE__ */ jsx24(PersistentSidebarTrigger, {}),
|
|
2102
|
+
sidebar || /* @__PURE__ */ jsx24(
|
|
2211
2103
|
ThreadSidebar,
|
|
2212
2104
|
{
|
|
2213
2105
|
activeThreadId: controller.activeThreadId,
|
|
@@ -2222,58 +2114,58 @@ function ChatShell({
|
|
|
2222
2114
|
onOpen: runtime.openThread
|
|
2223
2115
|
}
|
|
2224
2116
|
),
|
|
2225
|
-
/* @__PURE__ */
|
|
2226
|
-
/* @__PURE__ */
|
|
2117
|
+
/* @__PURE__ */ jsxs14(SidebarInset, { className: "h-svh min-h-0 overflow-hidden bg-background", children: [
|
|
2118
|
+
/* @__PURE__ */ jsxs14(
|
|
2227
2119
|
"header",
|
|
2228
2120
|
{
|
|
2229
2121
|
className: "flex h-12 shrink-0 items-center gap-2 border-b border-border/50 px-3 sm:px-4",
|
|
2230
2122
|
"data-agents24-chat-header": "",
|
|
2231
2123
|
children: [
|
|
2232
|
-
/* @__PURE__ */
|
|
2233
|
-
/* @__PURE__ */
|
|
2234
|
-
/* @__PURE__ */
|
|
2124
|
+
/* @__PURE__ */ jsx24(CollapsedHeaderActions, { onNew: runtime.newThread }),
|
|
2125
|
+
/* @__PURE__ */ jsx24("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsx24("h1", { className: "truncate text-sm font-medium", children: String(activeTitle || "New chat") }) }),
|
|
2126
|
+
/* @__PURE__ */ jsx24(ThemeMenu, {})
|
|
2235
2127
|
]
|
|
2236
2128
|
}
|
|
2237
2129
|
),
|
|
2238
|
-
/* @__PURE__ */
|
|
2130
|
+
/* @__PURE__ */ jsxs14(
|
|
2239
2131
|
"section",
|
|
2240
2132
|
{
|
|
2241
2133
|
"aria-label": "Conversation",
|
|
2242
2134
|
className: "relative flex min-h-0 flex-1 flex-col overflow-hidden",
|
|
2243
2135
|
"data-agents24-chat-transcript": "",
|
|
2244
2136
|
children: [
|
|
2245
|
-
/* @__PURE__ */
|
|
2246
|
-
/* @__PURE__ */
|
|
2247
|
-
/* @__PURE__ */
|
|
2248
|
-
!isEmptyState && /* @__PURE__ */
|
|
2249
|
-
/* @__PURE__ */
|
|
2137
|
+
/* @__PURE__ */ jsx24(OperationErrorNotice, { runtime }),
|
|
2138
|
+
/* @__PURE__ */ jsx24(SubagentTasks, { threadId: controller.activeThreadId }),
|
|
2139
|
+
/* @__PURE__ */ jsxs14(LatestThreadScroller2.Provider, { autoScroll: true, defaultScrollPosition: "last-anchor", scrollPreviousItemPeek: 64, children: [
|
|
2140
|
+
!isEmptyState && /* @__PURE__ */ jsxs14(LatestThreadScroller2.Root, { className: "relative min-h-0 flex-1", children: [
|
|
2141
|
+
/* @__PURE__ */ jsx24(LatestThreadScroller2.Viewport, { preserveScrollOnPrepend: true, children: /* @__PURE__ */ jsxs14(
|
|
2250
2142
|
LatestThreadScroller2.Content,
|
|
2251
2143
|
{
|
|
2252
2144
|
className: "mx-auto w-full max-w-3xl gap-3 px-4 pt-8 pb-0 sm:px-6 sm:pt-12",
|
|
2253
2145
|
style: { paddingBottom: composerOverlayHeight + 72 },
|
|
2254
2146
|
children: [
|
|
2255
|
-
controller.hasOlderTurns && /* @__PURE__ */
|
|
2147
|
+
controller.hasOlderTurns && /* @__PURE__ */ jsxs14(Button, { className: "self-center", variant: "ghost", size: "sm", disabled: controller.isLoadingOlder, onClick: () => {
|
|
2256
2148
|
void controller.loadOlder().catch(() => void 0);
|
|
2257
2149
|
}, children: [
|
|
2258
|
-
controller.isLoadingOlder && /* @__PURE__ */
|
|
2150
|
+
controller.isLoadingOlder && /* @__PURE__ */ jsx24(LoaderCircle3, { className: "animate-spin" }),
|
|
2259
2151
|
" Load earlier messages"
|
|
2260
2152
|
] }),
|
|
2261
|
-
runtime.isBootstrapping && /* @__PURE__ */
|
|
2262
|
-
hasBlockingError && /* @__PURE__ */
|
|
2263
|
-
/* @__PURE__ */
|
|
2264
|
-
/* @__PURE__ */
|
|
2265
|
-
/* @__PURE__ */
|
|
2266
|
-
/* @__PURE__ */
|
|
2153
|
+
runtime.isBootstrapping && /* @__PURE__ */ jsx24("div", { "aria-label": "Loading conversation", className: "flex flex-1 items-center justify-center py-24 text-muted-foreground", role: "status", children: /* @__PURE__ */ jsx24(LoaderCircle3, { className: "size-4 animate-spin" }) }),
|
|
2154
|
+
hasBlockingError && /* @__PURE__ */ jsxs14("div", { className: "flex flex-1 flex-col items-center justify-center gap-3 py-24 text-center", children: [
|
|
2155
|
+
/* @__PURE__ */ jsx24(CircleAlert, { className: "size-5 text-destructive" }),
|
|
2156
|
+
/* @__PURE__ */ jsxs14("div", { children: [
|
|
2157
|
+
/* @__PURE__ */ jsx24("h2", { className: "font-medium", children: "Couldn\u2019t connect" }),
|
|
2158
|
+
/* @__PURE__ */ jsx24("p", { className: "mt-1 max-w-md text-sm text-muted-foreground", children: runtime.errorMessage })
|
|
2267
2159
|
] }),
|
|
2268
|
-
/* @__PURE__ */
|
|
2160
|
+
/* @__PURE__ */ jsx24(Button, { variant: "outline", onClick: () => void runtime.retryBootstrap(), children: "Try again" })
|
|
2269
2161
|
] }),
|
|
2270
|
-
controller.messages.map((message) => /* @__PURE__ */
|
|
2162
|
+
controller.messages.map((message) => /* @__PURE__ */ jsx24(
|
|
2271
2163
|
LatestThreadScroller2.Item,
|
|
2272
2164
|
{
|
|
2273
2165
|
messageId: message.id,
|
|
2274
2166
|
scrollAnchor: isRunning && message.id === latestAnchorId,
|
|
2275
2167
|
className: "overflow-visible [content-visibility:visible]",
|
|
2276
|
-
children: /* @__PURE__ */
|
|
2168
|
+
children: /* @__PURE__ */ jsx24(
|
|
2277
2169
|
ChatMessage,
|
|
2278
2170
|
{
|
|
2279
2171
|
animateCompletion: wasLiveRun(message.runId),
|
|
@@ -2290,7 +2182,8 @@ function ChatShell({
|
|
|
2290
2182
|
onRegenerate: () => controller.regenerate(message),
|
|
2291
2183
|
onSetFeedback: (input) => controller.setFeedback(message, input),
|
|
2292
2184
|
resolveAttachmentContent: runtime.resolveAttachmentContent,
|
|
2293
|
-
Timeline: components?.Timeline
|
|
2185
|
+
Timeline: components?.Timeline,
|
|
2186
|
+
timelineOptions
|
|
2294
2187
|
}
|
|
2295
2188
|
)
|
|
2296
2189
|
},
|
|
@@ -2299,9 +2192,9 @@ function ChatShell({
|
|
|
2299
2192
|
]
|
|
2300
2193
|
}
|
|
2301
2194
|
) }),
|
|
2302
|
-
/* @__PURE__ */
|
|
2195
|
+
/* @__PURE__ */ jsx24(TurnOutline, { messages: controller.messages })
|
|
2303
2196
|
] }),
|
|
2304
|
-
/* @__PURE__ */
|
|
2197
|
+
/* @__PURE__ */ jsxs14(
|
|
2305
2198
|
"div",
|
|
2306
2199
|
{
|
|
2307
2200
|
ref: composerOverlayRef,
|
|
@@ -2310,11 +2203,11 @@ function ChatShell({
|
|
|
2310
2203
|
background: "linear-gradient(to bottom, transparent 0%, color-mix(in oklch, var(--background) 85%, transparent) 45%, var(--background) 65%, var(--background) 100%)"
|
|
2311
2204
|
},
|
|
2312
2205
|
children: [
|
|
2313
|
-
isEmptyState ? /* @__PURE__ */
|
|
2314
|
-
/* @__PURE__ */
|
|
2206
|
+
isEmptyState ? /* @__PURE__ */ jsx24("div", { className: "mx-auto mb-8 w-full max-w-3xl px-4 text-center sm:px-6", children: /* @__PURE__ */ jsx24("h2", { className: "text-3xl font-semibold tracking-tight sm:text-4xl", children: "Ready when you are." }) }) : /* @__PURE__ */ jsx24("div", { className: "pointer-events-auto absolute inset-x-0 top-0 flex -translate-y-full justify-center pb-3", children: /* @__PURE__ */ jsx24(LatestThreadScroller2.Button, { className: "!relative !inset-auto !translate-x-0 rtl:!translate-x-0" }) }),
|
|
2207
|
+
/* @__PURE__ */ jsx24("div", { className: "pointer-events-auto mx-auto w-full max-w-3xl px-4 sm:px-6", children: /* @__PURE__ */ jsx24(
|
|
2315
2208
|
Composer,
|
|
2316
2209
|
{
|
|
2317
|
-
queue: /* @__PURE__ */
|
|
2210
|
+
queue: /* @__PURE__ */ jsx24(
|
|
2318
2211
|
AgentChatQueue,
|
|
2319
2212
|
{
|
|
2320
2213
|
pending: controller.pendingMessages,
|
|
@@ -2326,6 +2219,7 @@ function ChatShell({
|
|
|
2326
2219
|
),
|
|
2327
2220
|
restoredDraft,
|
|
2328
2221
|
inputContract: runtime.inputContract || LOADING_INPUT_CONTRACT,
|
|
2222
|
+
realtimeDictation: runtime.dictation,
|
|
2329
2223
|
contextWindow: runtime.contextWindow,
|
|
2330
2224
|
disabled: runtime.isBootstrapping || runtime.isChangingAgent || isUploading || hasBlockingError,
|
|
2331
2225
|
scopeKey: controller.activeThreadId,
|
|
@@ -2344,10 +2238,12 @@ function ChatShell({
|
|
|
2344
2238
|
modelId: runtime.modelId,
|
|
2345
2239
|
models: runtime.models,
|
|
2346
2240
|
onModelChange: runtime.changeModel,
|
|
2347
|
-
onSubmit: (text, files) => runtime.submit({
|
|
2241
|
+
onSubmit: (text, files, context) => runtime.submit({
|
|
2348
2242
|
text,
|
|
2243
|
+
dictationSessionId: context?.dictationSessionId,
|
|
2349
2244
|
files: files.filter((file) => file.source).map((file) => ({
|
|
2350
2245
|
data: file.source,
|
|
2246
|
+
transcriptPresentation: file.transcriptPresentation,
|
|
2351
2247
|
mediaType: file.mediaType,
|
|
2352
2248
|
name: file.filename
|
|
2353
2249
|
})),
|
|
@@ -2374,29 +2270,34 @@ function ChatShell({
|
|
|
2374
2270
|
var GUEST_CHAT_IDENTITY = { state: "guest" };
|
|
2375
2271
|
|
|
2376
2272
|
// scaffold/src/app.tsx
|
|
2377
|
-
import { jsx as
|
|
2273
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
2378
2274
|
var createBrowserAbortController = () => new AbortController();
|
|
2379
2275
|
var browserVisibility = createBrowserVisibility();
|
|
2380
2276
|
function RuntimeChat({
|
|
2381
2277
|
components,
|
|
2382
2278
|
identity = GUEST_CHAT_IDENTITY,
|
|
2279
|
+
nodeActivityMode,
|
|
2280
|
+
renderUiBlocks,
|
|
2281
|
+
toolLabelMode,
|
|
2282
|
+
toolSlots,
|
|
2283
|
+
toolViewMode,
|
|
2383
2284
|
...props
|
|
2384
2285
|
}) {
|
|
2385
2286
|
const runtime = useAgentChatRuntime({
|
|
2386
2287
|
...props,
|
|
2387
2288
|
mcpRedirectUri: props.mcpRedirectUri || (typeof window === "undefined" ? void 0 : window.location.href)
|
|
2388
2289
|
});
|
|
2389
|
-
return /* @__PURE__ */
|
|
2290
|
+
return /* @__PURE__ */ jsx25(ChatShell, { components, identity, runtime, sidebar: props.sidebar, timelineOptions: { nodeActivityMode, renderUiBlocks, toolLabelMode, toolSlots, toolViewMode } });
|
|
2390
2291
|
}
|
|
2391
2292
|
function App(props) {
|
|
2392
2293
|
const identity = props.identity || GUEST_CHAT_IDENTITY;
|
|
2393
|
-
return /* @__PURE__ */
|
|
2294
|
+
return /* @__PURE__ */ jsx25(Agents24Provider, { client: props.client, createAbortController: createBrowserAbortController, visibility: browserVisibility, children: /* @__PURE__ */ jsx25(RuntimeChat, { ...props }, identity.state) });
|
|
2394
2295
|
}
|
|
2395
2296
|
|
|
2396
2297
|
// scaffold/src/index.tsx
|
|
2397
|
-
import { jsx as
|
|
2298
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
2398
2299
|
function Agents24ChatScaffold({ appearanceController, theme, themeMode, ...props }) {
|
|
2399
|
-
return /* @__PURE__ */
|
|
2300
|
+
return /* @__PURE__ */ jsx26(ThemeProvider, { controller: appearanceController, theme, mode: themeMode, children: /* @__PURE__ */ jsx26(TooltipProvider, { children: /* @__PURE__ */ jsx26(App, { ...props }) }) });
|
|
2400
2301
|
}
|
|
2401
2302
|
export {
|
|
2402
2303
|
ChatComposer as Agents24ChatComposer,
|