@wealthx/shadcn 1.5.39 → 1.5.41
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/.turbo/turbo-build.log +118 -118
- package/CHANGELOG.md +12 -0
- package/dist/{chunk-MGIDYXOP.mjs → chunk-DWNLBUDC.mjs} +459 -67
- package/dist/{chunk-EFHPSKVF.mjs → chunk-EGM4DARZ.mjs} +110 -1
- package/dist/{chunk-R7M657QL.mjs → chunk-GIQGZFP6.mjs} +138 -46
- package/dist/{chunk-B5PSUONN.mjs → chunk-TF5TOVIM.mjs} +1 -1
- package/dist/{chunk-RRROLESJ.mjs → chunk-XHZONBL4.mjs} +1 -1
- package/dist/components/ui/ai-assistant-drawer.js +101 -0
- package/dist/components/ui/ai-assistant-drawer.mjs +2 -2
- package/dist/components/ui/ai-conversations/index.js +101 -0
- package/dist/components/ui/ai-conversations/index.mjs +2 -2
- package/dist/components/ui/chat-input-area.js +101 -0
- package/dist/components/ui/chat-input-area.mjs +1 -1
- package/dist/components/ui/policy-ai/index.js +818 -261
- package/dist/components/ui/policy-ai/index.mjs +11 -2
- package/dist/components/ui/support-agent/index.js +233 -45
- package/dist/components/ui/support-agent/index.mjs +2 -2
- package/dist/index.js +3521 -3330
- package/dist/index.mjs +5 -5
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/ui/chat-input-area.tsx +181 -2
- package/src/components/ui/policy-ai/index.tsx +12 -0
- package/src/components/ui/policy-ai/policy-ai-context-sidebar.tsx +231 -0
- package/src/components/ui/policy-ai/policy-ai-history-panel.tsx +175 -0
- package/src/components/ui/policy-ai/policy-ai-page.tsx +243 -0
- package/src/components/ui/policy-ai/policy-ai-panel.tsx +64 -57
- package/src/components/ui/policy-ai/policy-ai-responses.tsx +8 -12
- package/src/components/ui/support-agent/support-agent-panel.tsx +170 -48
- package/src/styles/styles-css.ts +1 -1
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
+
PolicyAIContextSidebar,
|
|
2
3
|
PolicyAIFAB,
|
|
4
|
+
PolicyAIHistoryPanel,
|
|
5
|
+
PolicyAIPage,
|
|
3
6
|
PolicyAIPanel,
|
|
4
7
|
PolicyCitationPanel,
|
|
5
8
|
PolicyComparisonTable,
|
|
@@ -7,13 +10,16 @@ import {
|
|
|
7
10
|
PolicyRankedList,
|
|
8
11
|
PolicySingleBankAnswer,
|
|
9
12
|
PolicyVerdictBadge
|
|
10
|
-
} from "../../../chunk-
|
|
13
|
+
} from "../../../chunk-DWNLBUDC.mjs";
|
|
14
|
+
import "../../../chunk-MZI77ZMX.mjs";
|
|
11
15
|
import "../../../chunk-FL7DEYUA.mjs";
|
|
12
16
|
import "../../../chunk-FQYFPHDO.mjs";
|
|
13
17
|
import "../../../chunk-3S6KVFF5.mjs";
|
|
18
|
+
import "../../../chunk-3VDET466.mjs";
|
|
14
19
|
import "../../../chunk-WE4YKBDE.mjs";
|
|
15
20
|
import "../../../chunk-H6NQTIF4.mjs";
|
|
16
|
-
import "../../../chunk-
|
|
21
|
+
import "../../../chunk-2GIYVERS.mjs";
|
|
22
|
+
import "../../../chunk-EGM4DARZ.mjs";
|
|
17
23
|
import "../../../chunk-BS75ICOO.mjs";
|
|
18
24
|
import "../../../chunk-X6RC5UWB.mjs";
|
|
19
25
|
import "../../../chunk-F3CU6KEI.mjs";
|
|
@@ -25,7 +31,10 @@ import "../../../chunk-R4HCRDU5.mjs";
|
|
|
25
31
|
import "../../../chunk-AFML43VJ.mjs";
|
|
26
32
|
import "../../../chunk-WNQUEZJF.mjs";
|
|
27
33
|
export {
|
|
34
|
+
PolicyAIContextSidebar,
|
|
28
35
|
PolicyAIFAB,
|
|
36
|
+
PolicyAIHistoryPanel,
|
|
37
|
+
PolicyAIPage,
|
|
29
38
|
PolicyAIPanel,
|
|
30
39
|
PolicyCitationPanel,
|
|
31
40
|
PolicyComparisonTable,
|
|
@@ -508,6 +508,9 @@ function SupportAgentFAB({
|
|
|
508
508
|
|
|
509
509
|
// src/components/ui/support-agent/support-agent-panel.tsx
|
|
510
510
|
var React5 = __toESM(require("react"));
|
|
511
|
+
var import_react_markdown = __toESM(require("react-markdown"));
|
|
512
|
+
var import_rehype_raw = __toESM(require("rehype-raw"));
|
|
513
|
+
var import_rehype_sanitize = __toESM(require("rehype-sanitize"));
|
|
511
514
|
var import_lucide_react7 = require("lucide-react");
|
|
512
515
|
|
|
513
516
|
// src/components/ui/sheet.tsx
|
|
@@ -604,6 +607,7 @@ function SheetContent(_a) {
|
|
|
604
607
|
|
|
605
608
|
// src/components/ui/chat-input-area.tsx
|
|
606
609
|
var React4 = __toESM(require("react"));
|
|
610
|
+
var import_react_dom = require("react-dom");
|
|
607
611
|
var import_lucide_react5 = require("lucide-react");
|
|
608
612
|
|
|
609
613
|
// src/components/ui/textarea.tsx
|
|
@@ -626,6 +630,97 @@ function Textarea(_a) {
|
|
|
626
630
|
// src/components/ui/chat-input-area.tsx
|
|
627
631
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
628
632
|
var DEFAULT_HINT = "Enter to send \xB7 Shift+Enter for new line";
|
|
633
|
+
var TOOLBAR_ITEMS = [
|
|
634
|
+
{
|
|
635
|
+
type: "button",
|
|
636
|
+
icon: import_lucide_react5.Bold,
|
|
637
|
+
label: "Bold",
|
|
638
|
+
title: "Bold (Ctrl+B)",
|
|
639
|
+
before: "**",
|
|
640
|
+
after: "**",
|
|
641
|
+
placeholder: "bold text"
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
type: "button",
|
|
645
|
+
icon: import_lucide_react5.Italic,
|
|
646
|
+
label: "Italic",
|
|
647
|
+
title: "Italic (Ctrl+I)",
|
|
648
|
+
before: "*",
|
|
649
|
+
after: "*",
|
|
650
|
+
placeholder: "italic text"
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
type: "button",
|
|
654
|
+
icon: import_lucide_react5.Code,
|
|
655
|
+
label: "Inline code",
|
|
656
|
+
title: "Inline code",
|
|
657
|
+
before: "`",
|
|
658
|
+
after: "`",
|
|
659
|
+
placeholder: "code"
|
|
660
|
+
},
|
|
661
|
+
{ type: "divider" },
|
|
662
|
+
{
|
|
663
|
+
type: "button",
|
|
664
|
+
icon: import_lucide_react5.Code2,
|
|
665
|
+
label: "Code block",
|
|
666
|
+
title: "Code block",
|
|
667
|
+
before: "```\n",
|
|
668
|
+
after: "\n```",
|
|
669
|
+
placeholder: "code block"
|
|
670
|
+
}
|
|
671
|
+
];
|
|
672
|
+
function applyMarkdown(textarea, before, after, placeholder, onChange) {
|
|
673
|
+
const start = textarea.selectionStart;
|
|
674
|
+
const end = textarea.selectionEnd;
|
|
675
|
+
const selected = textarea.value.slice(start, end);
|
|
676
|
+
const insertion = selected || placeholder;
|
|
677
|
+
const next = textarea.value.slice(0, start) + before + insertion + after + textarea.value.slice(end);
|
|
678
|
+
const newStart = start + before.length;
|
|
679
|
+
const newEnd = newStart + insertion.length;
|
|
680
|
+
(0, import_react_dom.flushSync)(() => onChange(next));
|
|
681
|
+
textarea.focus();
|
|
682
|
+
textarea.setSelectionRange(newStart, newEnd);
|
|
683
|
+
}
|
|
684
|
+
var MarkdownToolbar = React4.memo(function MarkdownToolbar2({
|
|
685
|
+
textareaRef,
|
|
686
|
+
onChange,
|
|
687
|
+
disabled
|
|
688
|
+
}) {
|
|
689
|
+
const handleFormat = React4.useCallback(
|
|
690
|
+
(e) => {
|
|
691
|
+
if (!textareaRef.current) return;
|
|
692
|
+
const { before, after, placeholder } = e.currentTarget.dataset;
|
|
693
|
+
applyMarkdown(textareaRef.current, before, after, placeholder, onChange);
|
|
694
|
+
},
|
|
695
|
+
[textareaRef, onChange]
|
|
696
|
+
);
|
|
697
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex items-center gap-0.5 border-b border-border px-2 py-1", children: TOOLBAR_ITEMS.map(
|
|
698
|
+
(item, i) => item.type === "divider" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
699
|
+
"span",
|
|
700
|
+
{
|
|
701
|
+
className: "mx-0.5 h-3.5 w-px bg-border",
|
|
702
|
+
"aria-hidden": "true"
|
|
703
|
+
},
|
|
704
|
+
i
|
|
705
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
706
|
+
Button,
|
|
707
|
+
{
|
|
708
|
+
variant: "ghost",
|
|
709
|
+
size: "icon-sm",
|
|
710
|
+
type: "button",
|
|
711
|
+
title: item.title,
|
|
712
|
+
"aria-label": item.label,
|
|
713
|
+
disabled,
|
|
714
|
+
"data-before": item.before,
|
|
715
|
+
"data-after": item.after,
|
|
716
|
+
"data-placeholder": item.placeholder,
|
|
717
|
+
onClick: handleFormat,
|
|
718
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(item.icon, { className: "size-3.5", "aria-hidden": "true" })
|
|
719
|
+
},
|
|
720
|
+
item.label
|
|
721
|
+
)
|
|
722
|
+
) });
|
|
723
|
+
});
|
|
629
724
|
function ChatInputArea({
|
|
630
725
|
value,
|
|
631
726
|
onChange,
|
|
@@ -637,6 +732,7 @@ function ChatInputArea({
|
|
|
637
732
|
hint = DEFAULT_HINT,
|
|
638
733
|
maxHeight = 160,
|
|
639
734
|
autoFocus = false,
|
|
735
|
+
showMarkdownToolbar = false,
|
|
640
736
|
className
|
|
641
737
|
}) {
|
|
642
738
|
const textareaRef = React4.useRef(null);
|
|
@@ -705,6 +801,14 @@ function ChatInputArea({
|
|
|
705
801
|
className: cn("flex flex-col gap-1.5", className),
|
|
706
802
|
children: [
|
|
707
803
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "border border-border bg-background flex flex-col focus-within:ring-1 focus-within:ring-ring", children: [
|
|
804
|
+
showMarkdownToolbar && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
805
|
+
MarkdownToolbar,
|
|
806
|
+
{
|
|
807
|
+
textareaRef,
|
|
808
|
+
onChange,
|
|
809
|
+
disabled
|
|
810
|
+
}
|
|
811
|
+
),
|
|
708
812
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
709
813
|
Textarea,
|
|
710
814
|
{
|
|
@@ -850,6 +954,21 @@ function SupportTypingIndicator() {
|
|
|
850
954
|
}
|
|
851
955
|
);
|
|
852
956
|
}
|
|
957
|
+
function StreamingStatus({ label }) {
|
|
958
|
+
if (!label) return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SupportTypingIndicator, {});
|
|
959
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
960
|
+
"span",
|
|
961
|
+
{
|
|
962
|
+
className: "flex items-center gap-1.5 text-sm text-muted-foreground",
|
|
963
|
+
role: "status",
|
|
964
|
+
"aria-label": `${label}\u2026`,
|
|
965
|
+
children: [
|
|
966
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: label }),
|
|
967
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SupportTypingIndicator, {})
|
|
968
|
+
]
|
|
969
|
+
}
|
|
970
|
+
);
|
|
971
|
+
}
|
|
853
972
|
function MessageBubble({ message }) {
|
|
854
973
|
const isUser = message.role === "user";
|
|
855
974
|
const isEmpty = !message.content.trim();
|
|
@@ -872,7 +991,19 @@ function MessageBubble({ message }) {
|
|
|
872
991
|
"data-slot": "support-message-bubble",
|
|
873
992
|
"data-role": message.role,
|
|
874
993
|
children: [
|
|
875
|
-
isEmpty && message.isStreaming ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
994
|
+
isEmpty && message.isStreaming ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(StreamingStatus, { label: message.streamingLabel }) : isUser ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "whitespace-pre-wrap break-words leading-relaxed", children: message.content }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "break-words text-sm leading-relaxed [&_a]:text-primary [&_a]:underline [&_p]:m-0 [&_p:not(:last-child)]:mb-2 [&_ul]:my-1 [&_ul]:list-disc [&_ul]:pl-4 [&_ol]:my-1 [&_ol]:list-decimal [&_ol]:pl-4 [&_li]:mb-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
995
|
+
import_react_markdown.default,
|
|
996
|
+
{
|
|
997
|
+
rehypePlugins: [import_rehype_raw.default, [import_rehype_sanitize.default, import_rehype_sanitize.defaultSchema]],
|
|
998
|
+
components: {
|
|
999
|
+
a: (_a) => {
|
|
1000
|
+
var _b = _a, { node } = _b, props = __objRest(_b, ["node"]);
|
|
1001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("a", __spreadProps(__spreadValues({}, props), { target: "_blank", rel: "noopener noreferrer" }));
|
|
1002
|
+
}
|
|
1003
|
+
},
|
|
1004
|
+
children: message.content
|
|
1005
|
+
}
|
|
1006
|
+
) }),
|
|
876
1007
|
message.isErrored && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "mt-1 text-xs opacity-70", children: "Failed to send. Please try again." })
|
|
877
1008
|
]
|
|
878
1009
|
}
|
|
@@ -905,6 +1036,49 @@ function RichContentRenderer({ richContent }) {
|
|
|
905
1036
|
}
|
|
906
1037
|
return null;
|
|
907
1038
|
}
|
|
1039
|
+
function CloseButton({ onClick }) {
|
|
1040
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
1041
|
+
Button,
|
|
1042
|
+
{
|
|
1043
|
+
variant: "ghost",
|
|
1044
|
+
size: "icon",
|
|
1045
|
+
className: "size-7 shrink-0",
|
|
1046
|
+
onClick,
|
|
1047
|
+
title: "Close",
|
|
1048
|
+
children: [
|
|
1049
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react7.X, { className: "size-3.5" }),
|
|
1050
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "sr-only", children: "Close" })
|
|
1051
|
+
]
|
|
1052
|
+
}
|
|
1053
|
+
);
|
|
1054
|
+
}
|
|
1055
|
+
function ConversationRow({
|
|
1056
|
+
conv,
|
|
1057
|
+
onClick,
|
|
1058
|
+
className
|
|
1059
|
+
}) {
|
|
1060
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
1061
|
+
"button",
|
|
1062
|
+
{
|
|
1063
|
+
type: "button",
|
|
1064
|
+
onClick,
|
|
1065
|
+
className: cn(
|
|
1066
|
+
"flex w-full items-center justify-between gap-2 text-left text-sm text-foreground hover:bg-muted/50",
|
|
1067
|
+
className
|
|
1068
|
+
),
|
|
1069
|
+
children: [
|
|
1070
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "flex-1 truncate", children: conv.title }),
|
|
1071
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1072
|
+
import_lucide_react7.ChevronRight,
|
|
1073
|
+
{
|
|
1074
|
+
className: "size-3.5 shrink-0 text-muted-foreground",
|
|
1075
|
+
"aria-hidden": "true"
|
|
1076
|
+
}
|
|
1077
|
+
)
|
|
1078
|
+
]
|
|
1079
|
+
}
|
|
1080
|
+
);
|
|
1081
|
+
}
|
|
908
1082
|
function SupportAgentPanel({
|
|
909
1083
|
open,
|
|
910
1084
|
onClose,
|
|
@@ -926,9 +1100,13 @@ function SupportAgentPanel({
|
|
|
926
1100
|
}) {
|
|
927
1101
|
var _a;
|
|
928
1102
|
const [inputValue, setInputValue] = React5.useState("");
|
|
1103
|
+
const [showAllConversations, setShowAllConversations] = React5.useState(false);
|
|
929
1104
|
const messagesEndRef = React5.useRef(null);
|
|
930
1105
|
const hasMessages = messages.length > 0;
|
|
931
1106
|
const isChatMode = hasMessages && !!conversationTitle;
|
|
1107
|
+
React5.useEffect(() => {
|
|
1108
|
+
if (!open) setShowAllConversations(false);
|
|
1109
|
+
}, [open]);
|
|
932
1110
|
React5.useEffect(() => {
|
|
933
1111
|
if (!messagesEndRef.current) return;
|
|
934
1112
|
messagesEndRef.current.scrollIntoView({
|
|
@@ -950,6 +1128,17 @@ function SupportAgentPanel({
|
|
|
950
1128
|
[onSendMessage]
|
|
951
1129
|
);
|
|
952
1130
|
const hasRecents = !!(recentConversations == null ? void 0 : recentConversations.length);
|
|
1131
|
+
const recentsPreview = React5.useMemo(
|
|
1132
|
+
() => {
|
|
1133
|
+
var _a2;
|
|
1134
|
+
return (_a2 = recentConversations == null ? void 0 : recentConversations.slice(0, 3)) != null ? _a2 : [];
|
|
1135
|
+
},
|
|
1136
|
+
[recentConversations]
|
|
1137
|
+
);
|
|
1138
|
+
const handleViewAll = React5.useCallback(() => {
|
|
1139
|
+
setShowAllConversations(true);
|
|
1140
|
+
onViewAllConversations == null ? void 0 : onViewAllConversations();
|
|
1141
|
+
}, [onViewAllConversations]);
|
|
953
1142
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Sheet, { open, onOpenChange: (o) => !o && onClose(), children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
954
1143
|
SheetContent,
|
|
955
1144
|
{
|
|
@@ -962,38 +1151,45 @@ function SupportAgentPanel({
|
|
|
962
1151
|
"data-slot": "support-agent-panel",
|
|
963
1152
|
children: [
|
|
964
1153
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "shrink-0 border-b border-border px-3 py-2.5", children: [
|
|
965
|
-
|
|
966
|
-
/*
|
|
1154
|
+
showAllConversations ? (
|
|
1155
|
+
/* All-conversations mode: [←] All conversations [✕] */
|
|
967
1156
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
968
|
-
|
|
1157
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
969
1158
|
Button,
|
|
970
1159
|
{
|
|
971
1160
|
variant: "ghost",
|
|
972
1161
|
size: "icon",
|
|
973
1162
|
className: "size-7 shrink-0",
|
|
974
|
-
onClick:
|
|
975
|
-
title: "Back
|
|
1163
|
+
onClick: () => setShowAllConversations(false),
|
|
1164
|
+
title: "Back",
|
|
976
1165
|
children: [
|
|
977
1166
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react7.ChevronLeft, { className: "size-3.5" }),
|
|
978
1167
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "sr-only", children: "Back" })
|
|
979
1168
|
]
|
|
980
1169
|
}
|
|
981
1170
|
),
|
|
982
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "flex-1 truncate px-1 text-sm font-medium text-foreground", children:
|
|
983
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.
|
|
1171
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "flex-1 truncate px-1 text-sm font-medium text-foreground", children: "All conversations" }),
|
|
1172
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(CloseButton, { onClick: onClose })
|
|
1173
|
+
] })
|
|
1174
|
+
) : isChatMode ? (
|
|
1175
|
+
/* Chat mode: [←] Conversation title [✕] */
|
|
1176
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
1177
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
984
1178
|
Button,
|
|
985
1179
|
{
|
|
986
1180
|
variant: "ghost",
|
|
987
1181
|
size: "icon",
|
|
988
1182
|
className: "size-7 shrink-0",
|
|
989
|
-
onClick:
|
|
990
|
-
title: "
|
|
1183
|
+
onClick: onBack,
|
|
1184
|
+
title: "Back to conversations",
|
|
991
1185
|
children: [
|
|
992
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react7.
|
|
993
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "sr-only", children: "
|
|
1186
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react7.ChevronLeft, { className: "size-3.5" }),
|
|
1187
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "sr-only", children: "Back" })
|
|
994
1188
|
]
|
|
995
1189
|
}
|
|
996
|
-
)
|
|
1190
|
+
),
|
|
1191
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "flex-1 truncate px-1 text-sm font-medium text-foreground", children: conversationTitle }),
|
|
1192
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(CloseButton, { onClick: onClose })
|
|
997
1193
|
] })
|
|
998
1194
|
) : (
|
|
999
1195
|
/* Home mode: [Bot icon] Support Assistant [✕] */
|
|
@@ -1008,23 +1204,10 @@ function SupportAgentPanel({
|
|
|
1008
1204
|
) }),
|
|
1009
1205
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-sm font-semibold text-foreground", children: "Support Assistant" })
|
|
1010
1206
|
] }),
|
|
1011
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.
|
|
1012
|
-
Button,
|
|
1013
|
-
{
|
|
1014
|
-
variant: "ghost",
|
|
1015
|
-
size: "icon",
|
|
1016
|
-
className: "size-7",
|
|
1017
|
-
onClick: onClose,
|
|
1018
|
-
title: "Close",
|
|
1019
|
-
children: [
|
|
1020
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react7.X, { className: "size-3.5" }),
|
|
1021
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "sr-only", children: "Close" })
|
|
1022
|
-
]
|
|
1023
|
-
}
|
|
1024
|
-
)
|
|
1207
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(CloseButton, { onClick: onClose })
|
|
1025
1208
|
] })
|
|
1026
1209
|
),
|
|
1027
|
-
context && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "mt-2", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SupportContextChip, { context }) })
|
|
1210
|
+
context && !showAllConversations && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "mt-2", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SupportContextChip, { context }) })
|
|
1028
1211
|
] }),
|
|
1029
1212
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex flex-1 flex-col overflow-y-auto", children: isLoading ? (
|
|
1030
1213
|
/* Loading state */
|
|
@@ -1032,6 +1215,20 @@ function SupportAgentPanel({
|
|
|
1032
1215
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Spinner, { size: "lg", className: "text-muted-foreground" }),
|
|
1033
1216
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-sm text-muted-foreground", children: "Loading\u2026" })
|
|
1034
1217
|
] }) })
|
|
1218
|
+
) : showAllConversations ? (
|
|
1219
|
+
/* All conversations — full scrollable list (Jira Rovo pattern) */
|
|
1220
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex flex-col", children: (recentConversations == null ? void 0 : recentConversations.length) ? recentConversations.map((conv) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1221
|
+
ConversationRow,
|
|
1222
|
+
{
|
|
1223
|
+
conv,
|
|
1224
|
+
onClick: () => {
|
|
1225
|
+
setShowAllConversations(false);
|
|
1226
|
+
onOpenConversation == null ? void 0 : onOpenConversation(conv.id);
|
|
1227
|
+
},
|
|
1228
|
+
className: "border-b border-border px-4 py-3"
|
|
1229
|
+
},
|
|
1230
|
+
conv.id
|
|
1231
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "p-4 text-sm text-muted-foreground", children: "No conversations yet." }) })
|
|
1035
1232
|
) : !hasMessages ? (
|
|
1036
1233
|
/* Home state — Rovo pattern: New Chat CTA + Recents + Suggested */
|
|
1037
1234
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col gap-5 p-4", children: [
|
|
@@ -1050,31 +1247,21 @@ function SupportAgentPanel({
|
|
|
1050
1247
|
),
|
|
1051
1248
|
hasRecents && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
1052
1249
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "px-1 text-xs font-medium uppercase tracking-wide text-muted-foreground", children: "Recents" }),
|
|
1053
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex flex-col", children:
|
|
1054
|
-
|
|
1250
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex flex-col", children: recentsPreview.map((conv) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1251
|
+
ConversationRow,
|
|
1055
1252
|
{
|
|
1056
|
-
|
|
1253
|
+
conv,
|
|
1057
1254
|
onClick: () => onOpenConversation == null ? void 0 : onOpenConversation(conv.id),
|
|
1058
|
-
className: "
|
|
1059
|
-
children: [
|
|
1060
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "flex-1 truncate", children: conv.title }),
|
|
1061
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1062
|
-
import_lucide_react7.ChevronRight,
|
|
1063
|
-
{
|
|
1064
|
-
className: "size-3.5 shrink-0 text-muted-foreground",
|
|
1065
|
-
"aria-hidden": "true"
|
|
1066
|
-
}
|
|
1067
|
-
)
|
|
1068
|
-
]
|
|
1255
|
+
className: "px-1 py-2.5"
|
|
1069
1256
|
},
|
|
1070
1257
|
conv.id
|
|
1071
1258
|
)) }),
|
|
1072
|
-
|
|
1259
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
1073
1260
|
Button,
|
|
1074
1261
|
{
|
|
1075
1262
|
variant: "ghost",
|
|
1076
1263
|
size: "sm",
|
|
1077
|
-
onClick:
|
|
1264
|
+
onClick: handleViewAll,
|
|
1078
1265
|
className: "h-auto w-fit gap-0.5 px-1 py-1 text-xs text-muted-foreground hover:bg-transparent hover:text-foreground",
|
|
1079
1266
|
children: [
|
|
1080
1267
|
"View all conversations",
|
|
@@ -1113,7 +1300,8 @@ function SupportAgentPanel({
|
|
|
1113
1300
|
onAttachFile,
|
|
1114
1301
|
onAttachImage,
|
|
1115
1302
|
disabled: isLoading || isStreaming,
|
|
1116
|
-
placeholder: "Ask anything\u2026"
|
|
1303
|
+
placeholder: "Ask anything\u2026",
|
|
1304
|
+
showMarkdownToolbar: true
|
|
1117
1305
|
}
|
|
1118
1306
|
) })
|
|
1119
1307
|
]
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
SupportContextChip,
|
|
6
6
|
SupportStepGuideCard,
|
|
7
7
|
SupportSuggestedQuestion
|
|
8
|
-
} from "../../../chunk-
|
|
8
|
+
} from "../../../chunk-GIQGZFP6.mjs";
|
|
9
9
|
import "../../../chunk-GTAVSBDO.mjs";
|
|
10
|
-
import "../../../chunk-
|
|
10
|
+
import "../../../chunk-EGM4DARZ.mjs";
|
|
11
11
|
import "../../../chunk-H3PTREG6.mjs";
|
|
12
12
|
import "../../../chunk-BS75ICOO.mjs";
|
|
13
13
|
import "../../../chunk-JVMXMFBB.mjs";
|