@bikdotai/bik-component-library 0.0.870-beta.1 → 0.0.871
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/bik-copilot/CopilotPanel.js +1 -1
- package/dist/cjs/components/bik-copilot/CopilotPanel.js.map +1 -1
- package/dist/cjs/components/bik-copilot/useCopilotStreamChat.js +1 -1
- package/dist/cjs/components/bik-copilot/useCopilotStreamChat.js.map +1 -1
- package/dist/cjs/components/button/Button.js +1 -1
- package/dist/cjs/components/button/Button.js.map +1 -1
- package/dist/cjs/components/button/Button.styled.js +2 -2
- package/dist/cjs/components/button/Button.styled.js.map +1 -1
- package/dist/cjs/components/dropdown-button/DropdownButton.js +1 -1
- package/dist/cjs/components/dropdown-button/DropdownButton.js.map +1 -1
- package/dist/cjs/components/tag/Tag.js +1 -1
- package/dist/cjs/components/tag/Tag.js.map +1 -1
- package/dist/cjs/components/tag/Tag.styled.js +4 -4
- package/dist/cjs/components/tag/Tag.styled.js.map +1 -1
- package/dist/cjs/components/tag/model.js.map +1 -1
- package/dist/cjs/icons/BIK AI specific/WandSparkles.js +1 -1
- package/dist/cjs/icons/BIK AI specific/WandSparkles.js.map +1 -1
- package/dist/esm/components/ProgressChecklist/ProgressChecklist.style.d.ts +59 -24
- package/dist/esm/components/QueryBuilder/components/Connectors/Connector.styled.d.ts +4 -1
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.styled.d.ts +4 -1
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNodeUIWrapper.styled.d.ts +10 -3
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNodes.styled.d.ts +7 -2
- package/dist/esm/components/TablePagination/TablePagination.styled.d.ts +8 -3
- package/dist/esm/components/TablePagination/TablePaginationCard.d.ts +4 -2
- package/dist/esm/components/TypographyStyle.d.ts +141 -62
- package/dist/esm/components/WhatsAppTextEditor/AIRephrase.styled.d.ts +5 -2
- package/dist/esm/components/WhatsAppTextEditor/CustomEditor.styled.d.ts +20 -7
- package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditorHeader.d.ts +3 -1
- package/dist/esm/components/access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.styles.d.ts +26 -9
- package/dist/esm/components/accordion/Accordion.style.d.ts +10 -4
- package/dist/esm/components/action-button/ActionButton.styled.d.ts +5 -2
- package/dist/esm/components/adbanner/Banner.styled.d.ts +88 -20
- package/dist/esm/components/add-variableV2/AddVariableBox.styled.d.ts +4 -1
- package/dist/esm/components/add-variableV2/AddVariableV2.styled.d.ts +9 -4
- package/dist/esm/components/agent-builder/AgentBuilder.styled.d.ts +328 -186
- package/dist/esm/components/agent-listing/AgentListing.styled.d.ts +88 -49
- package/dist/esm/components/alerts/Alert.styled.d.ts +11 -5
- package/dist/esm/components/analytics-card/AnalyticsCard.styled.d.ts +8 -4
- package/dist/esm/components/analytics-chips-and-dropdowns/CommonStyles.d.ts +27 -18
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/ComparisonBarChart/ComparisonBarChart.styled.d.ts +26 -11
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/FunnelChart/FunnelChart.styled.d.ts +26 -11
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.styles.d.ts +5 -2
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.styled.d.ts +12 -5
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.styles.d.ts +8 -3
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.styles.d.ts +17 -6
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.styles.d.ts +5 -2
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapStyled.d.ts +28 -11
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.d.ts +3 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.styled.d.ts +18 -7
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/scoreBlock/ScoreBlock.styled.d.ts +18 -7
- package/dist/esm/components/avatar/Avatar.styled.d.ts +4 -2
- package/dist/esm/components/bik-chatbot/components/ChatWindow.d.ts +4 -2
- package/dist/esm/components/bik-copilot/ControlledCopilot.styled.d.ts +5 -2
- package/dist/esm/components/bik-copilot/CopilotBall.styled.d.ts +5 -2
- package/dist/esm/components/bik-copilot/CopilotFeedbackModal.styled.d.ts +32 -11
- package/dist/esm/components/bik-copilot/CopilotPanel.js +235 -244
- package/dist/esm/components/bik-copilot/CopilotPanel.js.map +1 -1
- package/dist/esm/components/bik-copilot/CopilotPanel.styled.d.ts +120 -43
- package/dist/esm/components/bik-copilot/model.d.ts +4 -2
- package/dist/esm/components/bik-copilot/useCopilotStreamChat.d.ts +0 -18
- package/dist/esm/components/bik-copilot/useCopilotStreamChat.js +168 -163
- package/dist/esm/components/bik-copilot/useCopilotStreamChat.js.map +1 -1
- package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2Styles.d.ts +49 -18
- package/dist/esm/components/bik-layout/CommonStyles.d.ts +88 -28
- package/dist/esm/components/bik-layout/SidebarStyles.d.ts +17 -7
- package/dist/esm/components/button/Button.js +19 -21
- package/dist/esm/components/button/Button.js.map +1 -1
- package/dist/esm/components/button/Button.styled.d.ts +4 -3
- package/dist/esm/components/button/Button.styled.js +5 -5
- package/dist/esm/components/button/Button.styled.js.map +1 -1
- package/dist/esm/components/button/model.d.ts +0 -5
- package/dist/esm/components/button/themes.d.ts +16 -2
- package/dist/esm/components/buttonGroup/ButtonGroupStyle.d.ts +9 -4
- package/dist/esm/components/card-selection-modal/CardSelectionModal.styled.d.ts +7 -2
- package/dist/esm/components/card-selector/CardSelector.styled.d.ts +8 -3
- package/dist/esm/components/carousel-preview/CarouselPreview.style.d.ts +9 -4
- package/dist/esm/components/carousel-secondary/CarouselSecondary.style.d.ts +23 -11
- package/dist/esm/components/channel-playground/shell/TestingPlayground.style.d.ts +74 -18
- package/dist/esm/components/checkBox/CheckBox.styled.d.ts +9 -4
- package/dist/esm/components/checkList/CheckList.styled.d.ts +4 -1
- package/dist/esm/components/code-block/CodeBlock.styled.d.ts +43 -20
- package/dist/esm/components/colourInput/ColourInput.styled.d.ts +7 -2
- package/dist/esm/components/connected-app-dialog/ConnectedAppDialog.styled.d.ts +49 -16
- package/dist/esm/components/country-code-picker/CountryCodePicker.styled.d.ts +8 -3
- package/dist/esm/components/country-code-picker/CountryPicker.styled.d.ts +8 -3
- package/dist/esm/components/curtain/Curtain.styled.d.ts +11 -5
- package/dist/esm/components/custom-date-time/CustomDateTime.styled.d.ts +4 -1
- package/dist/esm/components/dashboard-review-popup/DashboardReviewPopUp.styled.d.ts +7 -2
- package/dist/esm/components/dashboard-review-popup/components/FiveStar.styled.d.ts +7 -2
- package/dist/esm/components/dashboard-review-popup/components/Form.styled.d.ts +20 -7
- package/dist/esm/components/data-source-panel/DataSourcePanel.style.d.ts +13 -4
- package/dist/esm/components/datePicker/DatePicker.styled.d.ts +22 -15
- package/dist/esm/components/datePicker/DatePickerWrapper.styled.d.ts +8 -4
- package/dist/esm/components/discount-modal/DiscountModal.styled.d.ts +17 -6
- package/dist/esm/components/discount-modal/DynamicCoupon/DynamicCoupon.styled.d.ts +23 -8
- package/dist/esm/components/dropdown/ChipDropdown.d.ts +4 -2
- package/dist/esm/components/dropdown/Common.styled.d.ts +15 -6
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.d.ts +12 -5
- package/dist/esm/components/dropdown/OpenedDropdown/components/description/Description.styled.d.ts +5 -2
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.d.ts +4 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.styled.d.ts +18 -4
- package/dist/esm/components/dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.d.ts +4 -1
- package/dist/esm/components/dropdown-button/DropdownButton.d.ts +0 -5
- package/dist/esm/components/dropdown-button/DropdownButton.js +3 -4
- package/dist/esm/components/dropdown-button/DropdownButton.js.map +1 -1
- package/dist/esm/components/dropdown-button/DropdownButton.style.d.ts +9 -5
- package/dist/esm/components/dual-icon-button/DualIconButton.styled.d.ts +12 -5
- package/dist/esm/components/file-uploader/FileUploaderStyle.d.ts +9 -4
- package/dist/esm/components/floating-action-button/FloatingActionButton.styles.d.ts +24 -13
- package/dist/esm/components/half-doughnut-chart/HalfDoughnutChart.styled.d.ts +29 -10
- package/dist/esm/components/icon-button/IconButton.styled.d.ts +4 -2
- package/dist/esm/components/input/Input.styled.d.ts +114 -29
- package/dist/esm/components/keywords-input/KeywordsInput.styled.d.ts +4 -1
- package/dist/esm/components/list-item/ListItem.styled.d.ts +4 -2
- package/dist/esm/components/list-item/themes.d.ts +1 -1
- package/dist/esm/components/modals/modal.styled.d.ts +16 -7
- package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.styled.d.ts +60 -22
- package/dist/esm/components/navigation-hyperlink/NavigationHyperlink.d.ts +3 -1
- package/dist/esm/components/pagination/Pagination.styled.d.ts +4 -1
- package/dist/esm/components/plans/DurationSelectorStyles.d.ts +4 -1
- package/dist/esm/components/plans/SubscriptionPlanSelector.d.ts +6 -2
- package/dist/esm/components/plans/SubscriptionPlanStyled.d.ts +9 -4
- package/dist/esm/components/postPicker/PostPicker.styled.d.ts +43 -13
- package/dist/esm/components/product-picker/ProductPicker.styled.d.ts +7 -2
- package/dist/esm/components/product-picker-v2/style.d.ts +82 -25
- package/dist/esm/components/progress-bar/ProgressBarComponent.d.ts +5 -2
- package/dist/esm/components/radioButton/RadioButton.styled.d.ts +8 -3
- package/dist/esm/components/radioList/RadioList.styled.d.ts +4 -1
- package/dist/esm/components/shimmer/ShimmerComponent/ShimmerStyled.d.ts +9 -4
- package/dist/esm/components/side-modal/SideModal.style.d.ts +25 -12
- package/dist/esm/components/spinner/Spinner.d.ts +4 -2
- package/dist/esm/components/states/StateComponent.styled.d.ts +20 -9
- package/dist/esm/components/stepper/Stepper.styled.d.ts +10 -4
- package/dist/esm/components/switch/Switch.d.ts +12 -6
- package/dist/esm/components/tabs/Tabs.styles.d.ts +30 -9
- package/dist/esm/components/tag/Tag.d.ts +1 -1
- package/dist/esm/components/tag/Tag.js +41 -48
- package/dist/esm/components/tag/Tag.js.map +1 -1
- package/dist/esm/components/tag/Tag.styled.d.ts +4 -5
- package/dist/esm/components/tag/Tag.styled.js +9 -6
- package/dist/esm/components/tag/Tag.styled.js.map +1 -1
- package/dist/esm/components/tag/model.d.ts +0 -11
- package/dist/esm/components/tag/model.js.map +1 -1
- package/dist/esm/components/template-context-mapper/Badge/index.d.ts +5 -2
- package/dist/esm/components/template-context-mapper/modalElements/EditMediaV2.style.d.ts +14 -5
- package/dist/esm/components/template-context-mapper/modalElements/VariableConnector.d.ts +4 -2
- package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorsPanel.d.ts +7 -2
- package/dist/esm/components/template-context-mapper/styles/TemplateAnalyticsStyles.d.ts +24 -6
- package/dist/esm/components/template-context-mapper/utils/TemplateConstants.d.ts +16 -8
- package/dist/esm/components/template-preview/EmailTemplatePreview.styled.d.ts +23 -10
- package/dist/esm/components/template-preview/RCS/RCSPreview.styled.d.ts +70 -20
- package/dist/esm/components/template-preview/SMS/SMSBubble.d.ts +7 -2
- package/dist/esm/components/template-preview/SmsTemplatePreview.styled.d.ts +27 -10
- package/dist/esm/components/template-preview/TemplatePreview.styled.d.ts +4 -1
- package/dist/esm/components/template-preview/WhatsApp/ChatHeader.style.d.ts +16 -5
- package/dist/esm/components/template-preview/WhatsApp/ChatUI.style.d.ts +53 -11
- package/dist/esm/components/template-preview/WhatsApp/ChatUiV2.d.ts +3 -1
- package/dist/esm/components/template-preview/WhatsApp/LimitedTimeOffer/LimitedTimeOffer.index.d.ts +9 -3
- package/dist/esm/components/template-preview/webpush/WebpushPreview.styled.d.ts +4 -1
- package/dist/esm/components/testimonial-card/TestimonialCard.style.d.ts +30 -11
- package/dist/esm/components/text-selection-ask/SelectionAskPill.styled.d.ts +5 -2
- package/dist/esm/components/thumbnail/Thumbnail.styled.d.ts +4 -2
- package/dist/esm/components/toaster/Toaster.styled.d.ts +4 -2
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.style.d.ts +4 -1
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryResponseList.style.d.ts +4 -1
- package/dist/esm/components/variable-picker-v3/styles.d.ts +15 -6
- package/dist/esm/components/vertical-full-screen-modal/styles.d.ts +15 -6
- package/dist/esm/components/whats-new/WhatsNew.styles.d.ts +18 -7
- package/dist/esm/editor/BikEditor.styles.d.ts +18 -7
- package/dist/esm/editor/extensions/editorDropdown.styles.d.ts +47 -12
- package/dist/esm/icons/BIK AI specific/WandSparkles.js +1 -1
- package/dist/esm/icons/BIK AI specific/WandSparkles.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsxs as r, jsx as t, Fragment as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as r, jsx as t, Fragment as ae } from "react/jsx-runtime";
|
|
2
|
+
import Ve from "../../assets/icons/arrow_down.svg.js";
|
|
3
3
|
import C from "../../assets/icons/bik_ai_stars_icon.svg.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
4
|
+
import se from "../../assets/icons/cross.svg.js";
|
|
5
|
+
import Ke from "../../assets/icons/refresh.svg.js";
|
|
6
|
+
import Xe, { useState as p, useRef as h, useEffect as m } from "react";
|
|
7
7
|
import { COLORS as f } from "../../constants/Theme.js";
|
|
8
|
-
import { TitleSmall as
|
|
9
|
-
import { CopilotFeedbackModal as
|
|
10
|
-
import { PanelContainer as ze, PanelHeader as
|
|
11
|
-
import { isCopilotRegeneratePrompt as
|
|
12
|
-
import { buildCopilotSelectionPrompt as
|
|
13
|
-
import { renderCopilotMarkdown as
|
|
14
|
-
import { toolResultCtas as
|
|
15
|
-
import { DotPulse as
|
|
16
|
-
const
|
|
8
|
+
import { TitleSmall as De, BodyCaption as he, BodySecondary as Ge } from "../TypographyStyle.js";
|
|
9
|
+
import { CopilotFeedbackModal as Je } from "./CopilotFeedbackModal.js";
|
|
10
|
+
import { PanelContainer as ze, PanelHeader as Ze, HeaderAvatar as qe, HeaderText as Qe, HeaderTitleRow as Ye, HeaderBadge as et, HeaderActions as tt, IconAction as ue, MessagesViewport as rt, MessagesArea as ot, EmptyState as nt, EmptyStateIcon as it, SuggestionList as lt, SuggestionChip as ct, HistoryLoader as dt, MessageBubble as at, ToolCtaList as st, ToolCtaLink as ht, MessageTimestamp as ut, InterruptedNote as pt, MessageActions as ft, MessageAction as x, FollowUpList as wt, FollowUpsLabel as kt, FollowUpChip as Ct, ThinkingBubble as mt, ThinkingLabel as yt, ScrollFade as bt, JumpToLatestButton as gt, ErrorBanner as vt, InputArea as Tt, AttachmentChip as St, AttachmentText as xt, AttachmentRemove as At, InputWrapper as It, MessageInput as Mt, SendButton as Lt, Disclaimer as Bt } from "./CopilotPanel.styled.js";
|
|
11
|
+
import { isCopilotRegeneratePrompt as Rt } from "./copilotRegenerate.js";
|
|
12
|
+
import { buildCopilotSelectionPrompt as Ht } from "./copilotSelectionPrompt.js";
|
|
13
|
+
import { renderCopilotMarkdown as Ft } from "./utils/markdown.js";
|
|
14
|
+
import { toolResultCtas as Et } from "./utils/toolCtas.js";
|
|
15
|
+
import { DotPulse as pe } from "../dot-pulse/DotPulse.js";
|
|
16
|
+
const _t = 96, Pt = 24, Wt = 1800, jt = async (n) => {
|
|
17
17
|
try {
|
|
18
18
|
if (navigator.clipboard?.writeText)
|
|
19
19
|
return await navigator.clipboard.writeText(n), !0;
|
|
@@ -27,7 +27,7 @@ const Et = 96, _t = 24, Pt = 1800, Wt = async (n) => {
|
|
|
27
27
|
} catch {
|
|
28
28
|
return !1;
|
|
29
29
|
}
|
|
30
|
-
},
|
|
30
|
+
}, Nt = 48, $t = (n) => {
|
|
31
31
|
if (!n || !Number.isFinite(n))
|
|
32
32
|
return "";
|
|
33
33
|
const i = new Date(n);
|
|
@@ -35,7 +35,7 @@ const Et = 96, _t = 24, Pt = 1800, Wt = async (n) => {
|
|
|
35
35
|
hour: "numeric",
|
|
36
36
|
minute: "2-digit"
|
|
37
37
|
});
|
|
38
|
-
},
|
|
38
|
+
}, Ot = () => /* @__PURE__ */ r(
|
|
39
39
|
"svg",
|
|
40
40
|
{
|
|
41
41
|
viewBox: "0 0 24 24",
|
|
@@ -52,7 +52,7 @@ const Et = 96, _t = 24, Pt = 1800, Wt = async (n) => {
|
|
|
52
52
|
/* @__PURE__ */ t("path", { d: "M6 11l6-6 6 6" })
|
|
53
53
|
]
|
|
54
54
|
}
|
|
55
|
-
),
|
|
55
|
+
), Ut = () => /* @__PURE__ */ r(
|
|
56
56
|
"svg",
|
|
57
57
|
{
|
|
58
58
|
viewBox: "0 0 24 24",
|
|
@@ -69,7 +69,7 @@ const Et = 96, _t = 24, Pt = 1800, Wt = async (n) => {
|
|
|
69
69
|
/* @__PURE__ */ t("path", { d: "M13 6l6 6-6 6" })
|
|
70
70
|
]
|
|
71
71
|
}
|
|
72
|
-
),
|
|
72
|
+
), fe = ({ size: n = 16 }) => /* @__PURE__ */ t(
|
|
73
73
|
"svg",
|
|
74
74
|
{
|
|
75
75
|
viewBox: "0 0 24 24",
|
|
@@ -79,7 +79,7 @@ const Et = 96, _t = 24, Pt = 1800, Wt = async (n) => {
|
|
|
79
79
|
"aria-hidden": "true",
|
|
80
80
|
children: /* @__PURE__ */ t("rect", { x: "7", y: "7", width: "10", height: "10", rx: "2" })
|
|
81
81
|
}
|
|
82
|
-
),
|
|
82
|
+
), Vt = () => /* @__PURE__ */ r(
|
|
83
83
|
"svg",
|
|
84
84
|
{
|
|
85
85
|
viewBox: "0 0 24 24",
|
|
@@ -96,7 +96,7 @@ const Et = 96, _t = 24, Pt = 1800, Wt = async (n) => {
|
|
|
96
96
|
/* @__PURE__ */ t("path", { d: "M15 5.5A1.5 1.5 0 0 0 13.5 4H5.5A1.5 1.5 0 0 0 4 5.5v8A1.5 1.5 0 0 0 5.5 15" })
|
|
97
97
|
]
|
|
98
98
|
}
|
|
99
|
-
),
|
|
99
|
+
), Kt = () => /* @__PURE__ */ t(
|
|
100
100
|
"svg",
|
|
101
101
|
{
|
|
102
102
|
viewBox: "0 0 24 24",
|
|
@@ -110,7 +110,7 @@ const Et = 96, _t = 24, Pt = 1800, Wt = async (n) => {
|
|
|
110
110
|
"aria-hidden": "true",
|
|
111
111
|
children: /* @__PURE__ */ t("path", { d: "M5 13l4 4L19 7" })
|
|
112
112
|
}
|
|
113
|
-
),
|
|
113
|
+
), Xt = () => /* @__PURE__ */ r(
|
|
114
114
|
"svg",
|
|
115
115
|
{
|
|
116
116
|
viewBox: "0 0 24 24",
|
|
@@ -127,7 +127,7 @@ const Et = 96, _t = 24, Pt = 1800, Wt = async (n) => {
|
|
|
127
127
|
/* @__PURE__ */ t("path", { d: "M20 4v4h-4" })
|
|
128
128
|
]
|
|
129
129
|
}
|
|
130
|
-
),
|
|
130
|
+
), Dt = ({ filled: n = !1 }) => /* @__PURE__ */ r(
|
|
131
131
|
"svg",
|
|
132
132
|
{
|
|
133
133
|
viewBox: "0 0 24 24",
|
|
@@ -144,7 +144,7 @@ const Et = 96, _t = 24, Pt = 1800, Wt = async (n) => {
|
|
|
144
144
|
/* @__PURE__ */ t("path", { d: "M7 10l4.5-7a2 2 0 0 1 3.7 1.3L14.5 9H19a2 2 0 0 1 2 2.3l-1.1 7A2 2 0 0 1 18 20H7" })
|
|
145
145
|
]
|
|
146
146
|
}
|
|
147
|
-
),
|
|
147
|
+
), Gt = ({ filled: n = !1 }) => /* @__PURE__ */ r(
|
|
148
148
|
"svg",
|
|
149
149
|
{
|
|
150
150
|
viewBox: "0 0 24 24",
|
|
@@ -161,187 +161,190 @@ const Et = 96, _t = 24, Pt = 1800, Wt = async (n) => {
|
|
|
161
161
|
/* @__PURE__ */ t("path", { d: "M7 14l4.5 7a2 2 0 0 0 3.7-1.3L14.5 15H19a2 2 0 0 0 2-2.3l-1.1-7A2 2 0 0 0 18 4H7" })
|
|
162
162
|
]
|
|
163
163
|
}
|
|
164
|
-
),
|
|
164
|
+
), ar = ({
|
|
165
165
|
messages: n,
|
|
166
166
|
onSend: i,
|
|
167
167
|
onClose: A,
|
|
168
|
-
title:
|
|
169
|
-
badge:
|
|
170
|
-
subtitle:
|
|
171
|
-
avatar:
|
|
172
|
-
placeholder:
|
|
173
|
-
disclaimer:
|
|
174
|
-
emptyStateTitle:
|
|
175
|
-
emptyStateSubtitle:
|
|
176
|
-
suggestions:
|
|
177
|
-
onSuggestionClick:
|
|
178
|
-
showRefresh:
|
|
168
|
+
title: y = "Copilot",
|
|
169
|
+
badge: $,
|
|
170
|
+
subtitle: O,
|
|
171
|
+
avatar: we,
|
|
172
|
+
placeholder: ke = "Write your message...",
|
|
173
|
+
disclaimer: U = "AI can make mistakes, Verify the responses.",
|
|
174
|
+
emptyStateTitle: Ce,
|
|
175
|
+
emptyStateSubtitle: V = "Here are some things you can try",
|
|
176
|
+
suggestions: I,
|
|
177
|
+
onSuggestionClick: me,
|
|
178
|
+
showRefresh: ye = !0,
|
|
179
179
|
onRefresh: K,
|
|
180
180
|
onRegenerate: X,
|
|
181
|
-
onFeedback:
|
|
181
|
+
onFeedback: M,
|
|
182
182
|
dislikeTitle: be,
|
|
183
|
-
dislikeSubtitle:
|
|
184
|
-
dislikeReasons:
|
|
185
|
-
dislikeNotePlaceholder:
|
|
186
|
-
dislikeSubmitLabel:
|
|
187
|
-
isThinking:
|
|
188
|
-
thinkingLabel:
|
|
189
|
-
isStreaming:
|
|
190
|
-
onStop:
|
|
183
|
+
dislikeSubtitle: ge,
|
|
184
|
+
dislikeReasons: ve,
|
|
185
|
+
dislikeNotePlaceholder: Te,
|
|
186
|
+
dislikeSubmitLabel: Se,
|
|
187
|
+
isThinking: b = !1,
|
|
188
|
+
thinkingLabel: D = "Thinking",
|
|
189
|
+
isStreaming: xe = !1,
|
|
190
|
+
onStop: G,
|
|
191
191
|
interruptedLabel: J = "This message was interrupted",
|
|
192
|
-
followUpsLabel:
|
|
193
|
-
onToolCtaClick:
|
|
194
|
-
hasMoreHistory:
|
|
195
|
-
isLoadingHistory:
|
|
196
|
-
onLoadOlderMessages:
|
|
197
|
-
historyLoadingLabel:
|
|
192
|
+
followUpsLabel: z = "Follow ups",
|
|
193
|
+
onToolCtaClick: Ae,
|
|
194
|
+
hasMoreHistory: Ie = !1,
|
|
195
|
+
isLoadingHistory: g = !1,
|
|
196
|
+
onLoadOlderMessages: Z,
|
|
197
|
+
historyLoadingLabel: Me = "Loading earlier messages",
|
|
198
198
|
inputDisabled: d = !1,
|
|
199
|
-
attachment:
|
|
200
|
-
onAttachmentRemove:
|
|
201
|
-
errorMessage:
|
|
202
|
-
width:
|
|
203
|
-
height:
|
|
204
|
-
className:
|
|
205
|
-
style:
|
|
199
|
+
attachment: s,
|
|
200
|
+
onAttachmentRemove: q,
|
|
201
|
+
errorMessage: Q,
|
|
202
|
+
width: Le,
|
|
203
|
+
height: Be,
|
|
204
|
+
className: Re,
|
|
205
|
+
style: He
|
|
206
206
|
}) => {
|
|
207
|
-
const [L,
|
|
208
|
-
(e) => (e.content.length > 0 || e.wasInterrupted) && !
|
|
209
|
-
),
|
|
210
|
-
|
|
211
|
-
B &&
|
|
212
|
-
}, [n,
|
|
213
|
-
const e =
|
|
214
|
-
!e || o === null ||
|
|
215
|
-
}, [n,
|
|
216
|
-
const
|
|
217
|
-
const e =
|
|
207
|
+
const [L, Y] = p(""), [Fe, ee] = p(!1), [B, R] = p(!0), [v, te] = p(null), [re, Ee] = p({}), [u, H] = p(null), T = h(null), oe = h(!1), w = h(null), F = h(null), E = h(null), _ = h(0), P = h(null), S = n.filter(
|
|
208
|
+
(e) => (e.content.length > 0 || e.wasInterrupted) && !Rt(e.content)
|
|
209
|
+
), ne = S.length === 0 && !b, l = b || xe, ie = !d && !l && (L.trim().length > 0 || !!s), k = l && !!G, W = S[S.length - 1], j = !l && W?.role === "assistant" ? W.followUps : void 0, N = !ne && !B;
|
|
210
|
+
m(() => {
|
|
211
|
+
B && F.current?.scrollIntoView({ behavior: "smooth" });
|
|
212
|
+
}, [n, b, B]), m(() => {
|
|
213
|
+
const e = E.current, o = P.current;
|
|
214
|
+
!e || o === null || g || (P.current = null, e.scrollTop = e.scrollHeight - o, _.current = e.scrollTop);
|
|
215
|
+
}, [n, g]);
|
|
216
|
+
const _e = () => {
|
|
217
|
+
const e = E.current;
|
|
218
218
|
if (!e)
|
|
219
219
|
return;
|
|
220
220
|
const o = e.scrollHeight - e.scrollTop - e.clientHeight;
|
|
221
|
-
e.scrollTop <=
|
|
222
|
-
const
|
|
223
|
-
if (
|
|
221
|
+
e.scrollTop <= Nt && Ie && !g && Z && (P.current = e.scrollHeight - e.scrollTop, Z());
|
|
222
|
+
const a = e.scrollTop < _.current - 1;
|
|
223
|
+
if (_.current = e.scrollTop, o <= Pt) {
|
|
224
224
|
R(!0);
|
|
225
225
|
return;
|
|
226
226
|
}
|
|
227
|
-
|
|
228
|
-
},
|
|
229
|
-
R(!0),
|
|
227
|
+
a && R(!1);
|
|
228
|
+
}, Pe = () => {
|
|
229
|
+
R(!0), F.current?.scrollIntoView({ behavior: "smooth" });
|
|
230
230
|
};
|
|
231
|
-
|
|
231
|
+
m(
|
|
232
232
|
() => () => {
|
|
233
|
-
|
|
233
|
+
w.current && window.clearTimeout(w.current);
|
|
234
234
|
},
|
|
235
235
|
[]
|
|
236
236
|
);
|
|
237
|
-
const
|
|
238
|
-
await
|
|
239
|
-
() =>
|
|
240
|
-
|
|
237
|
+
const We = async (e) => {
|
|
238
|
+
await jt(e.content) && (w.current && window.clearTimeout(w.current), te(e.id), w.current = window.setTimeout(
|
|
239
|
+
() => te(null),
|
|
240
|
+
Wt
|
|
241
241
|
));
|
|
242
|
-
},
|
|
243
|
-
const
|
|
244
|
-
if (
|
|
245
|
-
...
|
|
246
|
-
[e]:
|
|
247
|
-
})),
|
|
242
|
+
}, le = (e, o) => {
|
|
243
|
+
const a = re[e] === o;
|
|
244
|
+
if (Ee((c) => ({
|
|
245
|
+
...c,
|
|
246
|
+
[e]: c[e] === o ? void 0 : o
|
|
247
|
+
})), a) {
|
|
248
248
|
o === "dislike" && H(
|
|
249
|
-
(
|
|
249
|
+
(c) => c === e ? null : c
|
|
250
250
|
);
|
|
251
251
|
return;
|
|
252
252
|
}
|
|
253
253
|
if (o === "like") {
|
|
254
|
-
|
|
254
|
+
M?.(e, "like");
|
|
255
255
|
return;
|
|
256
256
|
}
|
|
257
|
-
|
|
258
|
-
},
|
|
259
|
-
H((
|
|
260
|
-
},
|
|
261
|
-
d ||
|
|
262
|
-
},
|
|
257
|
+
u && u !== e && M?.(u, "dislike"), H(e);
|
|
258
|
+
}, ce = (e, o) => {
|
|
259
|
+
H((a) => a === e ? null : a), M?.(e, "dislike", o);
|
|
260
|
+
}, je = () => {
|
|
261
|
+
d || l || X?.();
|
|
262
|
+
}, de = () => {
|
|
263
263
|
const e = L.trim();
|
|
264
|
-
if (!e && !
|
|
264
|
+
if (!e && !s || d || l)
|
|
265
265
|
return;
|
|
266
266
|
i(
|
|
267
|
-
|
|
268
|
-
),
|
|
269
|
-
const o =
|
|
267
|
+
s ? Ht(s, e) : e
|
|
268
|
+
), Y(""), q?.();
|
|
269
|
+
const o = T.current;
|
|
270
270
|
o && (o.style.height = "auto");
|
|
271
271
|
};
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
}, [
|
|
275
|
-
|
|
276
|
-
|
|
272
|
+
m(() => {
|
|
273
|
+
s && T.current?.focus();
|
|
274
|
+
}, [s]), m(() => {
|
|
275
|
+
const e = oe.current && !l;
|
|
276
|
+
oe.current = l, e && !d && !u && T.current?.focus();
|
|
277
|
+
}, [l, d, u]);
|
|
278
|
+
const Ne = (e) => {
|
|
279
|
+
Y(e.target.value);
|
|
277
280
|
const o = e.target;
|
|
278
281
|
o.style.height = "auto", o.style.height = `${Math.min(
|
|
279
282
|
o.scrollHeight,
|
|
280
|
-
|
|
283
|
+
_t
|
|
281
284
|
)}px`;
|
|
282
|
-
}, je = (e) => {
|
|
283
|
-
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), ce());
|
|
284
|
-
}, Ne = (e) => {
|
|
285
|
-
d || h || (we?.(e), i(e.text));
|
|
286
285
|
}, $e = (e) => {
|
|
287
|
-
|
|
286
|
+
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), de());
|
|
287
|
+
}, Oe = (e) => {
|
|
288
|
+
d || l || (me?.(e), i(e.text));
|
|
289
|
+
}, Ue = (e) => {
|
|
290
|
+
d || l || i(e);
|
|
288
291
|
};
|
|
289
292
|
return /* @__PURE__ */ r(
|
|
290
293
|
ze,
|
|
291
294
|
{
|
|
292
|
-
className:
|
|
293
|
-
style: { width:
|
|
295
|
+
className: Re,
|
|
296
|
+
style: { width: Le, height: Be, ...He },
|
|
294
297
|
role: "dialog",
|
|
295
|
-
"aria-label":
|
|
298
|
+
"aria-label": y,
|
|
296
299
|
children: [
|
|
297
|
-
/* @__PURE__ */ r(
|
|
298
|
-
/* @__PURE__ */ t(
|
|
299
|
-
/* @__PURE__ */ r(
|
|
300
|
-
/* @__PURE__ */ r(
|
|
301
|
-
/* @__PURE__ */ t(
|
|
302
|
-
|
|
300
|
+
/* @__PURE__ */ r(Ze, { children: [
|
|
301
|
+
/* @__PURE__ */ t(qe, { children: we ?? /* @__PURE__ */ t(C, { width: 18, height: 18 }) }),
|
|
302
|
+
/* @__PURE__ */ r(Qe, { children: [
|
|
303
|
+
/* @__PURE__ */ r(Ye, { children: [
|
|
304
|
+
/* @__PURE__ */ t(De, { children: y }),
|
|
305
|
+
$ && /* @__PURE__ */ t(et, { children: $ })
|
|
303
306
|
] }),
|
|
304
|
-
|
|
307
|
+
O && /* @__PURE__ */ t(he, { color: f.content.secondary, children: O })
|
|
305
308
|
] }),
|
|
306
|
-
/* @__PURE__ */ r(
|
|
307
|
-
|
|
308
|
-
|
|
309
|
+
/* @__PURE__ */ r(tt, { children: [
|
|
310
|
+
ye && K && /* @__PURE__ */ t(
|
|
311
|
+
ue,
|
|
309
312
|
{
|
|
310
313
|
type: "button",
|
|
311
314
|
onClick: K,
|
|
312
315
|
"aria-label": "Start a new conversation",
|
|
313
|
-
children: /* @__PURE__ */ t(
|
|
316
|
+
children: /* @__PURE__ */ t(Ke, { width: 16, height: 16 })
|
|
314
317
|
}
|
|
315
318
|
),
|
|
316
319
|
/* @__PURE__ */ t(
|
|
317
|
-
|
|
320
|
+
ue,
|
|
318
321
|
{
|
|
319
322
|
type: "button",
|
|
320
323
|
onClick: A,
|
|
321
324
|
"aria-label": "Close copilot",
|
|
322
|
-
children: /* @__PURE__ */ t(
|
|
325
|
+
children: /* @__PURE__ */ t(se, { width: 18, height: 18 })
|
|
323
326
|
}
|
|
324
327
|
)
|
|
325
328
|
] })
|
|
326
329
|
] }),
|
|
327
|
-
/* @__PURE__ */ r(
|
|
330
|
+
/* @__PURE__ */ r(rt, { children: [
|
|
328
331
|
/* @__PURE__ */ t(
|
|
329
|
-
|
|
332
|
+
ot,
|
|
330
333
|
{
|
|
331
|
-
ref:
|
|
332
|
-
onScroll:
|
|
334
|
+
ref: E,
|
|
335
|
+
onScroll: _e,
|
|
333
336
|
role: "region",
|
|
334
337
|
"aria-label": "Conversation",
|
|
335
|
-
children:
|
|
336
|
-
/* @__PURE__ */ t(
|
|
337
|
-
/* @__PURE__ */ t(
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
338
|
+
children: ne ? /* @__PURE__ */ r(nt, { children: [
|
|
339
|
+
/* @__PURE__ */ t(it, { children: /* @__PURE__ */ t(C, { width: 28, height: 28 }) }),
|
|
340
|
+
/* @__PURE__ */ t(Ge, { style: { fontWeight: 600 }, children: Ce || y }),
|
|
341
|
+
V && /* @__PURE__ */ t(he, { color: f.content.secondary, children: V }),
|
|
342
|
+
I && I.length > 0 && /* @__PURE__ */ t(lt, { children: I.map((e) => /* @__PURE__ */ r(
|
|
343
|
+
ct,
|
|
341
344
|
{
|
|
342
345
|
type: "button",
|
|
343
|
-
disabled: d ||
|
|
344
|
-
onClick: () =>
|
|
346
|
+
disabled: d || l,
|
|
347
|
+
onClick: () => Oe(e),
|
|
345
348
|
children: [
|
|
346
349
|
/* @__PURE__ */ t(C, { width: 14, height: 14 }),
|
|
347
350
|
e.text
|
|
@@ -349,135 +352,123 @@ const Et = 96, _t = 24, Pt = 1800, Wt = async (n) => {
|
|
|
349
352
|
},
|
|
350
353
|
e.id
|
|
351
354
|
)) })
|
|
352
|
-
] }) : /* @__PURE__ */ r(
|
|
353
|
-
|
|
354
|
-
/* @__PURE__ */ t(
|
|
355
|
-
|
|
355
|
+
] }) : /* @__PURE__ */ r(ae, { children: [
|
|
356
|
+
g && /* @__PURE__ */ r(dt, { role: "status", "aria-live": "polite", children: [
|
|
357
|
+
/* @__PURE__ */ t(pe, { color: f.content.placeholder, size: 4 }),
|
|
358
|
+
Me
|
|
356
359
|
] }),
|
|
357
|
-
|
|
358
|
-
const o = e.role === "user" ?
|
|
359
|
-
return /* @__PURE__ */ r(
|
|
360
|
-
e.content.length > 0 && /* @__PURE__ */ t(
|
|
360
|
+
S.map((e) => {
|
|
361
|
+
const o = e.role === "user" ? $t(e.timestamp) : "";
|
|
362
|
+
return /* @__PURE__ */ r(Xe.Fragment, { children: [
|
|
363
|
+
e.content.length > 0 && /* @__PURE__ */ t(at, { $role: e.role, children: e.role === "assistant" ? /* @__PURE__ */ t(
|
|
361
364
|
"div",
|
|
362
365
|
{
|
|
363
366
|
dangerouslySetInnerHTML: {
|
|
364
|
-
__html:
|
|
367
|
+
__html: Ft(e.content)
|
|
365
368
|
}
|
|
366
369
|
}
|
|
367
370
|
) : /* @__PURE__ */ t("div", { style: { whiteSpace: "pre-wrap" }, children: e.content }) }),
|
|
368
371
|
e.role === "assistant" && !e.isStreaming && (() => {
|
|
369
|
-
const
|
|
370
|
-
return
|
|
372
|
+
const a = Et(e.toolResults);
|
|
373
|
+
return a.length === 0 ? null : /* @__PURE__ */ t(st, { children: a.map((c) => /* @__PURE__ */ t(
|
|
371
374
|
ht,
|
|
372
375
|
{
|
|
373
|
-
href:
|
|
376
|
+
href: c.url,
|
|
374
377
|
target: "_blank",
|
|
375
378
|
rel: "noopener noreferrer",
|
|
376
|
-
onClick: () =>
|
|
377
|
-
tool:
|
|
378
|
-
url:
|
|
379
|
+
onClick: () => Ae?.({
|
|
380
|
+
tool: c.tool,
|
|
381
|
+
url: c.url
|
|
379
382
|
}),
|
|
380
|
-
children:
|
|
383
|
+
children: c.label
|
|
381
384
|
},
|
|
382
|
-
`${
|
|
385
|
+
`${c.tool}-${c.url}`
|
|
383
386
|
)) });
|
|
384
387
|
})(),
|
|
385
|
-
o && /* @__PURE__ */ t(
|
|
386
|
-
e.wasInterrupted && J && /* @__PURE__ */ r(
|
|
387
|
-
/* @__PURE__ */ t(
|
|
388
|
+
o && /* @__PURE__ */ t(ut, { children: o }),
|
|
389
|
+
e.wasInterrupted && J && /* @__PURE__ */ r(pt, { children: [
|
|
390
|
+
/* @__PURE__ */ t(fe, { size: 12 }),
|
|
388
391
|
J
|
|
389
392
|
] }),
|
|
390
|
-
e.role === "assistant" && e.content.length > 0 && !e.isStreaming && /* @__PURE__ */ r(
|
|
393
|
+
e.role === "assistant" && e.content.length > 0 && !e.isStreaming && /* @__PURE__ */ r(ft, { children: [
|
|
391
394
|
/* @__PURE__ */ t(
|
|
392
395
|
x,
|
|
393
396
|
{
|
|
394
397
|
type: "button",
|
|
395
398
|
onClick: () => {
|
|
396
|
-
|
|
399
|
+
We(e);
|
|
397
400
|
},
|
|
398
401
|
"data-copied": v === e.id,
|
|
399
402
|
title: v === e.id ? "Copied" : "Copy",
|
|
400
403
|
"aria-label": v === e.id ? "Response copied to clipboard" : "Copy response",
|
|
401
|
-
children: v === e.id ? /* @__PURE__ */ t(
|
|
404
|
+
children: v === e.id ? /* @__PURE__ */ t(Kt, {}) : /* @__PURE__ */ t(Vt, {})
|
|
402
405
|
}
|
|
403
406
|
),
|
|
404
|
-
X && e.id ===
|
|
407
|
+
X && e.id === W?.id && /* @__PURE__ */ t(
|
|
405
408
|
x,
|
|
406
409
|
{
|
|
407
410
|
type: "button",
|
|
408
|
-
onClick:
|
|
409
|
-
disabled: d ||
|
|
411
|
+
onClick: je,
|
|
412
|
+
disabled: d || l,
|
|
410
413
|
title: "Regenerate",
|
|
411
414
|
"aria-label": "Regenerate response",
|
|
412
|
-
children: /* @__PURE__ */ t(
|
|
415
|
+
children: /* @__PURE__ */ t(Xt, {})
|
|
413
416
|
}
|
|
414
417
|
),
|
|
415
|
-
/* @__PURE__ */
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
"data-selected": s[e.id] === "dislike",
|
|
438
|
-
"aria-pressed": s[e.id] === "dislike",
|
|
439
|
-
title: "Bad response",
|
|
440
|
-
"aria-label": "Bad response",
|
|
441
|
-
children: /* @__PURE__ */ t(
|
|
442
|
-
Xt,
|
|
443
|
-
{
|
|
444
|
-
filled: s[e.id] === "dislike"
|
|
445
|
-
}
|
|
446
|
-
)
|
|
447
|
-
}
|
|
448
|
-
)
|
|
418
|
+
!e.isRestored && re[e.id] === void 0 && /* @__PURE__ */ r(ae, { children: [
|
|
419
|
+
/* @__PURE__ */ t(
|
|
420
|
+
x,
|
|
421
|
+
{
|
|
422
|
+
type: "button",
|
|
423
|
+
onClick: () => le(e.id, "like"),
|
|
424
|
+
title: "Good response",
|
|
425
|
+
"aria-label": "Good response",
|
|
426
|
+
children: /* @__PURE__ */ t(Dt, {})
|
|
427
|
+
}
|
|
428
|
+
),
|
|
429
|
+
/* @__PURE__ */ t(
|
|
430
|
+
x,
|
|
431
|
+
{
|
|
432
|
+
type: "button",
|
|
433
|
+
onClick: () => le(e.id, "dislike"),
|
|
434
|
+
title: "Bad response",
|
|
435
|
+
"aria-label": "Bad response",
|
|
436
|
+
children: /* @__PURE__ */ t(Gt, {})
|
|
437
|
+
}
|
|
438
|
+
)
|
|
439
|
+
] })
|
|
449
440
|
] }),
|
|
450
|
-
|
|
451
|
-
|
|
441
|
+
u === e.id && /* @__PURE__ */ t(
|
|
442
|
+
Je,
|
|
452
443
|
{
|
|
453
444
|
title: be,
|
|
454
|
-
subtitle:
|
|
455
|
-
reasons:
|
|
456
|
-
notePlaceholder:
|
|
457
|
-
submitLabel:
|
|
458
|
-
onSubmit: (
|
|
459
|
-
onDismiss: () =>
|
|
445
|
+
subtitle: ge ?? `Help us improve ${y}`,
|
|
446
|
+
reasons: ve,
|
|
447
|
+
notePlaceholder: Te,
|
|
448
|
+
submitLabel: Se,
|
|
449
|
+
onSubmit: (a) => ce(e.id, a),
|
|
450
|
+
onDismiss: () => ce(e.id)
|
|
460
451
|
}
|
|
461
452
|
)
|
|
462
453
|
] }, e.id);
|
|
463
454
|
}),
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
455
|
+
j && j.length > 0 && /* @__PURE__ */ r(wt, { children: [
|
|
456
|
+
z && /* @__PURE__ */ t(kt, { children: z }),
|
|
457
|
+
j.map((e) => /* @__PURE__ */ r(
|
|
458
|
+
Ct,
|
|
468
459
|
{
|
|
469
460
|
type: "button",
|
|
470
461
|
disabled: d,
|
|
471
|
-
onClick: () =>
|
|
462
|
+
onClick: () => Ue(e),
|
|
472
463
|
children: [
|
|
473
|
-
/* @__PURE__ */ t(
|
|
464
|
+
/* @__PURE__ */ t(Ut, {}),
|
|
474
465
|
e
|
|
475
466
|
]
|
|
476
467
|
},
|
|
477
468
|
e
|
|
478
469
|
))
|
|
479
470
|
] }),
|
|
480
|
-
|
|
471
|
+
b && /* @__PURE__ */ r(mt, { role: "status", "aria-live": "polite", children: [
|
|
481
472
|
/* @__PURE__ */ t(
|
|
482
473
|
C,
|
|
483
474
|
{
|
|
@@ -486,75 +477,75 @@ const Et = 96, _t = 24, Pt = 1800, Wt = async (n) => {
|
|
|
486
477
|
color: f.content.brand
|
|
487
478
|
}
|
|
488
479
|
),
|
|
489
|
-
|
|
490
|
-
/* @__PURE__ */ t(
|
|
480
|
+
D && /* @__PURE__ */ t(yt, { children: D }),
|
|
481
|
+
/* @__PURE__ */ t(pe, { color: f.background.brand, size: 5 })
|
|
491
482
|
] }),
|
|
492
|
-
/* @__PURE__ */ t("div", { ref:
|
|
483
|
+
/* @__PURE__ */ t("div", { ref: F })
|
|
493
484
|
] })
|
|
494
485
|
}
|
|
495
486
|
),
|
|
496
|
-
/* @__PURE__ */ t(
|
|
487
|
+
/* @__PURE__ */ t(bt, { $visible: N, "aria-hidden": "true" }),
|
|
497
488
|
/* @__PURE__ */ t(
|
|
498
|
-
|
|
489
|
+
gt,
|
|
499
490
|
{
|
|
500
491
|
type: "button",
|
|
501
|
-
$visible:
|
|
502
|
-
onClick:
|
|
503
|
-
tabIndex:
|
|
492
|
+
$visible: N,
|
|
493
|
+
onClick: Pe,
|
|
494
|
+
tabIndex: N ? 0 : -1,
|
|
504
495
|
"aria-label": "Scroll to the latest message",
|
|
505
|
-
children: /* @__PURE__ */ t(
|
|
496
|
+
children: /* @__PURE__ */ t(Ve, { width: 16, height: 16 })
|
|
506
497
|
}
|
|
507
498
|
)
|
|
508
499
|
] }),
|
|
509
|
-
|
|
510
|
-
/* @__PURE__ */ r(
|
|
511
|
-
|
|
500
|
+
Q && /* @__PURE__ */ t(vt, { role: "alert", children: Q }),
|
|
501
|
+
/* @__PURE__ */ r(Tt, { children: [
|
|
502
|
+
s && /* @__PURE__ */ r(St, { children: [
|
|
512
503
|
/* @__PURE__ */ t(C, { width: 14, height: 14, color: f.content.brand }),
|
|
513
|
-
/* @__PURE__ */ t(
|
|
504
|
+
/* @__PURE__ */ t(xt, { title: s, children: s }),
|
|
514
505
|
/* @__PURE__ */ t(
|
|
515
|
-
|
|
506
|
+
At,
|
|
516
507
|
{
|
|
517
508
|
type: "button",
|
|
518
|
-
onClick:
|
|
509
|
+
onClick: q,
|
|
519
510
|
"aria-label": "Remove the selected text",
|
|
520
|
-
children: /* @__PURE__ */ t(
|
|
511
|
+
children: /* @__PURE__ */ t(se, { width: 12, height: 12 })
|
|
521
512
|
}
|
|
522
513
|
)
|
|
523
514
|
] }),
|
|
524
|
-
/* @__PURE__ */ r(
|
|
515
|
+
/* @__PURE__ */ r(It, { $focused: Fe, children: [
|
|
525
516
|
/* @__PURE__ */ t(
|
|
526
517
|
Mt,
|
|
527
518
|
{
|
|
528
|
-
ref:
|
|
519
|
+
ref: T,
|
|
529
520
|
rows: 1,
|
|
530
521
|
value: L,
|
|
531
|
-
placeholder:
|
|
522
|
+
placeholder: ke,
|
|
532
523
|
disabled: d,
|
|
533
|
-
onChange:
|
|
534
|
-
onKeyDown:
|
|
535
|
-
onFocus: () =>
|
|
536
|
-
onBlur: () =>
|
|
524
|
+
onChange: Ne,
|
|
525
|
+
onKeyDown: $e,
|
|
526
|
+
onFocus: () => ee(!0),
|
|
527
|
+
onBlur: () => ee(!1)
|
|
537
528
|
}
|
|
538
529
|
),
|
|
539
530
|
/* @__PURE__ */ t(
|
|
540
|
-
|
|
531
|
+
Lt,
|
|
541
532
|
{
|
|
542
533
|
type: "button",
|
|
543
|
-
$active:
|
|
544
|
-
disabled: !
|
|
545
|
-
onClick:
|
|
546
|
-
"aria-label":
|
|
547
|
-
children:
|
|
534
|
+
$active: k || ie,
|
|
535
|
+
disabled: !k && !ie,
|
|
536
|
+
onClick: k ? G : de,
|
|
537
|
+
"aria-label": k ? "Stop generating" : "Send message",
|
|
538
|
+
children: k ? /* @__PURE__ */ t(fe, {}) : /* @__PURE__ */ t(Ot, {})
|
|
548
539
|
}
|
|
549
540
|
)
|
|
550
541
|
] })
|
|
551
542
|
] }),
|
|
552
|
-
|
|
543
|
+
U && /* @__PURE__ */ t(Bt, { children: U })
|
|
553
544
|
]
|
|
554
545
|
}
|
|
555
546
|
);
|
|
556
547
|
};
|
|
557
548
|
export {
|
|
558
|
-
|
|
549
|
+
ar as CopilotPanel
|
|
559
550
|
};
|
|
560
551
|
//# sourceMappingURL=CopilotPanel.js.map
|