@luzmo/analytics-components-kit 1.0.3-beta.5 → 1.0.3-beta.6
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/components/ai-chat/ai-chat-request.d.ts +11 -0
- package/components/ai-chat/ai-chat.d.ts +59 -54
- package/components/ai-chat/ai-prompt-types.d.ts +93 -0
- package/components/ai-chat/index.cjs +1 -1
- package/components/ai-chat/index.d.ts +9 -4
- package/components/ai-chat/index.js +2 -2
- package/components/ai-chat/session/ai-chat-session-controller.d.ts +51 -0
- package/components/ai-chat/session/ai-chat-session-types.d.ts +86 -0
- package/components/ai-chat/session/ai-chat-session.d.ts +81 -0
- package/components/ai-chat/session/index.d.ts +2 -0
- package/components/ai-chat/{ai-chat-streaming.d.ts → stream/ai-chat-streaming.d.ts} +6 -0
- package/components/ai-chat/stream/analyst-handler.d.ts +3 -0
- package/components/ai-chat/stream/dashboard-handler.d.ts +4 -0
- package/components/ai-chat/stream/index.d.ts +8 -0
- package/components/ai-chat/stream/item-handler.d.ts +2 -0
- package/components/ai-chat/stream/registry.d.ts +5 -0
- package/components/ai-chat/stream/shared.d.ts +10 -0
- package/components/ai-chat/stream/types.d.ts +26 -0
- package/components/ai-chat-CY73iYCg.cjs +154 -0
- package/components/ai-chat-DVU9XiA2.js +1788 -0
- package/components/ai-interaction-textarea/index.cjs +1 -1
- package/components/ai-interaction-textarea/index.js +1 -1
- package/components/{ai-interaction-textarea-BXmgedJt.js → ai-interaction-textarea-DI98QoMZ.js} +3 -3
- package/components/{ai-interaction-textarea-CogE101T.cjs → ai-interaction-textarea-DqWt823F.cjs} +1 -1
- package/components/{base-BAzY-whv.js → base-D3ehdFno.js} +1 -1
- package/components/{base-CbpjVnVy.cjs → base-HUGXYn6t.cjs} +1 -1
- package/components/data-field/index.cjs +1 -1
- package/components/data-field/index.js +1 -1
- package/components/{data-field-97uH3l6o.cjs → data-field-DSzU9Apl.cjs} +1 -1
- package/components/{data-field-tfAMLb-d.js → data-field-DwSYggPc.js} +3 -3
- package/components/data-field-level/index.cjs +1 -1
- package/components/data-field-level/index.js +1 -1
- package/components/{data-field-level-BsDTHrJ6.js → data-field-level-BquNqRm1.js} +1 -1
- package/components/{data-field-level-6npuFtQo.cjs → data-field-level-CYUtLiIi.cjs} +1 -1
- package/components/data-field-panel/index.cjs +1 -1
- package/components/data-field-panel/index.js +1 -1
- package/components/{data-field-panel-Dv5nfM0z.cjs → data-field-panel-B_83HNyI.cjs} +1 -1
- package/components/{data-field-panel-P2t8d6sG.js → data-field-panel-Bqslx0EB.js} +3 -3
- package/components/data-fields-select/index.cjs +1 -1
- package/components/data-fields-select/index.js +1 -1
- package/components/{data-fields-select-B7vJTdZO.cjs → data-fields-select-BZj1cpL5.cjs} +1 -1
- package/components/{data-fields-select-DHnnYhbr.js → data-fields-select-t1ikPTLw.js} +1 -1
- package/components/dataset-selector-list/index.cjs +1 -1
- package/components/dataset-selector-list/index.js +1 -1
- package/components/{dataset-selector-list-DbCmavOc.cjs → dataset-selector-list-Bta-CGoN.cjs} +1 -1
- package/components/{dataset-selector-list-CXnDkIe2.js → dataset-selector-list-Ho8JnQp7.js} +1 -1
- package/components/dataset-selector-row/index.cjs +1 -1
- package/components/dataset-selector-row/index.js +1 -1
- package/components/{dataset-selector-row-BONcmdL2.js → dataset-selector-row-8hgsmMRg.js} +1 -1
- package/components/{dataset-selector-row-Bm60zTbF.cjs → dataset-selector-row-CKhHK1H5.cjs} +1 -1
- package/components/{de-B8ds_DbE.cjs → de-CVLDoWlp.cjs} +1 -1
- package/components/{de-DMnvmNFg.js → de-D2bZwq4D.js} +6 -1
- package/components/display-settings/index.cjs +1 -1
- package/components/display-settings/index.js +1 -1
- package/components/{display-settings-BLf7lBww.cjs → display-settings-Bmb0HUlu.cjs} +1 -1
- package/components/{display-settings-BLMrlvMS.js → display-settings-Di9dXtUM.js} +1 -1
- package/components/display-settings-binning/index.cjs +1 -1
- package/components/display-settings-binning/index.js +1 -1
- package/components/{display-settings-binning-hCJ0qkt5.js → display-settings-binning-B8qUIt6T.js} +2 -2
- package/components/{display-settings-binning-BAg6FoqJ.cjs → display-settings-binning-CpwCqvwm.cjs} +1 -1
- package/components/display-settings-datetime/index.cjs +1 -1
- package/components/display-settings-datetime/index.js +1 -1
- package/components/{display-settings-datetime-BzeNlKLC.cjs → display-settings-datetime-3M3DvzTN.cjs} +1 -1
- package/components/{display-settings-datetime-CCxok7d7.js → display-settings-datetime-C8JfjDJK.js} +2 -2
- package/components/display-settings-grand-totals/index.cjs +1 -1
- package/components/display-settings-grand-totals/index.js +1 -1
- package/components/{display-settings-grand-totals-HDpr3IJ5.cjs → display-settings-grand-totals-DMDa6C5k.cjs} +1 -1
- package/components/{display-settings-grand-totals-C1N1cehl.js → display-settings-grand-totals-kyfMh55D.js} +2 -2
- package/components/display-settings-numeric/index.cjs +1 -1
- package/components/display-settings-numeric/index.js +1 -1
- package/components/{display-settings-numeric-DSs20wUu.cjs → display-settings-numeric-B51KddXI.cjs} +1 -1
- package/components/{display-settings-numeric-oyCfBAGV.js → display-settings-numeric-Cw8Nx5s9.js} +2 -2
- package/components/display-settings-period-over-period/index.cjs +1 -1
- package/components/display-settings-period-over-period/index.js +1 -1
- package/components/{display-settings-period-over-period-h8bA3V5C.js → display-settings-period-over-period-B2AN0rwz.js} +2 -2
- package/components/{display-settings-period-over-period-CcX7vQnt.cjs → display-settings-period-over-period-CjjA2NqZ.cjs} +1 -1
- package/components/{es-Cc258uTs.js → es-9-jszdOJ.js} +6 -1
- package/components/{es-DGC51Dm9.cjs → es-Byjf7YBI.cjs} +1 -1
- package/components/filter-expression-picker/index.cjs +1 -1
- package/components/filter-expression-picker/index.js +1 -1
- package/components/{filter-expression-picker-DQP5lkn4.js → filter-expression-picker-Brn-vNUd.js} +1 -1
- package/components/{filter-expression-picker-BMJkgHu9.cjs → filter-expression-picker-DCFZKpBE.cjs} +1 -1
- package/components/filter-item/index.cjs +1 -1
- package/components/filter-item/index.js +1 -1
- package/components/{filter-item-BXcYNAAm.js → filter-item-BlSQe2nu.js} +4 -4
- package/components/{filter-item-D9m378Qo.cjs → filter-item-Cjrhb1RR.cjs} +1 -1
- package/components/filter-value-picker/index.cjs +1 -1
- package/components/filter-value-picker/index.js +1 -1
- package/components/{filter-value-picker-YIkbsWDP.cjs → filter-value-picker-BCckBdal.cjs} +1 -1
- package/components/{filter-value-picker-B-dzcjEo.js → filter-value-picker-CBetCjIs.js} +4 -4
- package/components/filter-value-picker-datetime/index.cjs +1 -1
- package/components/filter-value-picker-datetime/index.js +1 -1
- package/components/{filter-value-picker-datetime-BJMcnoKH.js → filter-value-picker-datetime-CT63jJDI.js} +1 -1
- package/components/{filter-value-picker-datetime-BrrmcjIE.cjs → filter-value-picker-datetime-CxM6HXe3.cjs} +1 -1
- package/components/filter-value-picker-hierarchy/index.cjs +1 -1
- package/components/filter-value-picker-hierarchy/index.js +1 -1
- package/components/{filter-value-picker-hierarchy-B9gDxYna.cjs → filter-value-picker-hierarchy-C5QZXiQz.cjs} +1 -1
- package/components/{filter-value-picker-hierarchy-UdDq0CZG.js → filter-value-picker-hierarchy-CAORy2A-.js} +2 -2
- package/components/filter-value-picker-numeric/index.cjs +1 -1
- package/components/filter-value-picker-numeric/index.js +1 -1
- package/components/{filter-value-picker-numeric-D_dgITCq.cjs → filter-value-picker-numeric-CtOfHaJR.cjs} +1 -1
- package/components/{filter-value-picker-numeric-EK515Z-Y.js → filter-value-picker-numeric-Fao-PKN7.js} +1 -1
- package/components/filters/index.cjs +1 -1
- package/components/filters/index.js +1 -1
- package/components/{filters-H2scDNLi.js → filters-CtWut3ce.js} +2 -2
- package/components/{filters-8ehwgopC.cjs → filters-DI0GTL9k.cjs} +1 -1
- package/components/{fr-BoZFY3Qe.cjs → fr-BVxPTfyF.cjs} +1 -1
- package/components/{fr-B32d4zcX.js → fr-DLf99-F8.js} +6 -1
- package/components/{get-dataset-name-CrWWViwN.cjs → get-dataset-name-CvZduuOo.cjs} +1 -1
- package/components/{get-dataset-name-7FdLQo10.js → get-dataset-name-EKmxKZU9.js} +1 -1
- package/components/index.cjs +1 -1
- package/components/index.js +58 -58
- package/components/item-grid/helpers/grid-item-popover.d.ts +7 -1
- package/components/item-grid/helpers/grid-rendering.d.ts +7 -1
- package/components/item-grid/index.cjs +1 -1
- package/components/item-grid/index.js +1 -1
- package/components/item-grid/item-grid.d.ts +8 -0
- package/components/{item-grid-CxblVEy3.cjs → item-grid-Bcez8lwg.cjs} +7 -7
- package/components/{item-grid-B-IFwriA.js → item-grid-DgxtJ0eX.js} +574 -564
- package/components/item-option/index.cjs +1 -1
- package/components/item-option/index.js +1 -1
- package/components/{item-option-ChsD18x9.cjs → item-option-BgYyAKSW.cjs} +1 -1
- package/components/{item-option-Buxnv89s.js → item-option-DjiTHr0r.js} +1 -1
- package/components/item-option-action-button-group/index.cjs +1 -1
- package/components/item-option-action-button-group/index.js +1 -1
- package/components/{item-option-action-button-group-Cw9EDbG-.cjs → item-option-action-button-group-DdqzgR08.cjs} +1 -1
- package/components/{item-option-action-button-group-QO_darH9.js → item-option-action-button-group-U5GCtFjg.js} +1 -1
- package/components/{item-option-base-DjQ5poaH.cjs → item-option-base-BeIdCZMp.cjs} +1 -1
- package/components/{item-option-base-DMmga0dv.js → item-option-base-DM3U9dbW.js} +1 -1
- package/components/item-option-color-palette-picker/index.cjs +1 -1
- package/components/item-option-color-palette-picker/index.js +1 -1
- package/components/{item-option-color-palette-picker-CiE_aWRI.js → item-option-color-palette-picker-BsMZ3IUR.js} +1 -1
- package/components/{item-option-color-palette-picker-gZvk4ODA.cjs → item-option-color-palette-picker-oj8nSb-q.cjs} +1 -1
- package/components/item-option-color-picker/index.cjs +1 -1
- package/components/item-option-color-picker/index.js +1 -1
- package/components/{item-option-color-picker-DCnGqBgT.cjs → item-option-color-picker-BJKGTrIi.cjs} +1 -1
- package/components/{item-option-color-picker-CUskqN3R.js → item-option-color-picker-B_pemZKJ.js} +1 -1
- package/components/item-option-color-range/index.cjs +1 -1
- package/components/item-option-color-range/index.js +1 -1
- package/components/{item-option-color-range-B24EAbUi.cjs → item-option-color-range-BOegJZim.cjs} +1 -1
- package/components/{item-option-color-range-BgHXTDvx.js → item-option-color-range-DW3rdMt5.js} +1 -1
- package/components/item-option-multi-language-field/index.cjs +1 -1
- package/components/item-option-multi-language-field/index.js +1 -1
- package/components/{item-option-multi-language-field-DDIu7Hns.cjs → item-option-multi-language-field-BQZ4Lmiy.cjs} +1 -1
- package/components/{item-option-multi-language-field-qngZBXHT.js → item-option-multi-language-field-CeYgkRzs.js} +1 -1
- package/components/item-option-number-field/index.cjs +1 -1
- package/components/item-option-number-field/index.js +1 -1
- package/components/{item-option-number-field-Cd-cfpaq.js → item-option-number-field-CFQyJG_w.js} +1 -1
- package/components/{item-option-number-field-CqrO1Xu0.cjs → item-option-number-field-T2L2jFCf.cjs} +1 -1
- package/components/item-option-panel/index.cjs +1 -1
- package/components/item-option-panel/index.js +1 -1
- package/components/{item-option-panel-B26_sDcj.cjs → item-option-panel-BOJmKPgY.cjs} +1 -1
- package/components/{item-option-panel-DZiOx_sn.js → item-option-panel-ChOItFmc.js} +2 -2
- package/components/item-option-picker/index.cjs +1 -1
- package/components/item-option-picker/index.js +1 -1
- package/components/{item-option-picker-B86AqAWp.cjs → item-option-picker-3krQktmk.cjs} +1 -1
- package/components/{item-option-picker-LRahjZUz.js → item-option-picker-IBP7QFLA.js} +1 -1
- package/components/item-option-position-picker/index.cjs +1 -1
- package/components/item-option-position-picker/index.js +1 -1
- package/components/{item-option-position-picker-Cbi2OygH.cjs → item-option-position-picker-BiLRWUWK.cjs} +1 -1
- package/components/{item-option-position-picker-NUpUlyPV.js → item-option-position-picker-DF54K_Mw.js} +1 -1
- package/components/item-option-positions-number-field/index.cjs +1 -1
- package/components/item-option-positions-number-field/index.js +1 -1
- package/components/{item-option-positions-number-field-BbIkX6wM.cjs → item-option-positions-number-field-B6qxN1x7.cjs} +1 -1
- package/components/{item-option-positions-number-field-ClPil6MM.js → item-option-positions-number-field-Dchzu5NS.js} +1 -1
- package/components/item-option-radio-button-group/index.cjs +1 -1
- package/components/item-option-radio-button-group/index.js +1 -1
- package/components/{item-option-radio-button-group-Bdd9sU4p.js → item-option-radio-button-group-BiOpqNXX.js} +1 -1
- package/components/{item-option-radio-button-group-BtYYhQyI.cjs → item-option-radio-button-group-DzI_2jB3.cjs} +1 -1
- package/components/item-option-slider/index.cjs +1 -1
- package/components/item-option-slider/index.js +1 -1
- package/components/{item-option-slider-32oGS1fd.cjs → item-option-slider-6E4VgJpv.cjs} +1 -1
- package/components/{item-option-slider-BJ7gVQXP.js → item-option-slider-Dba7mmcA.js} +1 -1
- package/components/item-option-switch/index.cjs +1 -1
- package/components/item-option-switch/index.js +1 -1
- package/components/{item-option-switch-BMVlfdx5.js → item-option-switch-BAYX5lTr.js} +1 -1
- package/components/{item-option-switch-BFk3biK9.cjs → item-option-switch-Dt4pzFNi.cjs} +1 -1
- package/components/item-option-text-field/index.cjs +1 -1
- package/components/item-option-text-field/index.js +1 -1
- package/components/{item-option-text-field-CWvgQ3pJ.cjs → item-option-text-field-BLOz4LvH.cjs} +1 -1
- package/components/{item-option-text-field-BoXwVo-B.js → item-option-text-field-CHalqTt1.js} +1 -1
- package/components/item-slot-drop/index.cjs +1 -1
- package/components/item-slot-drop/index.js +1 -1
- package/components/{item-slot-drop-CYRVCWF0.cjs → item-slot-drop-CNeF_Qmg.cjs} +1 -1
- package/components/{item-slot-drop-C0GmOMQY.js → item-slot-drop-n6UHgA-Q.js} +4 -4
- package/components/item-slot-drop-panel/index.cjs +1 -1
- package/components/item-slot-drop-panel/index.js +1 -1
- package/components/{item-slot-drop-panel-CoRFds3a.cjs → item-slot-drop-panel-Bh6PlCJx.cjs} +1 -1
- package/components/{item-slot-drop-panel-Ci3Soo16.js → item-slot-drop-panel-Hhp9_pDd.js} +3 -3
- package/components/item-slot-picker/index.cjs +1 -1
- package/components/item-slot-picker/index.js +1 -1
- package/components/{item-slot-picker-CmnJSYIF.cjs → item-slot-picker-7oF3vLwb.cjs} +1 -1
- package/components/{item-slot-picker-D1_NbL1A.js → item-slot-picker-BAMVwHtd.js} +5 -5
- package/components/item-slot-picker-panel/index.cjs +1 -1
- package/components/item-slot-picker-panel/index.js +1 -1
- package/components/{item-slot-picker-panel-B8VvKhRF.js → item-slot-picker-panel-BYCDx6Hk.js} +3 -3
- package/components/{item-slot-picker-panel-DzKodYTM.cjs → item-slot-picker-panel-C6mMlurQ.cjs} +1 -1
- package/components/{localized-mixin-DZuGq2Fm.js → localized-mixin-CpYxJczB.js} +1 -1
- package/components/{localized-mixin-Dujo7nlJ.cjs → localized-mixin-CxGNXOcg.cjs} +1 -1
- package/components/{nl-C9Ad2LdA.cjs → nl-D4uOyZ6h.cjs} +1 -1
- package/components/{nl-hCQgb1fB.js → nl-QLEhlKsI.js} +6 -1
- package/components/{set-locale-CXnxhP_B.js → set-locale-wsrhUZVV.js} +4 -4
- package/components/{set-locale-MCuEsOOu.cjs → set-locale-xSK2Wd4D.cjs} +1 -1
- package/components/slot-menu/index.cjs +1 -1
- package/components/slot-menu/index.js +1 -1
- package/components/{slot-menu-CYNYwJnU.js → slot-menu-B431N66z.js} +3 -3
- package/components/{slot-menu-CDAAPyFj.cjs → slot-menu-CIQRPLvx.cjs} +1 -1
- package/components/slot-menu-list/index.cjs +1 -1
- package/components/slot-menu-list/index.js +1 -1
- package/components/{slot-menu-list-DbWiuJDF.cjs → slot-menu-list-BROocU0s.cjs} +1 -1
- package/components/{slot-menu-list-DL-x5Ggl.js → slot-menu-list-Cdh09ie0.js} +1 -1
- package/components/utils/base.cjs +1 -1
- package/components/utils/base.js +2 -2
- package/components/{utils-BACUV6sE.js → utils-CJ3Vy98n.js} +1 -1
- package/components/{utils-DKSE_5u1.cjs → utils-iY1cKQaF.cjs} +1 -1
- package/components/utils.cjs +1 -1
- package/components/utils.js +2 -2
- package/components/viz-item-menu/index.cjs +1 -1
- package/components/viz-item-menu/index.js +1 -1
- package/components/{viz-item-menu-DXoKwAhV.js → viz-item-menu--FyB_XCf.js} +1 -1
- package/components/{viz-item-menu-yr7TQY8-.cjs → viz-item-menu-D20StIE_.cjs} +1 -1
- package/custom-elements.json +1460 -157
- package/package.json +1 -1
- package/react/components/ai-chat/stream/index.ts +1 -0
- package/react/components/ai-chat/stream/types.ts +29 -0
- package/react/components/ai-chat.component.ts +12 -12
- package/react/esm/components/ai-chat/stream/index.d.ts +1 -0
- package/react/esm/components/ai-chat/stream/index.js +1 -0
- package/react/esm/components/ai-chat/stream/types.d.ts +26 -0
- package/react/esm/components/ai-chat/stream/types.js +1 -0
- package/react/esm/components/ai-chat.component.d.ts +8 -8
- package/react/esm/components/ai-chat.component.js +8 -8
- package/types/ai-chat.types.d.ts +1 -1
- package/components/ai-chat/request-contract.d.ts +0 -56
- package/components/ai-chat-D9yB7Sw_.cjs +0 -151
- package/components/ai-chat-DkfD3BDG.js +0 -1258
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './types';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ProgressTreeNode } from '@luzmo/lucero/progress-steps';
|
|
2
|
+
import type { AiSampleChart, ChatMessage } from '../../../types';
|
|
3
|
+
import type { DashboardStatePayload, LuzmoDashboardGeneratedEventDetail } from '../ai-prompt-types';
|
|
4
|
+
|
|
5
|
+
export interface StreamHandlerCallbacks {
|
|
6
|
+
onConversationIdChange: (conversationId: string) => void;
|
|
7
|
+
onProgress: (progress: ProgressTreeNode) => void;
|
|
8
|
+
onProgressCollapsed: (collapsed: boolean) => void;
|
|
9
|
+
onMessageUpdate: (message: ChatMessage) => void;
|
|
10
|
+
dispatchChartGenerated: (detail: AiSampleChart) => void;
|
|
11
|
+
dispatchDashboardGenerated: (detail: LuzmoDashboardGeneratedEventDetail) => void;
|
|
12
|
+
dispatchResponseReceived: (message: ChatMessage, done: boolean) => void;
|
|
13
|
+
getConversationId: () => string | null;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface StreamHandlerState {
|
|
17
|
+
progressCollapsed: boolean;
|
|
18
|
+
dashboardSnapshot: DashboardStatePayload | null;
|
|
19
|
+
dashboardName: Record<string, string> | undefined;
|
|
20
|
+
interruptQuestion: string | null;
|
|
21
|
+
/** Latest item chart payload from streaming `asset_delta` events (aiprompt item agent). */
|
|
22
|
+
itemSnapshot: Record<string, unknown> | null;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface StreamHandlerContext {
|
|
26
|
+
aiMessage: ChatMessage;
|
|
27
|
+
callbacks: StreamHandlerCallbacks;
|
|
28
|
+
state: StreamHandlerState;
|
|
29
|
+
}
|
|
@@ -7,33 +7,33 @@ const LuzmoAiChatComponent = createComponent({
|
|
|
7
7
|
elementClass: LuzmoAiChatClass,
|
|
8
8
|
react: React,
|
|
9
9
|
events: {
|
|
10
|
-
onLuzmoResponseReceived: 'luzmo-response-received' as EventName<CustomEvent>,
|
|
11
|
-
onLuzmoChartGenerated: 'luzmo-chart-generated' as EventName<CustomEvent>,
|
|
12
10
|
onLuzmoMessageSent: 'luzmo-message-sent' as EventName<CustomEvent>,
|
|
13
|
-
onLuzmoRestoreRequested: 'luzmo-restore-requested' as EventName<CustomEvent>,
|
|
14
11
|
onLuzmoDatasetsChanged: 'luzmo-datasets-changed' as EventName<CustomEvent>,
|
|
15
|
-
|
|
12
|
+
onLuzmoChartGenerated: 'luzmo-chart-generated' as EventName<CustomEvent>,
|
|
13
|
+
onLuzmoDashboardGenerated: 'luzmo-dashboard-generated' as EventName<CustomEvent>,
|
|
14
|
+
onLuzmoResponseReceived: 'luzmo-response-received' as EventName<CustomEvent>,
|
|
15
|
+
onLuzmoConversationIdChanged: 'luzmo-conversation-id-changed' as EventName<CustomEvent>
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* React wrapper for <luzmo-ai-chat>
|
|
21
21
|
*
|
|
22
|
-
* @event onLuzmoResponseReceived - Fired when an AI text response is received. For chart responses, this event is only fired if the response includes a `message` field. For error responses, this event is always fired with the error explanation.
|
|
23
|
-
* @event onLuzmoChartGenerated - Fired when the AI generates a chart (includes generatedChart in response)
|
|
24
22
|
* @event onLuzmoMessageSent - Fired when a user sends a message
|
|
25
|
-
* @event
|
|
26
|
-
* @event
|
|
23
|
+
* @event onLuzmoChartGenerated - Fired when agent is `item` and a chart asset is ready
|
|
24
|
+
* @event onLuzmoDashboardGenerated - Fired when agent is `dashboard` and a dashboard asset is ready
|
|
25
|
+
* @event onLuzmoResponseReceived - Fired when an AI text response is received. For chart responses, this event is only fired if the response includes a `message` field. For error responses, this event is always fired with the error explanation.
|
|
26
|
+
* @event onLuzmoConversationIdChanged - Fired when the conversation ID is updated from the API
|
|
27
27
|
*/
|
|
28
28
|
export const LuzmoAiChat = LuzmoAiChatComponent as ReactWebComponent<
|
|
29
29
|
LuzmoAiChatClass,
|
|
30
30
|
{
|
|
31
|
-
onLuzmoResponseReceived: EventName<CustomEvent>;
|
|
32
|
-
onLuzmoChartGenerated: EventName<CustomEvent>;
|
|
33
31
|
onLuzmoMessageSent: EventName<CustomEvent>;
|
|
34
|
-
onLuzmoRestoreRequested: EventName<CustomEvent>;
|
|
35
32
|
onLuzmoDatasetsChanged: EventName<CustomEvent>;
|
|
36
|
-
|
|
33
|
+
onLuzmoChartGenerated: EventName<CustomEvent>;
|
|
34
|
+
onLuzmoDashboardGenerated: EventName<CustomEvent>;
|
|
35
|
+
onLuzmoResponseReceived: EventName<CustomEvent>;
|
|
36
|
+
onLuzmoConversationIdChanged: EventName<CustomEvent>;
|
|
37
37
|
}
|
|
38
38
|
>;
|
|
39
39
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './types';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ProgressTreeNode } from '@luzmo/lucero/progress-steps';
|
|
2
|
+
import type { AiSampleChart, ChatMessage } from '../../../types';
|
|
3
|
+
import type { DashboardStatePayload, LuzmoDashboardGeneratedEventDetail } from '../ai-prompt-types';
|
|
4
|
+
export interface StreamHandlerCallbacks {
|
|
5
|
+
onConversationIdChange: (conversationId: string) => void;
|
|
6
|
+
onProgress: (progress: ProgressTreeNode) => void;
|
|
7
|
+
onProgressCollapsed: (collapsed: boolean) => void;
|
|
8
|
+
onMessageUpdate: (message: ChatMessage) => void;
|
|
9
|
+
dispatchChartGenerated: (detail: AiSampleChart) => void;
|
|
10
|
+
dispatchDashboardGenerated: (detail: LuzmoDashboardGeneratedEventDetail) => void;
|
|
11
|
+
dispatchResponseReceived: (message: ChatMessage, done: boolean) => void;
|
|
12
|
+
getConversationId: () => string | null;
|
|
13
|
+
}
|
|
14
|
+
export interface StreamHandlerState {
|
|
15
|
+
progressCollapsed: boolean;
|
|
16
|
+
dashboardSnapshot: DashboardStatePayload | null;
|
|
17
|
+
dashboardName: Record<string, string> | undefined;
|
|
18
|
+
interruptQuestion: string | null;
|
|
19
|
+
/** Latest item chart payload from streaming `asset_delta` events (aiprompt item agent). */
|
|
20
|
+
itemSnapshot: Record<string, unknown> | null;
|
|
21
|
+
}
|
|
22
|
+
export interface StreamHandlerContext {
|
|
23
|
+
aiMessage: ChatMessage;
|
|
24
|
+
callbacks: StreamHandlerCallbacks;
|
|
25
|
+
state: StreamHandlerState;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,19 +3,19 @@ import { LuzmoAiChat as LuzmoAiChatClass } from '@luzmo/analytics-components-kit
|
|
|
3
3
|
/**
|
|
4
4
|
* React wrapper for <luzmo-ai-chat>
|
|
5
5
|
*
|
|
6
|
-
* @event onLuzmoResponseReceived - Fired when an AI text response is received. For chart responses, this event is only fired if the response includes a `message` field. For error responses, this event is always fired with the error explanation.
|
|
7
|
-
* @event onLuzmoChartGenerated - Fired when the AI generates a chart (includes generatedChart in response)
|
|
8
6
|
* @event onLuzmoMessageSent - Fired when a user sends a message
|
|
9
|
-
* @event
|
|
10
|
-
* @event
|
|
7
|
+
* @event onLuzmoChartGenerated - Fired when agent is `item` and a chart asset is ready
|
|
8
|
+
* @event onLuzmoDashboardGenerated - Fired when agent is `dashboard` and a dashboard asset is ready
|
|
9
|
+
* @event onLuzmoResponseReceived - Fired when an AI text response is received. For chart responses, this event is only fired if the response includes a `message` field. For error responses, this event is always fired with the error explanation.
|
|
10
|
+
* @event onLuzmoConversationIdChanged - Fired when the conversation ID is updated from the API
|
|
11
11
|
*/
|
|
12
12
|
export declare const LuzmoAiChat: ReactWebComponent<LuzmoAiChatClass, {
|
|
13
|
-
onLuzmoResponseReceived: EventName<CustomEvent>;
|
|
14
|
-
onLuzmoChartGenerated: EventName<CustomEvent>;
|
|
15
13
|
onLuzmoMessageSent: EventName<CustomEvent>;
|
|
16
|
-
onLuzmoRestoreRequested: EventName<CustomEvent>;
|
|
17
14
|
onLuzmoDatasetsChanged: EventName<CustomEvent>;
|
|
18
|
-
|
|
15
|
+
onLuzmoChartGenerated: EventName<CustomEvent>;
|
|
16
|
+
onLuzmoDashboardGenerated: EventName<CustomEvent>;
|
|
17
|
+
onLuzmoResponseReceived: EventName<CustomEvent>;
|
|
18
|
+
onLuzmoConversationIdChanged: EventName<CustomEvent>;
|
|
19
19
|
}>;
|
|
20
20
|
/** The underlying custom element type for LuzmoAiChat */
|
|
21
21
|
export type LuzmoAiChatElement = LuzmoAiChatClass;
|
|
@@ -6,21 +6,21 @@ const LuzmoAiChatComponent = createComponent({
|
|
|
6
6
|
elementClass: LuzmoAiChatClass,
|
|
7
7
|
react: React,
|
|
8
8
|
events: {
|
|
9
|
-
onLuzmoResponseReceived: 'luzmo-response-received',
|
|
10
|
-
onLuzmoChartGenerated: 'luzmo-chart-generated',
|
|
11
9
|
onLuzmoMessageSent: 'luzmo-message-sent',
|
|
12
|
-
onLuzmoRestoreRequested: 'luzmo-restore-requested',
|
|
13
10
|
onLuzmoDatasetsChanged: 'luzmo-datasets-changed',
|
|
14
|
-
|
|
11
|
+
onLuzmoChartGenerated: 'luzmo-chart-generated',
|
|
12
|
+
onLuzmoDashboardGenerated: 'luzmo-dashboard-generated',
|
|
13
|
+
onLuzmoResponseReceived: 'luzmo-response-received',
|
|
14
|
+
onLuzmoConversationIdChanged: 'luzmo-conversation-id-changed'
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
17
|
/**
|
|
18
18
|
* React wrapper for <luzmo-ai-chat>
|
|
19
19
|
*
|
|
20
|
-
* @event onLuzmoResponseReceived - Fired when an AI text response is received. For chart responses, this event is only fired if the response includes a `message` field. For error responses, this event is always fired with the error explanation.
|
|
21
|
-
* @event onLuzmoChartGenerated - Fired when the AI generates a chart (includes generatedChart in response)
|
|
22
20
|
* @event onLuzmoMessageSent - Fired when a user sends a message
|
|
23
|
-
* @event
|
|
24
|
-
* @event
|
|
21
|
+
* @event onLuzmoChartGenerated - Fired when agent is `item` and a chart asset is ready
|
|
22
|
+
* @event onLuzmoDashboardGenerated - Fired when agent is `dashboard` and a dashboard asset is ready
|
|
23
|
+
* @event onLuzmoResponseReceived - Fired when an AI text response is received. For chart responses, this event is only fired if the response includes a `message` field. For error responses, this event is always fired with the error explanation.
|
|
24
|
+
* @event onLuzmoConversationIdChanged - Fired when the conversation ID is updated from the API
|
|
25
25
|
*/
|
|
26
26
|
export const LuzmoAiChat = LuzmoAiChatComponent;
|
package/types/ai-chat.types.d.ts
CHANGED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import type { Dataset, LuzmoChart } from '../../types';
|
|
2
|
-
export interface AiMessageRequestBody {
|
|
3
|
-
key: string;
|
|
4
|
-
token: string;
|
|
5
|
-
action: 'create';
|
|
6
|
-
version: string;
|
|
7
|
-
properties: {
|
|
8
|
-
content: {
|
|
9
|
-
role: 'user';
|
|
10
|
-
content: string;
|
|
11
|
-
};
|
|
12
|
-
conversation_id?: string;
|
|
13
|
-
};
|
|
14
|
-
options: {
|
|
15
|
-
available_datasets: string[];
|
|
16
|
-
dataset_id?: string;
|
|
17
|
-
chart?: Record<string, unknown>;
|
|
18
|
-
model_preference: 'performance' | 'quality';
|
|
19
|
-
stream?: boolean;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
export interface AiMessageDeleteRequestBody {
|
|
23
|
-
key: string;
|
|
24
|
-
token: string;
|
|
25
|
-
action: 'delete';
|
|
26
|
-
version: string;
|
|
27
|
-
properties: {
|
|
28
|
-
restore_to_message_id: string;
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
export interface BuildAiMessageRequestOptions {
|
|
32
|
-
prompt: string;
|
|
33
|
-
datasetIds: string[];
|
|
34
|
-
authKey: string;
|
|
35
|
-
authToken: string;
|
|
36
|
-
conversationId: string | null;
|
|
37
|
-
chart: LuzmoChart | null;
|
|
38
|
-
modelPreference: 'performance' | 'quality';
|
|
39
|
-
apiVersion?: string;
|
|
40
|
-
stream?: boolean;
|
|
41
|
-
}
|
|
42
|
-
export interface LuzmoPromptSubmittedEventDetail {
|
|
43
|
-
prompt: string;
|
|
44
|
-
selectedDatasets: Dataset[];
|
|
45
|
-
datasetIds: string[];
|
|
46
|
-
request: AiMessageRequestBody;
|
|
47
|
-
url: string;
|
|
48
|
-
}
|
|
49
|
-
export interface LuzmoRestoreRequestedEventDetail {
|
|
50
|
-
apiMessageId: string;
|
|
51
|
-
messageIndex: number;
|
|
52
|
-
request: AiMessageDeleteRequestBody;
|
|
53
|
-
url: string;
|
|
54
|
-
}
|
|
55
|
-
export declare function buildAiMessageRequest(options: BuildAiMessageRequestOptions): AiMessageRequestBody;
|
|
56
|
-
export declare function buildAiMessageDeleteRequest(restoreToMessageId: string, authKey: string, authToken: string, apiVersion?: string): AiMessageDeleteRequestBody;
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
/*! * A kit of modern Luzmo Web Components for analytics in your web application.
|
|
2
|
-
*
|
|
3
|
-
* Copyright © 2026 Luzmo
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
* Luzmo web components (“Luzmo Web Components”)
|
|
6
|
-
* must be used according to the Luzmo Terms of Service.
|
|
7
|
-
* This license allows users with a current active Luzmo account
|
|
8
|
-
* to use the Luzmo Web Components. This license terminates
|
|
9
|
-
* automatically if a user no longer has an active Luzmo account.
|
|
10
|
-
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
|
11
|
-
*
|
|
12
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
13
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
14
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
15
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
16
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
17
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
|
-
* SOFTWARE.
|
|
19
|
-
* */
|
|
20
|
-
require(`./chunk-i8uDWG73.cjs`);const e=require(`./base-CbpjVnVy.cjs`),t=require(`./decorate-BfLyr4NV.cjs`);require(`./ai-interaction-textarea-CogE101T.cjs`);let n=require(`@lit/localize/lit-localize`),r=require(`@luzmo/icons`);require(`@luzmo/lucero/chat-message`),require(`@luzmo/lucero/overlay`),require(`@luzmo/lucero/popover`),require(`@luzmo/lucero/progress-steps`);let i=require(`lit`),a=require(`lit/decorators.js`),o=require(`lit/directives/unsafe-html.js`);var{entries:s,setPrototypeOf:c,isFrozen:l,getPrototypeOf:u,getOwnPropertyDescriptor:d}=Object,{freeze:f,seal:p,create:ee}=Object,{apply:te,construct:m}=typeof Reflect<`u`&&Reflect;f||=function(e){return e},p||=function(e){return e},te||=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)},m||=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)};var h=x(Array.prototype.forEach),ne=x(Array.prototype.lastIndexOf),re=x(Array.prototype.pop),g=x(Array.prototype.push),ie=x(Array.prototype.splice),ae=x(String.prototype.toLowerCase),oe=x(String.prototype.toString),se=x(String.prototype.match),_=x(String.prototype.replace),ce=x(String.prototype.indexOf),le=x(String.prototype.trim),v=x(Object.prototype.hasOwnProperty),y=x(RegExp.prototype.test),b=ue(TypeError);function x(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return te(e,t,r)}}function ue(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return m(e,n)}}function S(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ae;c&&c(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(l(t)||(t[r]=e),i=e)}e[i]=!0}return e}function de(e){for(let t=0;t<e.length;t++)v(e,t)||(e[t]=null);return e}function C(e){let t=ee(null);for(let[n,r]of s(e))v(e,n)&&(Array.isArray(r)?t[n]=de(r):r&&typeof r==`object`&&r.constructor===Object?t[n]=C(r):t[n]=r);return t}function w(e,t){for(;e!==null;){let n=d(e,t);if(n){if(n.get)return x(n.get);if(typeof n.value==`function`)return x(n.value)}e=u(e)}function n(){return null}return n}var fe=f(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),pe=f(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),me=f([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),he=f([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),ge=f(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),_e=f([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),ve=f([`#text`]),ye=f(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns.slot`.split(`.`)),be=f(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),xe=f(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Se=f([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),Ce=p(/\{\{[\w\W]*|[\w\W]*\}\}/gm),we=p(/<%[\w\W]*|[\w\W]*%>/gm),T=p(/\$\{[\w\W]*/gm),E=p(/^data-[\-\w.\u00B7-\uFFFF]+$/),D=p(/^aria-[\-\w]+$/),Te=p(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ee=p(/^(?:\w+script|data):/i),De=p(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Oe=p(/^html$/i),ke=p(/^[a-z][.\w]*(-[.\w]+)+$/i),Ae=Object.freeze({__proto__:null,ARIA_ATTR:D,ATTR_WHITESPACE:De,CUSTOM_ELEMENT:ke,DATA_ATTR:E,DOCTYPE_NAME:Oe,ERB_EXPR:we,IS_ALLOWED_URI:Te,IS_SCRIPT_OR_DATA:Ee,MUSTACHE_EXPR:Ce,TMPLIT_EXPR:T}),O={element:1,text:3,progressingInstruction:7,comment:8,document:9},je=function(){return typeof window>`u`?null:window},Me=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},Ne=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Pe(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:je(),t=e=>Pe(e);if(t.version=`3.4.0`,t.removed=[],!e||!e.document||e.document.nodeType!==O.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,r=n,i=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:c,Element:l,NodeFilter:u,NamedNodeMap:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:p,DOMParser:te,trustedTypes:m}=e,x=l.prototype,ue=w(x,`cloneNode`),de=w(x,`remove`),Ce=w(x,`nextSibling`),we=w(x,`childNodes`),T=w(x,`parentNode`);if(typeof o==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let E,D=``,{implementation:Ee,createNodeIterator:De,createDocumentFragment:ke,getElementsByTagName:Fe}=n,{importNode:Ie}=r,k=Ne();t.isSupported=typeof s==`function`&&typeof T==`function`&&Ee&&Ee.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:A,ERB_EXPR:j,TMPLIT_EXPR:M,DATA_ATTR:Le,ARIA_ATTR:Re,IS_SCRIPT_OR_DATA:N,ATTR_WHITESPACE:ze,CUSTOM_ELEMENT:Be}=Ae,{IS_ALLOWED_URI:Ve}=Ae,P=null,He=S({},[...fe,...pe,...me,...ge,...ve]),F=null,Ue=S({},[...ye,...be,...xe,...Se]),I=Object.seal(ee(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),L=null,We=null,R=Object.seal(ee(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Ge=!0,Ke=!0,qe=!1,Je=!0,z=!1,B=!0,V=!1,Ye=!1,Xe=!1,H=!1,Ze=!1,Qe=!1,$e=!0,et=!1,tt=!0,U=!1,W={},G=null,nt=S({},[`annotation-xml`,`audio`,`colgroup`,`desc`,`foreignobject`,`head`,`iframe`,`math`,`mi`,`mn`,`mo`,`ms`,`mtext`,`noembed`,`noframes`,`noscript`,`plaintext`,`script`,`style`,`svg`,`template`,`thead`,`title`,`video`,`xmp`]),rt=null,it=S({},[`audio`,`video`,`img`,`source`,`image`,`track`]),at=null,ot=S({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),st=`http://www.w3.org/1998/Math/MathML`,ct=`http://www.w3.org/2000/svg`,K=`http://www.w3.org/1999/xhtml`,q=K,lt=!1,ut=null,dt=S({},[st,ct,K],oe),ft=S({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),pt=S({},[`annotation-xml`]),mt=S({},[`title`,`style`,`font`,`a`,`script`]),J=null,ht=[`application/xhtml+xml`,`text/html`],Y=null,X=null,gt=n.createElement(`form`),_t=function(e){return e instanceof RegExp||e instanceof Function},vt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(X&&X===e)){if((!e||typeof e!=`object`)&&(e={}),e=C(e),J=ht.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,Y=J===`application/xhtml+xml`?oe:ae,P=v(e,`ALLOWED_TAGS`)?S({},e.ALLOWED_TAGS,Y):He,F=v(e,`ALLOWED_ATTR`)?S({},e.ALLOWED_ATTR,Y):Ue,ut=v(e,`ALLOWED_NAMESPACES`)?S({},e.ALLOWED_NAMESPACES,oe):dt,at=v(e,`ADD_URI_SAFE_ATTR`)?S(C(ot),e.ADD_URI_SAFE_ATTR,Y):ot,rt=v(e,`ADD_DATA_URI_TAGS`)?S(C(it),e.ADD_DATA_URI_TAGS,Y):it,G=v(e,`FORBID_CONTENTS`)?S({},e.FORBID_CONTENTS,Y):nt,L=v(e,`FORBID_TAGS`)?S({},e.FORBID_TAGS,Y):C({}),We=v(e,`FORBID_ATTR`)?S({},e.FORBID_ATTR,Y):C({}),W=v(e,`USE_PROFILES`)?e.USE_PROFILES:!1,Ge=e.ALLOW_ARIA_ATTR!==!1,Ke=e.ALLOW_DATA_ATTR!==!1,qe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Je=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,z=e.SAFE_FOR_TEMPLATES||!1,B=e.SAFE_FOR_XML!==!1,V=e.WHOLE_DOCUMENT||!1,H=e.RETURN_DOM||!1,Ze=e.RETURN_DOM_FRAGMENT||!1,Qe=e.RETURN_TRUSTED_TYPE||!1,Xe=e.FORCE_BODY||!1,$e=e.SANITIZE_DOM!==!1,et=e.SANITIZE_NAMED_PROPS||!1,tt=e.KEEP_CONTENT!==!1,U=e.IN_PLACE||!1,Ve=e.ALLOWED_URI_REGEXP||Te,q=e.NAMESPACE||K,ft=e.MATHML_TEXT_INTEGRATION_POINTS||ft,pt=e.HTML_INTEGRATION_POINTS||pt,I=e.CUSTOM_ELEMENT_HANDLING||ee(null),e.CUSTOM_ELEMENT_HANDLING&&_t(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(I.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&_t(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(I.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==`boolean`&&(I.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),z&&(Ke=!1),Ze&&(H=!0),W&&(P=S({},ve),F=ee(null),W.html===!0&&(S(P,fe),S(F,ye)),W.svg===!0&&(S(P,pe),S(F,be),S(F,Se)),W.svgFilters===!0&&(S(P,me),S(F,be),S(F,Se)),W.mathMl===!0&&(S(P,ge),S(F,xe),S(F,Se))),R.tagCheck=null,R.attributeCheck=null,e.ADD_TAGS&&(typeof e.ADD_TAGS==`function`?R.tagCheck=e.ADD_TAGS:(P===He&&(P=C(P)),S(P,e.ADD_TAGS,Y))),e.ADD_ATTR&&(typeof e.ADD_ATTR==`function`?R.attributeCheck=e.ADD_ATTR:(F===Ue&&(F=C(F)),S(F,e.ADD_ATTR,Y))),e.ADD_URI_SAFE_ATTR&&S(at,e.ADD_URI_SAFE_ATTR,Y),e.FORBID_CONTENTS&&(G===nt&&(G=C(G)),S(G,e.FORBID_CONTENTS,Y)),e.ADD_FORBID_CONTENTS&&(G===nt&&(G=C(G)),S(G,e.ADD_FORBID_CONTENTS,Y)),tt&&(P[`#text`]=!0),V&&S(P,[`html`,`head`,`body`]),P.table&&(S(P,[`tbody`]),delete L.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw b(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw b(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);E=e.TRUSTED_TYPES_POLICY,D=E.createHTML(``)}else E===void 0&&(E=Me(m,i)),E!==null&&typeof D==`string`&&(D=E.createHTML(``));f&&f(e),X=e}},yt=S({},[...pe,...me,...he]),bt=S({},[...ge,..._e]),xt=function(e){let t=T(e);(!t||!t.tagName)&&(t={namespaceURI:q,tagName:`template`});let n=ae(e.tagName),r=ae(t.tagName);return ut[e.namespaceURI]?e.namespaceURI===ct?t.namespaceURI===K?n===`svg`:t.namespaceURI===st?n===`svg`&&(r===`annotation-xml`||ft[r]):!!yt[n]:e.namespaceURI===st?t.namespaceURI===K?n===`math`:t.namespaceURI===ct?n===`math`&&pt[r]:!!bt[n]:e.namespaceURI===K?t.namespaceURI===ct&&!pt[r]||t.namespaceURI===st&&!ft[r]?!1:!bt[n]&&(mt[n]||!yt[n]):!!(J===`application/xhtml+xml`&&ut[e.namespaceURI]):!1},Z=function(e){g(t.removed,{element:e});try{T(e).removeChild(e)}catch{de(e)}},Q=function(e,n){try{g(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{g(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(H||Ze)try{Z(n)}catch{}else try{n.setAttribute(e,``)}catch{}},St=function(e){let t=null,r=null;if(Xe)e=`<remove></remove>`+e;else{let t=se(e,/^[\r\n\t ]+/);r=t&&t[0]}J===`application/xhtml+xml`&&q===K&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=E?E.createHTML(e):e;if(q===K)try{t=new te().parseFromString(i,J)}catch{}if(!t||!t.documentElement){t=Ee.createDocument(q,`template`,null);try{t.documentElement.innerHTML=lt?D:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),q===K?Fe.call(t,V?`html`:`body`)[0]:V?t.documentElement:a},Ct=function(e){return De.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},wt=function(e){return e instanceof p&&(typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||!(e.attributes instanceof d)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`)},Tt=function(e){return typeof c==`function`&&e instanceof c};function $(e,n,r){h(e,e=>{e.call(t,n,r,X)})}let Et=function(e){let n=null;if($(k.beforeSanitizeElements,e,null),wt(e))return Z(e),!0;let r=Y(e.nodeName);if($(k.uponSanitizeElement,e,{tagName:r,allowedTags:P}),B&&e.hasChildNodes()&&!Tt(e.firstElementChild)&&y(/<[/\w!]/g,e.innerHTML)&&y(/<[/\w!]/g,e.textContent)||B&&e.namespaceURI===K&&r===`style`&&Tt(e.firstElementChild)||e.nodeType===O.progressingInstruction||B&&e.nodeType===O.comment&&y(/<[/\w]/g,e.data))return Z(e),!0;if(L[r]||!(R.tagCheck instanceof Function&&R.tagCheck(r))&&!P[r]){if(!L[r]&&Ot(r)&&(I.tagNameCheck instanceof RegExp&&y(I.tagNameCheck,r)||I.tagNameCheck instanceof Function&&I.tagNameCheck(r)))return!1;if(tt&&!G[r]){let t=T(e)||e.parentNode,n=we(e)||e.childNodes;if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=ue(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,Ce(e))}}}return Z(e),!0}return e instanceof l&&!xt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&y(/<\/no(script|embed|frames)/i,e.innerHTML)?(Z(e),!0):(z&&e.nodeType===O.text&&(n=e.textContent,h([A,j,M],e=>{n=_(n,e,` `)}),e.textContent!==n&&(g(t.removed,{element:e.cloneNode()}),e.textContent=n)),$(k.afterSanitizeElements,e,null),!1)},Dt=function(e,t,r){if(We[t]||$e&&(t===`id`||t===`name`)&&(r in n||r in gt))return!1;if(!(Ke&&!We[t]&&y(Le,t))&&!(Ge&&y(Re,t))&&!(R.attributeCheck instanceof Function&&R.attributeCheck(t,e))){if(!F[t]||We[t]){if(!(Ot(e)&&(I.tagNameCheck instanceof RegExp&&y(I.tagNameCheck,e)||I.tagNameCheck instanceof Function&&I.tagNameCheck(e))&&(I.attributeNameCheck instanceof RegExp&&y(I.attributeNameCheck,t)||I.attributeNameCheck instanceof Function&&I.attributeNameCheck(t,e))||t===`is`&&I.allowCustomizedBuiltInElements&&(I.tagNameCheck instanceof RegExp&&y(I.tagNameCheck,r)||I.tagNameCheck instanceof Function&&I.tagNameCheck(r))))return!1}else if(!at[t]&&!y(Ve,_(r,ze,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&ce(r,`data:`)===0&&rt[e])&&!(qe&&!y(N,_(r,ze,``)))&&r)return!1}return!0},Ot=function(e){return e!==`annotation-xml`&&se(e,Be)},kt=function(e){$(k.beforeSanitizeAttributes,e,null);let{attributes:n}=e;if(!n||wt(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0},i=n.length;for(;i--;){let{name:a,namespaceURI:o,value:s}=n[i],c=Y(a),l=s,u=a===`value`?l:le(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,$(k.uponSanitizeAttribute,e,r),u=r.attrValue,et&&(c===`id`||c===`name`)&&(Q(a,e),u=`user-content-`+u),B&&y(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)){Q(a,e);continue}if(c===`attributename`&&se(u,`href`)){Q(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){Q(a,e);continue}if(!Je&&y(/\/>/i,u)){Q(a,e);continue}z&&h([A,j,M],e=>{u=_(u,e,` `)});let d=Y(e.nodeName);if(!Dt(d,c,u)){Q(a,e);continue}if(E&&typeof m==`object`&&typeof m.getAttributeType==`function`&&!o)switch(m.getAttributeType(d,c)){case`TrustedHTML`:u=E.createHTML(u);break;case`TrustedScriptURL`:u=E.createScriptURL(u);break}if(u!==l)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),wt(e)?Z(e):re(t.removed)}catch{Q(a,e)}}$(k.afterSanitizeAttributes,e,null)},At=function(e){let t=null,n=Ct(e);for($(k.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)$(k.uponSanitizeShadowNode,t,null),Et(t),kt(t),t.content instanceof a&&At(t.content);$(k.afterSanitizeShadowDOM,e,null)};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,o=null,s=null,l=null;if(lt=!e,lt&&(e=`<!-->`),typeof e!=`string`&&!Tt(e))if(typeof e.toString==`function`){if(e=e.toString(),typeof e!=`string`)throw b(`dirty is not a string, aborting`)}else throw b(`toString is not a function`);if(!t.isSupported)return e;if(Ye||vt(n),t.removed=[],typeof e==`string`&&(U=!1),U){if(e.nodeName){let t=Y(e.nodeName);if(!P[t]||L[t])throw b(`root node is forbidden and cannot be sanitized in-place`)}}else if(e instanceof c)i=St(`<!---->`),o=i.ownerDocument.importNode(e,!0),o.nodeType===O.element&&o.nodeName===`BODY`||o.nodeName===`HTML`?i=o:i.appendChild(o);else{if(!H&&!z&&!V&&e.indexOf(`<`)===-1)return E&&Qe?E.createHTML(e):e;if(i=St(e),!i)return H?null:Qe?D:``}i&&Xe&&Z(i.firstChild);let u=Ct(U?e:i);for(;s=u.nextNode();)Et(s),kt(s),s.content instanceof a&&At(s.content);if(U)return e;if(H){if(z){i.normalize();let e=i.innerHTML;h([A,j,M],t=>{e=_(e,t,` `)}),i.innerHTML=e}if(Ze)for(l=ke.call(i.ownerDocument);i.firstChild;)l.appendChild(i.firstChild);else l=i;return(F.shadowroot||F.shadowrootmode)&&(l=Ie.call(r,l,!0)),l}let d=V?i.outerHTML:i.innerHTML;return V&&P[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&y(Oe,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
21
|
-
`+d),z&&h([A,j,M],e=>{d=_(d,e,` `)}),E&&Qe?E.createHTML(d):d},t.setConfig=function(){vt(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),Ye=!0},t.clearConfig=function(){X=null,Ye=!1},t.isValidAttribute=function(e,t,n){return X||vt({}),Dt(Y(e),Y(t),n)},t.addHook=function(e,t){typeof t==`function`&&g(k[e],t)},t.removeHook=function(e,t){if(t!==void 0){let n=ne(k[e],t);return n===-1?void 0:ie(k[e],n,1)[0]}return re(k[e])},t.removeHooks=function(e){k[e]=[]},t.removeAllHooks=function(){k=Ne()},t}var Fe=Pe();function Ie(){return{id:`root`,step:`root`,status:`pending`,children:[{id:`client-init`,step:`iqInit`,status:`inProgress`,description:`Thinking`}]}}function k(e){let t=e.progress;return typeof t!=`object`||!t?!1:`id`in t&&`step`in t&&`status`in t}async function A(e){let t=await fetch(e.url,{method:`POST`,headers:{"Content-Type":`application/json`},mode:`cors`,body:JSON.stringify(e.body),signal:e.signal});if(!t.ok){let e=await t.json().catch(()=>null);throw Error(e?.message||`API request failed with status ${t.status}`)}if(!t.body)throw Error(`Response body is not readable`);return{body:t.body,conversationId:t.headers.get(`x-conversation-id`)}}async function j(e,t){let n=e.getReader(),r=new TextDecoder,i=``;try{for(;;){let{done:e,value:a}=await n.read();if(e)break;i+=r.decode(a,{stream:!0});let o=i.split(`
|
|
22
|
-
`);i=o.pop()??``;for(let e of o)if(e.trim())try{t(JSON.parse(e))}catch{console.error(`Failed to parse NDJSON line:`,e)}}if(i+=r.decode(),i.trim())try{t(JSON.parse(i))}catch{console.error(`Failed to parse final NDJSON buffer:`,i)}}finally{n.releaseLock()}}var M=`:host{box-sizing:border-box;flex-direction:column;width:100%;height:100%;display:flex}:host .chat-container{background:var(--luzmo-ai-chat-background,var(--ai-chat-background));border-radius:var(--luzmo-ai-chat-border-radius,var(--ai-chat-border-radius));width:100%;height:100%;min-height:0;padding:var(--luzmo-ai-chat-padding,var(--ai-chat-padding));gap:var(--luzmo-ai-chat-gap,var(--ai-chat-gap));border:var(--luzmo-ai-chat-border,var(--ai-chat-border));box-shadow:var(--luzmo-ai-chat-box-shadow,var(--ai-chat-box-shadow));box-sizing:border-box;flex-direction:column;flex:1;display:flex;overflow:hidden}:host .chat-messages-container{gap:var(--luzmo-ai-chat-gap,var(--ai-chat-gap));flex-direction:column;flex:1;min-height:0;display:flex;overflow:auto}:host .chat-messages-container::-webkit-scrollbar{width:var(--luzmo-ai-chat-scrollbar-width,var(--ai-chat-scrollbar-width))}:host .chat-messages-container::-webkit-scrollbar-track{background:var(--luzmo-ai-chat-scrollbar-track-background,var(--ai-chat-scrollbar-track-background));border-radius:var(--luzmo-ai-chat-scrollbar-track-border-radius,var(--ai-chat-scrollbar-track-border-radius))}:host .chat-messages-container::-webkit-scrollbar-thumb{background:var(--luzmo-ai-chat-scrollbar-thumb-background,var(--ai-chat-scrollbar-thumb-background));border-radius:var(--luzmo-ai-chat-scrollbar-thumb-border-radius,var(--ai-chat-scrollbar-thumb-border-radius))}:host .chat-messages-container::-webkit-scrollbar-thumb:hover{background:var(--luzmo-ai-chat-scrollbar-thumb-hover-background,var(--ai-chat-scrollbar-thumb-hover-background))}:host .chat-messages-container{scrollbar-width:var(--luzmo-scrollbar-width,thin);scrollbar-color:var(--luzmo-ai-chat-scrollbar-thumb-background,var(--ai-chat-scrollbar-thumb-background)) var(--luzmo-ai-chat-scrollbar-track-background,var(--ai-chat-scrollbar-track-background))}:host luzmo-chat-message{--luzmo-primary:rgba(var(--luzmo-primary-rgb), .08);--chat-message-primary-text-color:var(--luzmo-font-color);--chat-message-primary-border-color:transparent}:host luzmo-chat-message.error{color:var(--luzmo-ai-chat-error-message-color,var(--ai-chat-error-message-color))}:host .assistant-message-wrapper{justify-content:space-between;align-items:flex-start;gap:1rem;display:flex}:host .assistant-message-wrapper luzmo-chat-message{width:fit-content;display:contents}:host .assistant-context-menu-trigger{width:var(--luzmo-ai-chat-context-menu-trigger-size,var(--ai-chat-context-menu-trigger-size));height:var(--luzmo-ai-chat-context-menu-trigger-size,var(--ai-chat-context-menu-trigger-size));border:.0625rem solid var(--luzmo-ai-chat-context-menu-trigger-border-color,var(--ai-chat-context-menu-trigger-border-color));border-radius:var(--luzmo-ai-chat-context-menu-trigger-border-radius,var(--ai-chat-context-menu-trigger-border-radius));background:var(--luzmo-ai-chat-context-menu-trigger-background,var(--ai-chat-context-menu-trigger-background));color:var(--luzmo-ai-chat-context-menu-trigger-color,var(--ai-chat-context-menu-trigger-color));cursor:pointer;justify-content:center;align-items:center;padding:0;font-size:.875rem;line-height:1;transition:all .15s;display:inline-flex}:host .assistant-context-menu-trigger:hover{background:var(--luzmo-ai-chat-context-menu-trigger-hover-background,var(--ai-chat-context-menu-trigger-hover-background));border-color:var(--luzmo-ai-chat-context-menu-trigger-hover-border-color,var(--ai-chat-context-menu-trigger-hover-border-color));color:var(--luzmo-ai-chat-context-menu-trigger-hover-color,var(--ai-chat-context-menu-trigger-hover-color))}:host .assistant-context-menu-trigger:disabled{cursor:not-allowed;opacity:.6}:host .assistant-context-menu-trigger:disabled:hover{background:var(--luzmo-ai-chat-context-menu-trigger-background,var(--ai-chat-context-menu-trigger-background));border-color:var(--luzmo-ai-chat-context-menu-trigger-border-color,var(--ai-chat-context-menu-trigger-border-color));color:var(--luzmo-ai-chat-context-menu-trigger-color,var(--ai-chat-context-menu-trigger-color))}:host .assistant-context-menu-item{width:100%;color:var(--luzmo-font-color);text-align:start;cursor:pointer;font-family:var(--luzmo-ai-chat-context-menu-item-font-family,var(--ai-chat-context-menu-item-font-family));background:0 0;border:0;padding:.5rem .75rem}:host .assistant-context-menu-item:hover{background:var(--luzmo-ai-chat-context-menu-item-hover-background,var(--ai-chat-context-menu-item-hover-background))}:host .assistant-context-menu-item:disabled{opacity:.4;cursor:not-allowed}:host .assistant-context-menu-item:disabled:hover{background:0 0}:host luzmo-ai-interaction-textarea{flex-grow:0;flex-shrink:0}:host luzmo-progress-steps{padding:0 .25rem}:host .loading-message{color:var(--luzmo-font-color);align-items:center;gap:.5rem;display:flex}:host .loading-message svg{color:var(--luzmo-ai-chat-loading-message-color,var(--ai-chat-loading-message-color));font-size:var(--luzmo-ai-chat-loading-message-icon-font-size,var(--ai-chat-loading-message-icon-font-size,1rem));justify-content:center;align-items:center;display:flex}:host .loading-message svg.spin{animation:1s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){:host .assistant-context-menu-trigger{transition:none}:host .loading-message svg.spin{animation:none}}:host{--ai-chat-background:var(--luzmo-background-color);--ai-chat-border-radius:0;--ai-chat-padding:0;--ai-chat-gap:1rem;--ai-chat-border:none;--ai-chat-box-shadow:none;--ai-chat-loading-message-color:var(--luzmo-primary);--ai-chat-loading-message-icon-font-size:1rem;--ai-chat-error-message-color:var(--luzmo-danger,#dc3545);--ai-chat-scrollbar-width:var(--luzmo-scrollbar-size);--ai-chat-scrollbar-track-background:var(--luzmo-scrollbar-track-background);--ai-chat-scrollbar-track-border-radius:var(--luzmo-scrollbar-track-border-radius);--ai-chat-scrollbar-thumb-background:var(--luzmo-scrollbar-thumb-background);--ai-chat-scrollbar-thumb-border-radius:var(--luzmo-scrollbar-thumb-border-radius);--ai-chat-scrollbar-thumb-hover-background:var(--luzmo-scrollbar-thumb-hover-background);--ai-chat-context-menu-trigger-size:1.5rem;--ai-chat-context-menu-trigger-border-color:var(--luzmo-border-color);--ai-chat-context-menu-trigger-border-radius:.375rem;--ai-chat-context-menu-trigger-background:var(--luzmo-background-color,transparent);--ai-chat-context-menu-trigger-color:var(--luzmo-font-color,#5a5a5a);--ai-chat-context-menu-trigger-hover-background:var(--luzmo-background-color-hover,#4434ff14);--ai-chat-context-menu-trigger-hover-border-color:var(--luzmo-border-color-hover,var(--luzmo-border-color));--ai-chat-context-menu-trigger-hover-color:var(--luzmo-font-color,#5a5a5a);--ai-chat-context-menu-item-hover-background:var(--luzmo-background-color-hover,#4434ff14);--ai-chat-context-menu-item-font-family:var(--luzmo-font-family)}`;function Le(e){let{prompt:t,datasetIds:n,authKey:r,authToken:i,conversationId:a,chart:o,modelPreference:s,apiVersion:c=`0.1.0`,stream:l=!0}=e;return{key:r,token:i,action:`create`,version:c,properties:{content:{role:`user`,content:t},...a?{conversation_id:a}:{}},options:{available_datasets:n,stream:l,...n.length>0?{dataset_id:n[0]}:{},...o&&o.type!==`placeholder`?{chart:{...o,version:o.version||``,title:o.title||o.options.title,filters:o.filterGroups||[],aichartId:o.aichartId||``}}:{},model_preference:s}}}function Re(e,t,n,r=`0.1.0`){return{key:t,token:n,action:`delete`,version:r,properties:{restore_to_message_id:e}}}var N=class extends e.i{constructor(...e){super(...e),this.messages=[],this.selectedDatasets=[],this.placeholder=`Describe your change`,this.disabled=!1,this.showAssistantContextMenu=!1,this.authKey=``,this.authToken=``,this.apiUrl=`https://api.luzmo.com`,this.appServer=`https://app.luzmo.com`,this.flagOpendata=!1,this.hideDatasetButton=!1,this.hideDatasetIcons=!1,this.disableDatasetModification=!1,this.hideSelectedDatasets=!1,this.disableColumnMentions=!1,this.requireDataset=!1,this.modelPreference=`performance`,this.requestMode=`internal`,this.isGenerating=!1,this.conversationId=null,this.chart=null,this.apiVersion=`0.1.0`,this.stream=!0,this.loadingMessage=null,this.initialPrompt=null,this.progress=null,this.progressCollapsed=!1,this._progress=null,this._progressCollapsed=!1,this._isGeneratingInternal=!1,this._textareaValue=``,this._abortController=null,this._inflightAiMessage=null,this._lastProcessedInitialPrompt=null,this._receivedProgress=!1}static{this.styles=(0,i.unsafeCSS)(M)}static{this.tagName=`luzmo-ai-chat`}_generateMessageId(){return`msg-${Date.now()}-${Math.random().toString(36).slice(2,9)}`}_buildRequestBody(e,t){return Le({prompt:e,datasetIds:t,authKey:this.authKey,authToken:this.authToken,conversationId:this.conversationId,chart:this.chart,modelPreference:this.modelPreference,apiVersion:this.apiVersion,stream:this.stream})}_buildDeleteRequestBody(e){return Re(e,this.authKey,this.authToken,this.apiVersion)}_finalizeInflightMessage(){this._inflightAiMessage&&=(this._progress&&this._receivedProgress&&(this._inflightAiMessage.progress=structuredClone(this._progress),this._updateMessage(this._inflightAiMessage)),this._progress=null,this._progressCollapsed=!1,this._receivedProgress=!1,null)}async _sendStreamingMessage(e,t){this._abortController&&(this._abortController.abort(),this._inflightAiMessage&&!this._inflightAiMessage.message&&(this.messages=this.messages.filter(e=>e.id!==this._inflightAiMessage.id))),this._finalizeInflightMessage(),this._inflightAiMessage=t;let n=new AbortController;this._abortController=n,this._progress=Ie(),this._progressCollapsed=!1,this._receivedProgress=!1;let r=!1;try{let{body:i,conversationId:a}=await A({url:`${this.apiUrl}/${this.apiVersion}/aimessagedeprecated`,body:e,signal:n.signal});a&&(this.conversationId=a),await j(i,e=>this._processStreamChunk(e,t)),r=!0}finally{this._abortController===n&&(r?this._finalizeInflightMessage():this._inflightAiMessage=null,this._isGeneratingInternal=!1,this._abortController=null)}}_processStreamChunk(e,t){if(k(e)&&(this._receivedProgress=!0,this._progress=e.progress),e.error){t.message=(0,n.msg)(`Something went wrong. Please try again.`,{desc:`Generic error message shown in ai chat when the API request fails`}),t.isError=!0,this._updateMessage(t),this._progress=null,this._progressCollapsed=!1,this.dispatchEvent(new CustomEvent(`luzmo-response-received`,{detail:{message:t,done:!0},bubbles:!0,composed:!0}));return}let r=e.chart??e.generatedChart;if(r){t.hasChart=!0,typeof e.messageId==`string`&&(t.apiMessageId=e.messageId);let n={...e,generatedChart:r,conversationId:this.conversationId};this.dispatchEvent(new CustomEvent(`luzmo-chart-generated`,{detail:{aiSampleChart:n},bubbles:!0,composed:!0}));let i=typeof e.chunk==`string`&&e.chunk||typeof e.message==`string`&&e.message;i&&(t.message=(t.message||``)+i),this._updateMessage(t),(e.done||`question`in e)&&(this._progressCollapsed=!0,t.message&&this.dispatchEvent(new CustomEvent(`luzmo-response-received`,{detail:{message:t,done:!0},bubbles:!0,composed:!0})));return}let i=typeof e.chunk==`string`&&e.chunk||typeof e.message==`string`&&e.message||``;i&&(this._progressCollapsed||=!0,t.message=(t.message||``)+i,this._updateMessage(t));let a=e.done||`question`in e;a&&(this._progressCollapsed=!0),(i||a&&t.message)&&this.dispatchEvent(new CustomEvent(`luzmo-response-received`,{detail:{message:t,done:!!a},bubbles:!0,composed:!0}))}_addUserMessage(e,t){let n={id:this._generateMessageId(),type:`user`,message:e};this.messages=[...this.messages,n],this._textareaValue=``,this.dispatchEvent(new CustomEvent(`luzmo-message-sent`,{detail:{message:n,selectedDatasets:t},bubbles:!0,composed:!0}))}_updateMessage(e){this.messages=this.messages.map(t=>t.id===e.id?{...e}:t)}_truncateMessagesAfterRestore(e){e<0||e>=this.messages.length||(this.messages=this.messages.slice(0,e+1))}async _restoreInternal(e,t){let n=this._buildDeleteRequestBody(e),r=await fetch(`${this.apiUrl}/${this.apiVersion}/aimessagedeprecated`,{method:`POST`,headers:{"Content-Type":`application/json`},mode:`cors`,body:JSON.stringify(n)});if(!r.ok){let e=await r.json().catch(()=>null);throw Error(e?.message||`API request failed with status ${r.status}`)}let i=await r.json().catch(()=>null);if(this._truncateMessagesAfterRestore(t),i?.generatedChart&&this.dispatchEvent(new CustomEvent(`luzmo-chart-generated`,{detail:{aiSampleChart:i},bubbles:!0,composed:!0})),i?.message){let e=this.messages[t];e?.type===`ai`&&(e.message=i.message,this._updateMessage(e),this.dispatchEvent(new CustomEvent(`luzmo-response-received`,{detail:{message:e,done:!0},bubbles:!0,composed:!0})))}}async _handleRestoreState(e,t){if(e.apiMessageId){if(this.requestMode===`external`){let n=this._buildDeleteRequestBody(e.apiMessageId),r={apiMessageId:e.apiMessageId,messageIndex:t,request:n,url:`${this.apiUrl}/${this.apiVersion}/aimessagedeprecated`};this.dispatchEvent(new CustomEvent(`luzmo-restore-requested`,{detail:r,bubbles:!0,composed:!0}));return}try{this._isGeneratingInternal=!0,await this._restoreInternal(e.apiMessageId,t)}catch(e){this._handleAPIError(e)}finally{this._isGeneratingInternal=!1}}}_prepareForAIResponse(){this._isGeneratingInternal=!0;let e={id:this._generateMessageId(),type:`ai`,message:``};return this.messages=[...this.messages,e],e}_handleAPIError(e,t){console.error(`AI Chart Generation Error:`,e),this._progress=null,this._progressCollapsed=!1;let r=(0,n.msg)(`Something went wrong. Please try again.`,{desc:`Generic error message shown in ai chat when the API request fails`});if(t)t.message=r,t.isError=!0,delete t.progress,this._updateMessage(t);else{let e={id:this._generateMessageId(),type:`ai`,message:r,isError:!0};this.messages=[...this.messages,e],t=e}this.dispatchEvent(new CustomEvent(`luzmo-response-received`,{detail:{message:t,error:e},bubbles:!0,composed:!0}))}_handleDatasetSelected(e){let t=e.detail;this.selectedDatasets.some(e=>e.id===t.id)||(this.selectedDatasets=[...this.selectedDatasets,t],this._emitDatasetsChanged())}_handleDatasetRemoved(e){let t=e.detail;this.selectedDatasets=this.selectedDatasets.filter(e=>e.id!==t.id),this._emitDatasetsChanged()}_emitDatasetsChanged(){this.dispatchEvent(new CustomEvent(`luzmo-datasets-changed`,{detail:{selectedDatasets:this.selectedDatasets},bubbles:!0,composed:!0}))}_isDatasetRequirementMet(e){return!this.requireDataset||e.length>0}async _handlePromptSubmitted(e){let{prompt:t,selectedDatasets:n}=e.detail;if(!this._isDatasetRequirementMet(n))return;let r=n.map(e=>e.id),i=this._buildRequestBody(t,r);if(this._addUserMessage(t,n),this.requestMode===`external`){let e={prompt:t,selectedDatasets:n,datasetIds:r,request:i,url:`${this.apiUrl}/${this.apiVersion}/aimessagedeprecated`};this.dispatchEvent(new CustomEvent(`luzmo-prompt-submitted`,{detail:e,bubbles:!0,composed:!0}));return}let a=this._prepareForAIResponse();try{await this._sendStreamingMessage(i,a)}catch(e){e.name!==`AbortError`&&this._handleAPIError(e,a)}}async _processInitialPrompt(){if(!this.initialPrompt||this.initialPrompt===this._lastProcessedInitialPrompt||!this._isDatasetRequirementMet(this.selectedDatasets))return;this._lastProcessedInitialPrompt=this.initialPrompt;let e=this.selectedDatasets.map(e=>e.id),t=this._buildRequestBody(this.initialPrompt,e),n=`${this.apiUrl}/${this.apiVersion}/aimessagedeprecated`;if(this.requestMode===`external`){let r={prompt:this.initialPrompt,selectedDatasets:this.selectedDatasets,datasetIds:e,request:t,url:n};this.dispatchEvent(new CustomEvent(`luzmo-prompt-submitted`,{detail:r,bubbles:!0,composed:!0}));return}let r=this._prepareForAIResponse();try{await this._sendStreamingMessage(t,r)}catch(e){e.name!==`AbortError`&&this._handleAPIError(e,r)}}disconnectedCallback(){super.disconnectedCallback(),this._abortController?.abort(),this._abortController=null,this._finalizeInflightMessage(),this._isGeneratingInternal=!1}_scrollToBottom(){let e=this.shadowRoot?.querySelector(`.chat-messages-container`);e&&requestAnimationFrame(()=>{requestAnimationFrame(()=>{e.scrollTop=e.scrollHeight})})}updated(e){super.updated?.(e),(e.has(`messages`)||e.has(`_progress`)||e.has(`progress`))&&this.updateComplete.then(()=>this._scrollToBottom()),this.initialPrompt&&this.initialPrompt!==this._lastProcessedInitialPrompt?this._processInitialPrompt():this.initialPrompt||(this._lastProcessedInitialPrompt=null)}_sanitizeMessage(e){return Fe.sanitize(e,{ALLOWED_TAGS:[`p`,`br`,`strong`,`em`,`b`,`i`,`u`,`s`,`code`,`pre`,`blockquote`,`ul`,`ol`,`li`,`a`],ALLOWED_ATTR:[`href`,`title`,`target`,`rel`],ALLOW_DATA_ATTR:!1,FORBID_TAGS:[`script`,`iframe`,`object`,`embed`,`form`,`input`,`button`],FORBID_ATTR:[`onerror`,`onload`,`onclick`,`onmouseover`,`onfocus`,`onblur`]})}_renderProgress(){let e=this.requestMode===`external`?this.progress:this._progress,t=this.requestMode===`external`?this.progressCollapsed:this._progressCollapsed;return e?.children?.length?i.html`
|
|
23
|
-
<luzmo-progress-steps
|
|
24
|
-
.progress=${e}
|
|
25
|
-
?collapsed=${t}
|
|
26
|
-
size="s"
|
|
27
|
-
></luzmo-progress-steps>
|
|
28
|
-
`:i.nothing}_isLastAiMessageWithProgress(e,t){for(let n=t.length-1;n>=0;n--)if(t[n].type===`ai`&&t[n].progress?.children?.length)return t[n].id===e.id;return!1}_renderRestoreMenu(e,t,a,o=!1){if(!(this.showAssistantContextMenu&&e.hasChart&&e.apiMessageId&&!e.isError&&e.id!==a))return i.nothing;let s=`context-menu-trigger-${e.apiMessageId}`;return i.html`
|
|
29
|
-
<div class="assistant-context-menu">
|
|
30
|
-
<button
|
|
31
|
-
id=${s}
|
|
32
|
-
class="assistant-context-menu-trigger"
|
|
33
|
-
type="button"
|
|
34
|
-
?disabled=${o}
|
|
35
|
-
>
|
|
36
|
-
${(0,r.luzmoIcon)(r.luzmoEllipsisVertical)}
|
|
37
|
-
</button>
|
|
38
|
-
<luzmo-overlay
|
|
39
|
-
trigger="${s}@click"
|
|
40
|
-
placement="bottom-end"
|
|
41
|
-
>
|
|
42
|
-
<luzmo-popover>
|
|
43
|
-
<button
|
|
44
|
-
class="assistant-context-menu-item"
|
|
45
|
-
type="button"
|
|
46
|
-
?disabled=${o}
|
|
47
|
-
@click=${()=>this._handleRestoreState(e,t)}
|
|
48
|
-
>
|
|
49
|
-
${(0,n.msg)(`Restore state`,{desc:`Context menu action that restores the chart to this message state`})}
|
|
50
|
-
</button>
|
|
51
|
-
</luzmo-popover>
|
|
52
|
-
</luzmo-overlay>
|
|
53
|
-
</div>
|
|
54
|
-
`}_renderMessages(){let e=this.requestMode===`external`?this.isGenerating:this._inflightAiMessage!==null,t=[...this.messages].reverse().find(e=>e.type===`ai`)?.id,n=this.messages.filter(e=>!this._inflightAiMessage||e.id!==this._inflightAiMessage.id);return n.map(r=>{let a=!!r.progress?.children?.length,s=a&&this._isLastAiMessageWithProgress(r,n),c=a&&(e||!s),l=a?i.html`
|
|
55
|
-
<luzmo-progress-steps
|
|
56
|
-
.progress=${r.progress}
|
|
57
|
-
?condensed=${c}
|
|
58
|
-
collapsed
|
|
59
|
-
no-animate
|
|
60
|
-
size="s"
|
|
61
|
-
></luzmo-progress-steps>
|
|
62
|
-
`:i.nothing;if(r.type===`user`)return i.html`
|
|
63
|
-
<luzmo-chat-message
|
|
64
|
-
avatar-placement="bottom"
|
|
65
|
-
position="right"
|
|
66
|
-
variant="primary"
|
|
67
|
-
size="s"
|
|
68
|
-
>
|
|
69
|
-
${r.message}
|
|
70
|
-
</luzmo-chat-message>
|
|
71
|
-
`;let u=this.messages.indexOf(r);return i.html`
|
|
72
|
-
${l}
|
|
73
|
-
<div class="assistant-message-wrapper">
|
|
74
|
-
<luzmo-chat-message
|
|
75
|
-
class=${r.isError?`error`:``}
|
|
76
|
-
role=${r.isError?`alert`:i.nothing}
|
|
77
|
-
avatar-placement="bottom"
|
|
78
|
-
position="left"
|
|
79
|
-
quiet
|
|
80
|
-
size="s"
|
|
81
|
-
>
|
|
82
|
-
${(0,o.unsafeHTML)(this._sanitizeMessage(r.message))}
|
|
83
|
-
</luzmo-chat-message>
|
|
84
|
-
|
|
85
|
-
${this._renderRestoreMenu(r,u,t,e)}
|
|
86
|
-
</div>
|
|
87
|
-
`})}_renderStreamingResponse(){return this._inflightAiMessage?.message?i.html`
|
|
88
|
-
<luzmo-chat-message
|
|
89
|
-
avatar-placement="bottom"
|
|
90
|
-
position="left"
|
|
91
|
-
quiet
|
|
92
|
-
size="s"
|
|
93
|
-
>
|
|
94
|
-
${(0,o.unsafeHTML)(this._sanitizeMessage(this._inflightAiMessage.message))}
|
|
95
|
-
</luzmo-chat-message>
|
|
96
|
-
`:i.nothing}_renderLoadingMessage(){let e=this.requestMode===`external`?this.isGenerating:this._isGeneratingInternal,t=this.requestMode===`external`?this.progress:this._progress;return!e||t?.children?.length?i.nothing:i.html`
|
|
97
|
-
<luzmo-chat-message
|
|
98
|
-
avatar-placement="bottom"
|
|
99
|
-
position="left"
|
|
100
|
-
quiet
|
|
101
|
-
size="s"
|
|
102
|
-
>
|
|
103
|
-
<div class="loading-message" role="status" aria-live="polite">
|
|
104
|
-
<span class="icon-lg">${(0,r.luzmoIcon)(r.luzmoSpin,{className:`spin`})}</span>
|
|
105
|
-
<span class="loading-message-text">${this.loadingMessage||(this.chart?.type===`placeholder`?(0,n.msg)(`Creating item...`,{desc:`Label for ai chat creating item message`}):(0,n.msg)(`Updating item...`,{desc:`Label for ai chat updating item message`}))}</span>
|
|
106
|
-
</div>
|
|
107
|
-
</luzmo-chat-message>
|
|
108
|
-
`}_renderPlaceholderMessage(){return this.messages.length>0?i.html`
|
|
109
|
-
|
|
110
|
-
`:i.html`
|
|
111
|
-
<luzmo-chat-message
|
|
112
|
-
avatar-placement="bottom"
|
|
113
|
-
position="left"
|
|
114
|
-
quiet
|
|
115
|
-
size="s"
|
|
116
|
-
>
|
|
117
|
-
${(0,n.msg)(`Describe how you want to edit this item…`,{desc:`Label for ai chat placeholder message`})}
|
|
118
|
-
</luzmo-chat-message>
|
|
119
|
-
`}render(){let e=this.requestMode===`external`?this.isGenerating:this._isGeneratingInternal;return i.html`
|
|
120
|
-
<div class="chat-container" role="region" aria-label=${(0,n.msg)(`AI Chat`,{desc:`Accessible label for AI chat region`})}>
|
|
121
|
-
<div class="chat-messages-container" role="log" aria-live="polite">
|
|
122
|
-
${this._renderPlaceholderMessage()}
|
|
123
|
-
${this._renderMessages()}
|
|
124
|
-
${this._renderProgress()}
|
|
125
|
-
${this._renderStreamingResponse()}
|
|
126
|
-
${this._renderLoadingMessage()}
|
|
127
|
-
</div>
|
|
128
|
-
|
|
129
|
-
<luzmo-ai-interaction-textarea
|
|
130
|
-
.value=${this._textareaValue}
|
|
131
|
-
.selectedDatasets=${this.selectedDatasets}
|
|
132
|
-
.placeholder=${this.placeholder}
|
|
133
|
-
?disabled=${this.disabled}
|
|
134
|
-
?is-generating=${e}
|
|
135
|
-
?hide-dataset-button=${this.hideDatasetButton}
|
|
136
|
-
?hide-dataset-icons=${this.hideDatasetIcons}
|
|
137
|
-
?disable-dataset-modification=${this.disableDatasetModification}
|
|
138
|
-
?hide-selected-datasets=${this.hideSelectedDatasets}
|
|
139
|
-
?disable-column-mentions=${this.disableColumnMentions}
|
|
140
|
-
?require-dataset=${this.requireDataset}
|
|
141
|
-
auth-key=${this.authKey}
|
|
142
|
-
auth-token=${this.authToken}
|
|
143
|
-
api-url=${this.apiUrl}
|
|
144
|
-
app-server=${this.appServer}
|
|
145
|
-
?flag-opendata=${this.flagOpendata}
|
|
146
|
-
@prompt-submitted=${this._handlePromptSubmitted}
|
|
147
|
-
@dataset-selected=${this._handleDatasetSelected}
|
|
148
|
-
@dataset-removed=${this._handleDatasetRemoved}
|
|
149
|
-
></luzmo-ai-interaction-textarea>
|
|
150
|
-
</div>
|
|
151
|
-
`}};t.t([(0,a.property)({type:Array})],N.prototype,`messages`,void 0),t.t([(0,a.property)({type:Array,attribute:`selected-datasets`})],N.prototype,`selectedDatasets`,void 0),t.t([(0,a.property)({type:String})],N.prototype,`placeholder`,void 0),t.t([(0,a.property)({type:Boolean,reflect:!0})],N.prototype,`disabled`,void 0),t.t([(0,a.property)({type:Boolean,attribute:`show-assistant-context-menu`})],N.prototype,`showAssistantContextMenu`,void 0),t.t([(0,a.property)({type:String,attribute:`auth-key`})],N.prototype,`authKey`,void 0),t.t([(0,a.property)({type:String,attribute:`auth-token`})],N.prototype,`authToken`,void 0),t.t([(0,a.property)({type:String,attribute:`api-url`})],N.prototype,`apiUrl`,void 0),t.t([(0,a.property)({type:String,attribute:`app-server`})],N.prototype,`appServer`,void 0),t.t([(0,a.property)({type:Boolean,attribute:`flag-opendata`})],N.prototype,`flagOpendata`,void 0),t.t([(0,a.property)({type:Boolean,attribute:`hide-dataset-button`})],N.prototype,`hideDatasetButton`,void 0),t.t([(0,a.property)({type:Boolean,attribute:`hide-dataset-icons`})],N.prototype,`hideDatasetIcons`,void 0),t.t([(0,a.property)({type:Boolean,attribute:`disable-dataset-modification`})],N.prototype,`disableDatasetModification`,void 0),t.t([(0,a.property)({type:Boolean,attribute:`hide-selected-datasets`})],N.prototype,`hideSelectedDatasets`,void 0),t.t([(0,a.property)({type:Boolean,attribute:`disable-column-mentions`})],N.prototype,`disableColumnMentions`,void 0),t.t([(0,a.property)({type:Boolean,attribute:`require-dataset`})],N.prototype,`requireDataset`,void 0),t.t([(0,a.property)({type:String,attribute:`model-preference`})],N.prototype,`modelPreference`,void 0),t.t([(0,a.property)({type:String,attribute:`request-mode`})],N.prototype,`requestMode`,void 0),t.t([(0,a.property)({type:Boolean,attribute:`is-generating`})],N.prototype,`isGenerating`,void 0),t.t([(0,a.property)({type:String,attribute:`conversation-id`})],N.prototype,`conversationId`,void 0),t.t([(0,a.property)({type:Object,attribute:`chart`})],N.prototype,`chart`,void 0),t.t([(0,a.property)({type:String,attribute:`api-version`})],N.prototype,`apiVersion`,void 0),t.t([(0,a.property)({converter:{fromAttribute:e=>e!==`false`&&e!==null}})],N.prototype,`stream`,void 0),t.t([(0,a.property)({type:String,attribute:`loading-message`})],N.prototype,`loadingMessage`,void 0),t.t([(0,a.property)({type:String,attribute:`initial-prompt`})],N.prototype,`initialPrompt`,void 0),t.t([(0,a.property)({type:Object})],N.prototype,`progress`,void 0),t.t([(0,a.property)({type:Boolean,attribute:`progress-collapsed`})],N.prototype,`progressCollapsed`,void 0),t.t([(0,a.state)()],N.prototype,`_progress`,void 0),t.t([(0,a.state)()],N.prototype,`_progressCollapsed`,void 0),t.t([(0,a.state)()],N.prototype,`_isGeneratingInternal`,void 0),t.t([(0,a.state)()],N.prototype,`_textareaValue`,void 0),customElements.get(`luzmo-ai-chat`)||customElements.define(`luzmo-ai-chat`,N),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return Ie}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return Re}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return Le}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return N}});
|