@wealthx/shadcn 1.5.40 → 1.5.42
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 +103 -103
- 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-B5PSUONN.mjs → chunk-TF5TOVIM.mjs} +1 -1
- package/dist/{chunk-STN5QIWN.mjs → chunk-THOHFAW2.mjs} +119 -46
- 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 +218 -44
- package/dist/components/ui/support-agent/index.mjs +2 -2
- package/dist/index.js +3506 -3329
- 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 +153 -46
- 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,
|
|
@@ -607,6 +607,7 @@ function SheetContent(_a) {
|
|
|
607
607
|
|
|
608
608
|
// src/components/ui/chat-input-area.tsx
|
|
609
609
|
var React4 = __toESM(require("react"));
|
|
610
|
+
var import_react_dom = require("react-dom");
|
|
610
611
|
var import_lucide_react5 = require("lucide-react");
|
|
611
612
|
|
|
612
613
|
// src/components/ui/textarea.tsx
|
|
@@ -629,6 +630,97 @@ function Textarea(_a) {
|
|
|
629
630
|
// src/components/ui/chat-input-area.tsx
|
|
630
631
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
631
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
|
+
});
|
|
632
724
|
function ChatInputArea({
|
|
633
725
|
value,
|
|
634
726
|
onChange,
|
|
@@ -640,6 +732,7 @@ function ChatInputArea({
|
|
|
640
732
|
hint = DEFAULT_HINT,
|
|
641
733
|
maxHeight = 160,
|
|
642
734
|
autoFocus = false,
|
|
735
|
+
showMarkdownToolbar = false,
|
|
643
736
|
className
|
|
644
737
|
}) {
|
|
645
738
|
const textareaRef = React4.useRef(null);
|
|
@@ -708,6 +801,14 @@ function ChatInputArea({
|
|
|
708
801
|
className: cn("flex flex-col gap-1.5", className),
|
|
709
802
|
children: [
|
|
710
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
|
+
),
|
|
711
812
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
712
813
|
Textarea,
|
|
713
814
|
{
|
|
@@ -935,6 +1036,49 @@ function RichContentRenderer({ richContent }) {
|
|
|
935
1036
|
}
|
|
936
1037
|
return null;
|
|
937
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
|
+
}
|
|
938
1082
|
function SupportAgentPanel({
|
|
939
1083
|
open,
|
|
940
1084
|
onClose,
|
|
@@ -952,13 +1096,20 @@ function SupportAgentPanel({
|
|
|
952
1096
|
onBack,
|
|
953
1097
|
onOpenConversation,
|
|
954
1098
|
onViewAllConversations,
|
|
1099
|
+
hasMoreConversations = false,
|
|
1100
|
+
onLoadMoreConversations,
|
|
1101
|
+
isLoadingMoreConversations = false,
|
|
955
1102
|
className
|
|
956
1103
|
}) {
|
|
957
1104
|
var _a;
|
|
958
1105
|
const [inputValue, setInputValue] = React5.useState("");
|
|
1106
|
+
const [showAllConversations, setShowAllConversations] = React5.useState(false);
|
|
959
1107
|
const messagesEndRef = React5.useRef(null);
|
|
960
1108
|
const hasMessages = messages.length > 0;
|
|
961
1109
|
const isChatMode = hasMessages && !!conversationTitle;
|
|
1110
|
+
React5.useEffect(() => {
|
|
1111
|
+
if (!open) setShowAllConversations(false);
|
|
1112
|
+
}, [open]);
|
|
962
1113
|
React5.useEffect(() => {
|
|
963
1114
|
if (!messagesEndRef.current) return;
|
|
964
1115
|
messagesEndRef.current.scrollIntoView({
|
|
@@ -980,6 +1131,17 @@ function SupportAgentPanel({
|
|
|
980
1131
|
[onSendMessage]
|
|
981
1132
|
);
|
|
982
1133
|
const hasRecents = !!(recentConversations == null ? void 0 : recentConversations.length);
|
|
1134
|
+
const recentsPreview = React5.useMemo(
|
|
1135
|
+
() => {
|
|
1136
|
+
var _a2;
|
|
1137
|
+
return (_a2 = recentConversations == null ? void 0 : recentConversations.slice(0, 3)) != null ? _a2 : [];
|
|
1138
|
+
},
|
|
1139
|
+
[recentConversations]
|
|
1140
|
+
);
|
|
1141
|
+
const handleViewAll = React5.useCallback(() => {
|
|
1142
|
+
setShowAllConversations(true);
|
|
1143
|
+
onViewAllConversations == null ? void 0 : onViewAllConversations();
|
|
1144
|
+
}, [onViewAllConversations]);
|
|
983
1145
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Sheet, { open, onOpenChange: (o) => !o && onClose(), children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
984
1146
|
SheetContent,
|
|
985
1147
|
{
|
|
@@ -992,38 +1154,45 @@ function SupportAgentPanel({
|
|
|
992
1154
|
"data-slot": "support-agent-panel",
|
|
993
1155
|
children: [
|
|
994
1156
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "shrink-0 border-b border-border px-3 py-2.5", children: [
|
|
995
|
-
|
|
996
|
-
/*
|
|
1157
|
+
showAllConversations ? (
|
|
1158
|
+
/* All-conversations mode: [←] All conversations [✕] */
|
|
997
1159
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
998
|
-
|
|
1160
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
999
1161
|
Button,
|
|
1000
1162
|
{
|
|
1001
1163
|
variant: "ghost",
|
|
1002
1164
|
size: "icon",
|
|
1003
1165
|
className: "size-7 shrink-0",
|
|
1004
|
-
onClick:
|
|
1005
|
-
title: "Back
|
|
1166
|
+
onClick: () => setShowAllConversations(false),
|
|
1167
|
+
title: "Back",
|
|
1006
1168
|
children: [
|
|
1007
1169
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react7.ChevronLeft, { className: "size-3.5" }),
|
|
1008
1170
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "sr-only", children: "Back" })
|
|
1009
1171
|
]
|
|
1010
1172
|
}
|
|
1011
1173
|
),
|
|
1012
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "flex-1 truncate px-1 text-sm font-medium text-foreground", children:
|
|
1013
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.
|
|
1174
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "flex-1 truncate px-1 text-sm font-medium text-foreground", children: "All conversations" }),
|
|
1175
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(CloseButton, { onClick: onClose })
|
|
1176
|
+
] })
|
|
1177
|
+
) : isChatMode ? (
|
|
1178
|
+
/* Chat mode: [←] Conversation title [✕] */
|
|
1179
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
1180
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
1014
1181
|
Button,
|
|
1015
1182
|
{
|
|
1016
1183
|
variant: "ghost",
|
|
1017
1184
|
size: "icon",
|
|
1018
1185
|
className: "size-7 shrink-0",
|
|
1019
|
-
onClick:
|
|
1020
|
-
title: "
|
|
1186
|
+
onClick: onBack,
|
|
1187
|
+
title: "Back to conversations",
|
|
1021
1188
|
children: [
|
|
1022
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react7.
|
|
1023
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "sr-only", children: "
|
|
1189
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react7.ChevronLeft, { className: "size-3.5" }),
|
|
1190
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "sr-only", children: "Back" })
|
|
1024
1191
|
]
|
|
1025
1192
|
}
|
|
1026
|
-
)
|
|
1193
|
+
),
|
|
1194
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "flex-1 truncate px-1 text-sm font-medium text-foreground", children: conversationTitle }),
|
|
1195
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(CloseButton, { onClick: onClose })
|
|
1027
1196
|
] })
|
|
1028
1197
|
) : (
|
|
1029
1198
|
/* Home mode: [Bot icon] Support Assistant [✕] */
|
|
@@ -1038,23 +1207,10 @@ function SupportAgentPanel({
|
|
|
1038
1207
|
) }),
|
|
1039
1208
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-sm font-semibold text-foreground", children: "Support Assistant" })
|
|
1040
1209
|
] }),
|
|
1041
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.
|
|
1042
|
-
Button,
|
|
1043
|
-
{
|
|
1044
|
-
variant: "ghost",
|
|
1045
|
-
size: "icon",
|
|
1046
|
-
className: "size-7",
|
|
1047
|
-
onClick: onClose,
|
|
1048
|
-
title: "Close",
|
|
1049
|
-
children: [
|
|
1050
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react7.X, { className: "size-3.5" }),
|
|
1051
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "sr-only", children: "Close" })
|
|
1052
|
-
]
|
|
1053
|
-
}
|
|
1054
|
-
)
|
|
1210
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(CloseButton, { onClick: onClose })
|
|
1055
1211
|
] })
|
|
1056
1212
|
),
|
|
1057
|
-
context && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "mt-2", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SupportContextChip, { context }) })
|
|
1213
|
+
context && !showAllConversations && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "mt-2", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SupportContextChip, { context }) })
|
|
1058
1214
|
] }),
|
|
1059
1215
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex flex-1 flex-col overflow-y-auto", children: isLoading ? (
|
|
1060
1216
|
/* Loading state */
|
|
@@ -1062,6 +1218,33 @@ function SupportAgentPanel({
|
|
|
1062
1218
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Spinner, { size: "lg", className: "text-muted-foreground" }),
|
|
1063
1219
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-sm text-muted-foreground", children: "Loading\u2026" })
|
|
1064
1220
|
] }) })
|
|
1221
|
+
) : showAllConversations ? (
|
|
1222
|
+
/* All conversations — full scrollable list (Jira Rovo pattern) */
|
|
1223
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex flex-col", children: (recentConversations == null ? void 0 : recentConversations.length) ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
1224
|
+
recentConversations.map((conv) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1225
|
+
ConversationRow,
|
|
1226
|
+
{
|
|
1227
|
+
conv,
|
|
1228
|
+
onClick: () => {
|
|
1229
|
+
setShowAllConversations(false);
|
|
1230
|
+
onOpenConversation == null ? void 0 : onOpenConversation(conv.id);
|
|
1231
|
+
},
|
|
1232
|
+
className: "border-b border-border px-4 py-3"
|
|
1233
|
+
},
|
|
1234
|
+
conv.id
|
|
1235
|
+
)),
|
|
1236
|
+
hasMoreConversations && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "border-t border-border p-3", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1237
|
+
Button,
|
|
1238
|
+
{
|
|
1239
|
+
variant: "outline",
|
|
1240
|
+
size: "sm",
|
|
1241
|
+
className: "w-full",
|
|
1242
|
+
disabled: isLoadingMoreConversations,
|
|
1243
|
+
onClick: onLoadMoreConversations,
|
|
1244
|
+
children: isLoadingMoreConversations ? "Loading..." : "Load more"
|
|
1245
|
+
}
|
|
1246
|
+
) })
|
|
1247
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "p-4 text-sm text-muted-foreground", children: "No conversations yet." }) })
|
|
1065
1248
|
) : !hasMessages ? (
|
|
1066
1249
|
/* Home state — Rovo pattern: New Chat CTA + Recents + Suggested */
|
|
1067
1250
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col gap-5 p-4", children: [
|
|
@@ -1080,31 +1263,21 @@ function SupportAgentPanel({
|
|
|
1080
1263
|
),
|
|
1081
1264
|
hasRecents && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
1082
1265
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "px-1 text-xs font-medium uppercase tracking-wide text-muted-foreground", children: "Recents" }),
|
|
1083
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex flex-col", children:
|
|
1084
|
-
|
|
1266
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex flex-col", children: recentsPreview.map((conv) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1267
|
+
ConversationRow,
|
|
1085
1268
|
{
|
|
1086
|
-
|
|
1269
|
+
conv,
|
|
1087
1270
|
onClick: () => onOpenConversation == null ? void 0 : onOpenConversation(conv.id),
|
|
1088
|
-
className: "
|
|
1089
|
-
children: [
|
|
1090
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "flex-1 truncate", children: conv.title }),
|
|
1091
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1092
|
-
import_lucide_react7.ChevronRight,
|
|
1093
|
-
{
|
|
1094
|
-
className: "size-3.5 shrink-0 text-muted-foreground",
|
|
1095
|
-
"aria-hidden": "true"
|
|
1096
|
-
}
|
|
1097
|
-
)
|
|
1098
|
-
]
|
|
1271
|
+
className: "px-1 py-2.5"
|
|
1099
1272
|
},
|
|
1100
1273
|
conv.id
|
|
1101
1274
|
)) }),
|
|
1102
|
-
|
|
1275
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
1103
1276
|
Button,
|
|
1104
1277
|
{
|
|
1105
1278
|
variant: "ghost",
|
|
1106
1279
|
size: "sm",
|
|
1107
|
-
onClick:
|
|
1280
|
+
onClick: handleViewAll,
|
|
1108
1281
|
className: "h-auto w-fit gap-0.5 px-1 py-1 text-xs text-muted-foreground hover:bg-transparent hover:text-foreground",
|
|
1109
1282
|
children: [
|
|
1110
1283
|
"View all conversations",
|
|
@@ -1143,7 +1316,8 @@ function SupportAgentPanel({
|
|
|
1143
1316
|
onAttachFile,
|
|
1144
1317
|
onAttachImage,
|
|
1145
1318
|
disabled: isLoading || isStreaming,
|
|
1146
|
-
placeholder: "Ask anything\u2026"
|
|
1319
|
+
placeholder: "Ask anything\u2026",
|
|
1320
|
+
showMarkdownToolbar: true
|
|
1147
1321
|
}
|
|
1148
1322
|
) })
|
|
1149
1323
|
]
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
SupportContextChip,
|
|
6
6
|
SupportStepGuideCard,
|
|
7
7
|
SupportSuggestedQuestion
|
|
8
|
-
} from "../../../chunk-
|
|
8
|
+
} from "../../../chunk-THOHFAW2.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";
|