reachat 1.0.2 → 1.0.4

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.
@@ -1,6 +1,6 @@
1
1
  (function(global, factory) {
2
- typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react/jsx-runtime"), require("react"), require("reablocks"), require("@radix-ui/react-slot"), require("framer-motion"), require("react-markdown"), require("remark-gfm"), require("react-syntax-highlighter"), require("mdast-util-find-and-replace"), require("remark-youtube"), require("reakeys"), require("react-cool-dimensions"), require("date-fns")) : typeof define === "function" && define.amd ? define(["exports", "react/jsx-runtime", "react", "reablocks", "@radix-ui/react-slot", "framer-motion", "react-markdown", "remark-gfm", "react-syntax-highlighter", "mdast-util-find-and-replace", "remark-youtube", "reakeys", "react-cool-dimensions", "date-fns"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.reablocks = {}, global.jsxRuntime, global.React, global.reablocks, global.reactSlot, global.framerMotion, global.ReactMarkdown, global.remarkGfm, global.reactSyntaxHighlighter, global.mdastUtilFindAndReplace, global.remarkYoutube, global.reakeys, global.useDimensions, global.dateFns));
3
- })(this, function(exports2, jsxRuntime, React, reablocks, reactSlot, framerMotion, ReactMarkdown, remarkGfm, reactSyntaxHighlighter, mdastUtilFindAndReplace, remarkYoutube, reakeys, useDimensions, dateFns) {
2
+ typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react/jsx-runtime"), require("react"), require("reablocks"), require("@radix-ui/react-slot"), require("framer-motion"), require("react-markdown"), require("remark-gfm"), require("react-syntax-highlighter"), require("mdast-util-find-and-replace"), require("remark-youtube"), require("reakeys"), require("date-fns")) : typeof define === "function" && define.amd ? define(["exports", "react/jsx-runtime", "react", "reablocks", "@radix-ui/react-slot", "framer-motion", "react-markdown", "remark-gfm", "react-syntax-highlighter", "mdast-util-find-and-replace", "remark-youtube", "reakeys", "date-fns"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.reablocks = {}, global.jsxRuntime, global.React, global.reablocks, global.reactSlot, global.framerMotion, global.ReactMarkdown, global.remarkGfm, global.reactSyntaxHighlighter, global.mdastUtilFindAndReplace, global.remarkYoutube, global.reakeys, global.dateFns));
3
+ })(this, function(exports2, jsxRuntime, React, reablocks, reactSlot, framerMotion, ReactMarkdown, remarkGfm, reactSyntaxHighlighter, mdastUtilFindAndReplace, remarkYoutube, reakeys, dateFns) {
4
4
  "use strict";
5
5
  function _interopNamespaceDefault(e) {
6
6
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
@@ -19,7 +19,7 @@
19
19
  return Object.freeze(n);
20
20
  }
21
21
  const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
22
- const SvgSend = (props) => /* @__PURE__ */ React__namespace.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1, strokeLinecap: "round", strokeLinejoin: "round", className: "lucide lucide-send-horizontal", ...props }, /* @__PURE__ */ React__namespace.createElement("path", { d: "m3 3 3 9-3 9 19-9Z" }), /* @__PURE__ */ React__namespace.createElement("path", { d: "M6 12h16" }));
22
+ const SvgSend = (props) => /* @__PURE__ */ React__namespace.createElement("svg", { width: 17, height: 17, viewBox: "0 0 17 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React__namespace.createElement("g", { id: "send" }, /* @__PURE__ */ React__namespace.createElement("path", { id: "Vector", d: "M14.6111 2.33327C14.5349 2.3339 14.4598 2.35194 14.3917 2.386L2.39168 8.386C2.31456 8.42456 2.24872 8.4824 2.20055 8.55391C2.15238 8.62543 2.12352 8.70818 2.11677 8.79414C2.11002 8.88009 2.12561 8.96634 2.16203 9.04449C2.19845 9.12264 2.25446 9.19005 2.32462 9.24017L4.52514 10.8124L5.47371 13.6581C5.50257 13.7447 5.55457 13.8217 5.62406 13.8808C5.69355 13.9399 5.7779 13.9789 5.86796 13.9935C5.95802 14.0082 6.05036 13.9979 6.13499 13.9638C6.21962 13.9297 6.2933 13.873 6.34806 13.8001L7.05249 12.8606L10.3207 15.2376C10.3843 15.2839 10.4579 15.3146 10.5355 15.3271C10.6132 15.3396 10.6927 15.3336 10.7676 15.3097C10.8425 15.2857 10.9107 15.2444 10.9667 15.1891C11.0226 15.1338 11.0647 15.0661 11.0896 14.9915L15.0896 2.99147C15.1148 2.91597 15.1216 2.83555 15.1094 2.7569C15.0972 2.67825 15.0665 2.60363 15.0197 2.53926C14.9729 2.47488 14.9114 2.42261 14.8403 2.38678C14.7693 2.35096 14.6907 2.33261 14.6111 2.33327ZM13.2478 5.35345L10.3565 14.0266L7.67293 12.0755L13.2478 5.35345ZM10.684 5.35801L4.934 9.87559L3.58113 8.90879L10.684 5.35801ZM11.2784 6.16205L6.56746 11.843C6.56681 11.8437 6.56616 11.8443 6.56551 11.845L6.56355 11.8476C6.55841 11.8538 6.55342 11.8601 6.54858 11.8665C6.54319 11.8733 6.53798 11.8802 6.53295 11.8873L6.12085 12.4361L5.53426 10.6751L11.2784 6.16205Z", fill: "currentColor" })));
23
23
  const SvgStop = (props) => /* @__PURE__ */ React__namespace.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1, strokeLinecap: "round", strokeLinejoin: "round", className: "lucide lucide-octagon-x", ...props }, /* @__PURE__ */ React__namespace.createElement("path", { d: "m15 9-6 6" }), /* @__PURE__ */ React__namespace.createElement("path", { d: "M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z" }), /* @__PURE__ */ React__namespace.createElement("path", { d: "m9 9 6 6" }));
24
24
  const SvgPaperclip = (props) => /* @__PURE__ */ React__namespace.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1, strokeLinecap: "round", strokeLinejoin: "round", className: "lucide lucide-paperclip", ...props }, /* @__PURE__ */ React__namespace.createElement("path", { d: "m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48" }));
25
25
  const ChatContext = React.createContext({
@@ -71,51 +71,54 @@
71
71
  disabled: isLoading || disabled
72
72
  }
73
73
  ),
74
- (allowedFiles == null ? void 0 : allowedFiles.length) > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
75
- /* @__PURE__ */ jsxRuntime.jsx(
76
- "input",
74
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: reablocks.cn(theme.input.actions.base), children: [
75
+ (allowedFiles == null ? void 0 : allowedFiles.length) > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
76
+ /* @__PURE__ */ jsxRuntime.jsx(
77
+ "input",
78
+ {
79
+ type: "file",
80
+ ref: fileInputRef,
81
+ className: "hidden",
82
+ accept: allowedFiles.join(","),
83
+ onChange: handleFileUpload
84
+ }
85
+ ),
86
+ /* @__PURE__ */ jsxRuntime.jsx(
87
+ reablocks.Button,
88
+ {
89
+ title: "Upload",
90
+ variant: "text",
91
+ disabled: isLoading || disabled,
92
+ className: reablocks.cn(theme.input.upload),
93
+ onClick: () => {
94
+ var _a;
95
+ return (_a = fileInputRef.current) == null ? void 0 : _a.click();
96
+ },
97
+ children: attachIcon
98
+ }
99
+ )
100
+ ] }),
101
+ isLoading && /* @__PURE__ */ jsxRuntime.jsx(
102
+ reablocks.Button,
77
103
  {
78
- type: "file",
79
- ref: fileInputRef,
80
- className: "hidden",
81
- accept: allowedFiles.join(","),
82
- onChange: handleFileUpload
104
+ title: "Stop",
105
+ className: reablocks.cn(theme.input.actions.stop),
106
+ onClick: stopMessage,
107
+ disabled,
108
+ children: stopIcon
83
109
  }
84
110
  ),
85
111
  /* @__PURE__ */ jsxRuntime.jsx(
86
112
  reablocks.Button,
87
113
  {
88
- title: "Upload",
114
+ title: "Send",
115
+ className: reablocks.cn(theme.input.actions.send),
116
+ onClick: handleSendMessage,
89
117
  disabled: isLoading || disabled,
90
- className: reablocks.cn(theme.input.upload),
91
- onClick: () => {
92
- var _a;
93
- return (_a = fileInputRef.current) == null ? void 0 : _a.click();
94
- },
95
- children: attachIcon
118
+ children: sendIcon
96
119
  }
97
120
  )
98
- ] }),
99
- isLoading && /* @__PURE__ */ jsxRuntime.jsx(
100
- reablocks.Button,
101
- {
102
- title: "Stop",
103
- className: reablocks.cn(theme.input.stop),
104
- onClick: stopMessage,
105
- disabled,
106
- children: stopIcon
107
- }
108
- ),
109
- /* @__PURE__ */ jsxRuntime.jsx(
110
- reablocks.Button,
111
- {
112
- title: "Send",
113
- className: reablocks.cn(theme.input.send),
114
- onClick: handleSendMessage,
115
- disabled: isLoading || disabled,
116
- children: sendIcon
117
- }
118
- )
121
+ ] })
119
122
  ] });
120
123
  };
121
124
  const SessionEmpty = ({
@@ -1467,29 +1470,32 @@ ${response}`),
1467
1470
  children
1468
1471
  }) => {
1469
1472
  const { theme, isLoading } = React.useContext(ChatContext);
1470
- return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.motion.div, { variants: messageVariants, children: /* @__PURE__ */ jsxRuntime.jsx(reablocks.Card, { className: reablocks.cn(theme.messages.message.base), children: children || /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1471
- /* @__PURE__ */ jsxRuntime.jsx(MessageFiles, { files: conversation.files }),
1472
- /* @__PURE__ */ jsxRuntime.jsx(MessageQuestion, { question: conversation.question }),
1473
- /* @__PURE__ */ jsxRuntime.jsx(
1474
- MessageResponse,
1475
- {
1476
- response: conversation.response,
1477
- isLoading: isLast && isLoading
1478
- }
1479
- ),
1480
- /* @__PURE__ */ jsxRuntime.jsx(MessageSources, { sources: conversation.sources }),
1481
- /* @__PURE__ */ jsxRuntime.jsx(
1482
- MessageActions,
1483
- {
1484
- question: conversation.question,
1485
- response: conversation.response,
1486
- copyIcon: /* @__PURE__ */ jsxRuntime.jsx(SvgCopy, {}),
1487
- thumbsUpIcon: /* @__PURE__ */ jsxRuntime.jsx(SvgThumbsUp, {}),
1488
- thumbsDownIcon: /* @__PURE__ */ jsxRuntime.jsx(SvgThumbsDown, {}),
1489
- refreshIcon: /* @__PURE__ */ jsxRuntime.jsx(SvgRefresh, {})
1490
- }
1491
- )
1492
- ] }) }) }, conversation.id);
1473
+ return /* @__PURE__ */ jsxRuntime.jsxs(framerMotion.motion.div, { variants: messageVariants, children: [
1474
+ /* @__PURE__ */ jsxRuntime.jsx(reablocks.Card, { className: reablocks.cn(theme.messages.message.base), children: children || /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1475
+ /* @__PURE__ */ jsxRuntime.jsx(MessageFiles, { files: conversation.files }),
1476
+ /* @__PURE__ */ jsxRuntime.jsx(MessageQuestion, { question: conversation.question }),
1477
+ /* @__PURE__ */ jsxRuntime.jsx(
1478
+ MessageResponse,
1479
+ {
1480
+ response: conversation.response,
1481
+ isLoading: isLast && isLoading
1482
+ }
1483
+ ),
1484
+ /* @__PURE__ */ jsxRuntime.jsx(MessageSources, { sources: conversation.sources }),
1485
+ /* @__PURE__ */ jsxRuntime.jsx(
1486
+ MessageActions,
1487
+ {
1488
+ question: conversation.question,
1489
+ response: conversation.response,
1490
+ copyIcon: /* @__PURE__ */ jsxRuntime.jsx(SvgCopy, {}),
1491
+ thumbsUpIcon: /* @__PURE__ */ jsxRuntime.jsx(SvgThumbsUp, {}),
1492
+ thumbsDownIcon: /* @__PURE__ */ jsxRuntime.jsx(SvgThumbsDown, {}),
1493
+ refreshIcon: /* @__PURE__ */ jsxRuntime.jsx(SvgRefresh, {})
1494
+ }
1495
+ )
1496
+ ] }) }),
1497
+ !isLast && /* @__PURE__ */ jsxRuntime.jsx(reablocks.Divider, {})
1498
+ ] }, conversation.id);
1493
1499
  };
1494
1500
  const containerVariants = {
1495
1501
  hidden: {},
@@ -1566,13 +1572,13 @@ ${response}`),
1566
1572
  empty: "text-center flex-1",
1567
1573
  sessions: {
1568
1574
  base: "overflow-auto",
1569
- console: "min-w-[150px] w-[30%] max-w-[300px] bg-[#11111F] p-5 rounded",
1575
+ console: "min-w-[150px] w-[30%] max-w-[300px] bg-[#11111F] p-5 rounded-3xl",
1570
1576
  companion: "w-full h-full",
1571
- group: "text-xs text-gray-400 mt-4",
1572
- create: "mb-4",
1577
+ group: "text-xs text-gray-400 mt-4 hover:bg-transparent mb-1",
1578
+ create: "relative mb-4 rounded-[10px]",
1573
1579
  session: {
1574
- base: "",
1575
- active: " text-primary",
1580
+ base: "my-1 rounded-[10px] p-2 text-typography hover:bg-gray-800/50 border border-transparent hover:border-gray-700/50",
1581
+ active: "bg-gray-800/70 border border-gray-700/70 hover:bg-gray-800/50 border-gray-700/50 text-white",
1576
1582
  delete: "[&>svg]:w-4 [&>svg]:h-4 opacity-50"
1577
1583
  }
1578
1584
  },
@@ -1588,8 +1594,8 @@ ${response}`),
1588
1594
  header: "flex justify-between items-start gap-2",
1589
1595
  showMore: "mb-4",
1590
1596
  message: {
1591
- base: "mb-6 flex flex-col p-5 rounded",
1592
- question: "font-semibold text-gray-400 mb-1",
1597
+ base: "mt-4 mb-4 flex flex-col p-0 rounded border-none",
1598
+ question: "font-semibold text-gray-400 mb-4 px-4 py-3 pb-1 rounded-3xl rounded-br-none text-typography bg-gray-900/60 border border-gray-700/50",
1593
1599
  response: "",
1594
1600
  cursor: "inline-block w-1 h-4 bg-current",
1595
1601
  files: {
@@ -1621,22 +1627,45 @@ ${response}`),
1621
1627
  ol: "mb-4 list-decimal"
1622
1628
  },
1623
1629
  footer: {
1624
- base: "mt-3 flex gap-3",
1625
- copy: "[&>svg]:w-4 [&>svg]:h-4 opacity-50",
1626
- upvote: "[&>svg]:w-4 [&>svg]:h-4 opacity-50",
1627
- downvote: "[&>svg]:w-4 [&>svg]:h-4 opacity-50",
1628
- refresh: "[&>svg]:w-4 [&>svg]:h-4 opacity-50"
1630
+ base: "mt-3 flex gap-1.5",
1631
+ copy: "p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:!opacity-100 hover:bg-gray-700/40 hover:text-white",
1632
+ upvote: "p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:!opacity-100 hover:bg-gray-700/40 hover:text-white",
1633
+ downvote: "p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:!opacity-100 hover:bg-gray-700/40 hover:text-white",
1634
+ refresh: "p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:!opacity-100 hover:bg-gray-700/40 hover:text-white"
1629
1635
  }
1630
1636
  }
1631
1637
  },
1632
1638
  input: {
1633
- base: "flex mt-4",
1634
- upload: "px-4 py-2 text-white",
1635
- input: "w-full",
1636
- send: "px-4 py-2 text-white",
1637
- stop: "px-4 py-2 bg-red-500 text-white rounded hover:bg-red-700"
1639
+ base: "flex mt-4 relative",
1640
+ upload: "px-5 py-2 text-white size-10",
1641
+ input: "w-full text-typography border border-gray-700/70 rounded-3xl px-3 py-2 pr-16 after:!mx-10 [&>textarea]:w-full",
1642
+ actions: {
1643
+ base: "absolute flex gap-2 items-center right-5 top-[50%] -translate-y-1/2 z-10",
1644
+ send: "px-3 py-3 text-white bg-gray-800 hover:bg-primary-hover rounded-full ",
1645
+ stop: "px-2 py-2 bg-red-500 text-white rounded-full hover:bg-red-700 "
1646
+ }
1638
1647
  }
1639
1648
  };
1649
+ const useDimensions = () => {
1650
+ const [ref, setRef] = React.useState(null);
1651
+ const [width, setWidth] = React.useState(void 0);
1652
+ const observe = React.useCallback((element) => {
1653
+ if (element) setRef(element);
1654
+ }, []);
1655
+ React.useEffect(() => {
1656
+ if (!ref) return;
1657
+ const resizeObserver = new ResizeObserver((entries) => {
1658
+ for (let entry of entries) {
1659
+ setWidth(entry.contentRect.width);
1660
+ }
1661
+ });
1662
+ resizeObserver.observe(ref);
1663
+ return () => {
1664
+ resizeObserver.disconnect();
1665
+ };
1666
+ }, [ref]);
1667
+ return { width, observe };
1668
+ };
1640
1669
  const Chat = ({
1641
1670
  children,
1642
1671
  viewType = "console",
@@ -1768,12 +1797,14 @@ ${response}`),
1768
1797
  );
1769
1798
  };
1770
1799
  const SvgTrash = (props) => /* @__PURE__ */ React__namespace.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1, strokeLinecap: "round", strokeLinejoin: "round", className: "lucide lucide-trash-2", ...props }, /* @__PURE__ */ React__namespace.createElement("path", { d: "M3 6h18" }), /* @__PURE__ */ React__namespace.createElement("path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" }), /* @__PURE__ */ React__namespace.createElement("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" }), /* @__PURE__ */ React__namespace.createElement("line", { x1: 10, x2: 10, y1: 11, y2: 17 }), /* @__PURE__ */ React__namespace.createElement("line", { x1: 14, x2: 14, y1: 11, y2: 17 }));
1800
+ const SvgChat = (props) => /* @__PURE__ */ React__namespace.createElement("svg", { width: 16, height: 17, viewBox: "0 0 16 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React__namespace.createElement("path", { d: "M8 3C4.55375 3 1.75 5.23753 1.75 7.98828C1.75 9.70653 2.83659 11.2762 4.62109 12.188C4.11184 13.0465 3.62587 13.7378 3.62012 13.7461C3.50687 13.9071 3.49862 14.1196 3.59912 14.2891C3.69012 14.4418 3.8543 14.5342 4.0293 14.5342C4.0483 14.5342 4.06743 14.533 4.08643 14.5308C4.15168 14.5233 5.66214 14.3364 7.50439 12.9604C7.67239 12.9712 7.8385 12.9766 8 12.9766C11.4462 12.9766 14.25 10.739 14.25 7.98828C14.25 5.23753 11.4462 3 8 3ZM8 4C10.8948 4 13.25 5.78903 13.25 7.98828C13.25 10.1875 10.8948 11.9766 8 11.9766C7.8055 11.9766 7.60225 11.968 7.396 11.9497C7.271 11.9382 7.1454 11.9752 7.0459 12.0527C6.3589 12.5855 5.72033 12.9308 5.20508 13.1528C5.38383 12.8648 5.57691 12.5418 5.76416 12.2061C5.83416 12.0813 5.84705 11.9324 5.7998 11.7974C5.75255 11.6624 5.64983 11.5542 5.51758 11.5C3.81033 10.7993 2.75 9.45328 2.75 7.98828C2.75 5.78903 5.10525 4 8 4ZM5.5 7.25C5.08575 7.25 4.75 7.58575 4.75 8C4.75 8.41425 5.08575 8.75 5.5 8.75C5.91425 8.75 6.25 8.41425 6.25 8C6.25 7.58575 5.91425 7.25 5.5 7.25ZM8 7.25C7.58575 7.25 7.25 7.58575 7.25 8C7.25 8.41425 7.58575 8.75 8 8.75C8.41425 8.75 8.75 8.41425 8.75 8C8.75 7.58575 8.41425 7.25 8 7.25ZM10.5 7.25C10.0857 7.25 9.75 7.58575 9.75 8C9.75 8.41425 10.0857 8.75 10.5 8.75C10.9143 8.75 11.25 8.41425 11.25 8C11.25 7.58575 10.9143 7.25 10.5 7.25Z", fill: "currentColor" }));
1771
1801
  const SessionListItem = ({
1772
1802
  children,
1773
1803
  session,
1774
1804
  deletable = true,
1775
1805
  limit = 100,
1776
- deleteIcon = /* @__PURE__ */ jsxRuntime.jsx(SvgTrash, {})
1806
+ deleteIcon = /* @__PURE__ */ jsxRuntime.jsx(SvgTrash, {}),
1807
+ chatIcon = /* @__PURE__ */ jsxRuntime.jsx(SvgChat, { className: "mr-2" })
1777
1808
  }) => {
1778
1809
  const { activeSessionId, selectSession, deleteSession, theme } = React.useContext(ChatContext);
1779
1810
  const Comp = children ? reactSlot.Slot : reablocks.ListItem;
@@ -1787,6 +1818,7 @@ ${response}`),
1787
1818
  [theme.sessions.session.active]: session.id === activeSessionId
1788
1819
  }),
1789
1820
  onClick: () => selectSession == null ? void 0 : selectSession(session.id),
1821
+ start: chatIcon,
1790
1822
  end: /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: deletable && /* @__PURE__ */ jsxRuntime.jsx(
1791
1823
  reablocks.IconButton,
1792
1824
  {
@@ -1804,24 +1836,26 @@ ${response}`),
1804
1836
  }
1805
1837
  );
1806
1838
  };
1839
+ const SvgPlus = (props) => /* @__PURE__ */ React__namespace.createElement("svg", { width: 17, height: 17, viewBox: "0 0 17 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React__namespace.createElement("g", { id: "add" }, /* @__PURE__ */ React__namespace.createElement("path", { id: "Vector", d: "M13.1667 9.16658H9.16671V13.1666H7.83337V9.16658H3.83337V7.83325H7.83337V3.83325H9.16671V7.83325H13.1667V9.16658Z", fill: "currentColor" })));
1807
1840
  const NewSessionButton = ({
1808
1841
  children,
1809
1842
  newSessionText = "New Session"
1810
1843
  }) => {
1811
1844
  const { theme, createSession, disabled } = React.useContext(ChatContext);
1812
1845
  const Comp = children ? reactSlot.Slot : reablocks.Button;
1813
- return /* @__PURE__ */ jsxRuntime.jsx(
1846
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
1814
1847
  Comp,
1815
1848
  {
1816
1849
  fullWidth: true,
1817
1850
  disableMargins: true,
1818
1851
  color: "primary",
1852
+ startAdornment: /* @__PURE__ */ jsxRuntime.jsx(SvgPlus, {}),
1819
1853
  className: reablocks.cn(theme.sessions.create),
1820
1854
  disabled,
1821
1855
  onClick: createSession,
1822
1856
  children: children || newSessionText
1823
1857
  }
1824
- );
1858
+ ) });
1825
1859
  };
1826
1860
  const sortOrder = [
1827
1861
  "Today",