@genexus/genexus-ide-ui 1.1.31 → 1.1.33
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/gx-ide-about.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-about.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-chat-container_2.cjs.entry.js +9 -2
- package/dist/cjs/gx-ide-chat-container_2.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-sc-chat-container.cjs.entry.js +2 -1
- package/dist/cjs/gx-ide-sc-chat-container.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-sign-in-team.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-sign-in-team.cjs.entry.js.map +1 -1
- package/dist/collection/components/about/about.css +0 -1
- package/dist/collection/components/chat/chat-container/chat-container.js +10 -2
- package/dist/collection/components/chat/chat-container/chat-container.js.map +1 -1
- package/dist/collection/components/chat/chat-container/gx-ide-assets/chat-container/chat-lit.css +376 -0
- package/dist/collection/components/chat/chat-welcome/chat-welcome.js +0 -1
- package/dist/collection/components/chat/chat-welcome/chat-welcome.js.map +1 -1
- package/dist/collection/components/sign-in-team/sign-in-team.css +1 -2
- package/dist/collection/showcase/chat-container/chat.showcase.js +2 -1
- package/dist/collection/showcase/chat-container/chat.showcase.js.map +1 -1
- package/dist/components/chat-container.js +10 -2
- package/dist/components/chat-container.js.map +1 -1
- package/dist/components/chat-welcome.js +0 -1
- package/dist/components/chat-welcome.js.map +1 -1
- package/dist/components/gx-ide-about.js +1 -1
- package/dist/components/gx-ide-about.js.map +1 -1
- package/dist/components/gx-ide-sc-chat-container.js +2 -1
- package/dist/components/gx-ide-sc-chat-container.js.map +1 -1
- package/dist/components/gx-ide-sign-in-team.js +1 -1
- package/dist/components/gx-ide-sign-in-team.js.map +1 -1
- package/dist/esm/gx-ide-about.entry.js +1 -1
- package/dist/esm/gx-ide-about.entry.js.map +1 -1
- package/dist/esm/gx-ide-chat-container_2.entry.js +10 -3
- package/dist/esm/gx-ide-chat-container_2.entry.js.map +1 -1
- package/dist/esm/gx-ide-sc-chat-container.entry.js +2 -1
- package/dist/esm/gx-ide-sc-chat-container.entry.js.map +1 -1
- package/dist/esm/gx-ide-sign-in-team.entry.js +1 -1
- package/dist/esm/gx-ide-sign-in-team.entry.js.map +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
- package/dist/genexus-ide-ui/gx-ide-assets/chat-container/chat-lit.css +376 -0
- package/dist/genexus-ide-ui/{p-c3e410cc.entry.js → p-04308eaa.entry.js} +2 -2
- package/dist/genexus-ide-ui/p-04308eaa.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-61343e93.entry.js → p-203f0417.entry.js} +8 -8
- package/dist/genexus-ide-ui/p-203f0417.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-137130ad.entry.js → p-8d6f2b4f.entry.js} +4 -2
- package/dist/genexus-ide-ui/{p-137130ad.entry.js.map → p-8d6f2b4f.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-1477d49a.entry.js → p-9270c80f.entry.js} +102 -90
- package/dist/genexus-ide-ui/p-9270c80f.entry.js.map +1 -0
- package/package.json +3 -3
- package/dist/genexus-ide-ui/p-1477d49a.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-61343e93.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-c3e410cc.entry.js.map +0 -1
|
@@ -12,7 +12,7 @@ const mapTeamsToComboBoxItemModel = e => {
|
|
|
12
12
|
})));
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
const r = ":host {\n display: grid;\n container-type: inline-size;\n container-name: host-container;\n block-size: 100%;\n inline-size: 100%;\n align-items: center;\n justify-content: center;\n
|
|
15
|
+
const r = ":host {\n display: grid;\n container-type: inline-size;\n container-name: host-container;\n block-size: 100%;\n inline-size: 100%;\n align-items: center;\n justify-content: center;\n}\n\n.slide {\n display: grid;\n grid-template-columns: 1fr 1fr;\n block-size: 100%;\n max-block-size: 700px;\n max-inline-size: 1100px;\n background-color: var(--mer-surface__elevation--01);\n border-radius: var(--dialog-border-radius, var(--mer-spacing--md));\n overflow: hidden;\n}\n.slide__illustration {\n overflow: hidden;\n object-fit: cover;\n object-position: left;\n block-size: 100%;\n inline-size: 100%;\n}\n.slide__main {\n display: grid;\n block-size: 100%;\n inline-size: 100%;\n padding: var(--mer-spacing--3xl);\n transform: translateY(var(--mer-spacing--2xs));\n transition: var(--switch-step-transtion-time) all;\n opacity: 0;\n}\n.slide__main--visible {\n transform: translateY(0);\n opacity: 1;\n}\n.slide__main-container {\n display: grid;\n place-self: center;\n gap: var(--mer-spacing--lg);\n max-inline-size: 480px;\n}\n.slide__main-header {\n display: grid;\n gap: var(--mer-spacing--lg);\n}\n.slide__main-title {\n display: flex;\n flex-direction: column;\n font-size: var(--mer-font__size--xl);\n font-weight: var(--mer-font__weight--semi-bold);\n letter-spacing: 0.02em;\n color: var(--mer-text__on-surface);\n}\n.slide__main-description {\n display: grid;\n gap: var(--mer-spacing--2xl);\n font-size: var(--mer-font__size--sm);\n font-weight: var(--mer-font__weight--light);\n line-height: var(--mer-line-height--spaced);\n color: var(--mer-text__complementary);\n max-inline-size: 370px;\n}\n\n.teams-list {\n inline-size: 100%;\n max-inline-size: 400px;\n}\n\n.main-btn {\n inline-size: 100%;\n max-inline-size: 124px;\n}\n\n@container host-container (max-width: 768px) {\n .slide {\n grid-template-columns: 1fr 2fr;\n }\n}\n@container host-container (max-width: 640px) {\n .slide {\n grid-template-columns: 1fr 5fr;\n }\n}\n.hyperlink {\n text-decoration: underline;\n cursor: pointer;\n}\n\n.field-inline > .label-agreement {\n margin-block-start: 0 !important;\n}";
|
|
16
16
|
|
|
17
17
|
var l = undefined && undefined.__classPrivateFieldGet || function(e, i, n, s) {
|
|
18
18
|
if (n === "a" && !s) throw new TypeError("Private accessor was defined without a getter");
|
|
@@ -27,7 +27,7 @@ var o = undefined && undefined.__classPrivateFieldSet || function(e, i, n, s, t)
|
|
|
27
27
|
return s === "a" ? t.call(e, n) : t ? t.value = n : i.set(e, n), n;
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
var h, c, d, f, m, p,
|
|
30
|
+
var h, c, d, f, m, p, u, g, v, b, w, _, x, k;
|
|
31
31
|
|
|
32
32
|
const y = e(`./gx-ide-assets/welcome-page/images/copyrights-illustration.png`);
|
|
33
33
|
|
|
@@ -51,14 +51,14 @@ const T = class {
|
|
|
51
51
|
f.set(this, 100);
|
|
52
52
|
m.set(this, void 0);
|
|
53
53
|
p.set(this, void 0);
|
|
54
|
-
|
|
54
|
+
u.set(this, (() => {
|
|
55
55
|
if (this.authStep === "signIn") {
|
|
56
56
|
this.signInCallback();
|
|
57
57
|
} else if (this.authStep === "selectUserTeam") {
|
|
58
|
-
l(this,
|
|
58
|
+
l(this, g, "f").call(this);
|
|
59
59
|
}
|
|
60
60
|
}));
|
|
61
|
-
|
|
61
|
+
g.set(this, (async () => {
|
|
62
62
|
await this.continueCallback(l(this, d, "f").value);
|
|
63
63
|
}));
|
|
64
64
|
v.set(this, (() => n("header", {
|
|
@@ -74,7 +74,7 @@ const T = class {
|
|
|
74
74
|
const e = this.authStep === "signIn" && this.termsConfirmationRequired && !this.termsAndConditionsAccepted;
|
|
75
75
|
return n("div", null, n("button", {
|
|
76
76
|
class: "button-primary main-btn",
|
|
77
|
-
onClick: l(this,
|
|
77
|
+
onClick: l(this, u, "f"),
|
|
78
78
|
disabled: e
|
|
79
79
|
}, l(this, h, "f")[this.authStepInternal].buttonCaption));
|
|
80
80
|
}));
|
|
@@ -227,10 +227,10 @@ const T = class {
|
|
|
227
227
|
};
|
|
228
228
|
|
|
229
229
|
h = new WeakMap, c = new WeakMap, d = new WeakMap, f = new WeakMap, m = new WeakMap,
|
|
230
|
-
p = new WeakMap,
|
|
230
|
+
p = new WeakMap, u = new WeakMap, g = new WeakMap, v = new WeakMap, b = new WeakMap,
|
|
231
231
|
w = new WeakMap, _ = new WeakMap, x = new WeakMap, k = new WeakMap;
|
|
232
232
|
|
|
233
233
|
T.style = r;
|
|
234
234
|
|
|
235
235
|
export { T as gx_ide_sign_in_team };
|
|
236
|
-
//# sourceMappingURL=p-
|
|
236
|
+
//# sourceMappingURL=p-203f0417.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["mapTeamsToComboBoxItemModel","teams","map","team","value","id","caption","name","signInTeamCss","COPYRIGHTS_ILLUSTRATION","getAssetPath","ICON_NEXT","CSS_BUNDLES","CHECKED_VALUE","GxIdeSignInTeam","_GxIdeSignInTeam_componentLocale","set","this","_GxIdeSignInTeam_userTeamsModel","_GxIdeSignInTeam_chSelectTeamEl","_GxIdeSignInTeam_switchStepTransitionTime","_GxIdeSignInTeam_termsAndConditionsCheckboxEl","_GxIdeSignInTeam_privacyPolicyCheckboxEl","_GxIdeSignInTeam_authStepCallback","authStep","signInCallback","__classPrivateFieldGet","_GxIdeSignInTeam_continueHandler","call","async","continueCallback","_GxIdeSignInTeam_renderStepHeader","h","class","src","alt","authStepInternal","titlePart1","titlePart2","_GxIdeSignInTeam_renderStepFooter","signInDisabled","termsConfirmationRequired","termsAndConditionsAccepted","onClick","disabled","buttonCaption","_GxIdeSignInTeam_evaluateTermsConditionsAndPrivacyAccepted","privacyPolicyAccepted","_GxIdeSignInTeam_termsAndConditionsClickedHandler","event","preventDefault","termsCallback","_GxIdeSignInTeam_privacyPolicyClickedHandler","privacyCallback","_GxIdeSignInTeam_evaluateStepRender","signIn","description","checkedValue","ref","el","__classPrivateFieldSet","onInput","htmlFor","agreement","termsAndConditionsLabel","hyperlink","termsAndConditionsLink","privacyAndPolicyLabel","privacyAndPolicyLink","loaderTitle","loader","fetchingTeamsTitle","settingUpSessionTitle","loaderDescription","fetchingTeamsDescription","settingUpDescription","show","selectUserTeam","infoMessage","label","accessibleName","model","_a","authStepChanged","newAuthStep","slideIsVisible","setTimeout","teamsChanged","newTeams","componentWillLoad","Locale","getComponentStrings","style","setProperty","toString","render","Host","slide__main"],"sources":["src/components/sign-in-team/helpers.ts","src/components/sign-in-team/sign-in-team.scss?tag=gx-ide-sign-in-team&encapsulation=shadow","src/components/sign-in-team/sign-in-team.tsx"],"sourcesContent":["import { ComboBoxItemModel } from \"@genexus/chameleon-controls-library/dist/types/components/combo-box/types\";\nimport { TeamData } from \"./sign-in-team\";\n\nexport const mapTeamsToComboBoxItemModel = (\n teams?: TeamData[]\n): ComboBoxItemModel[] | undefined => {\n if (!teams) {\n return [];\n }\n return teams.map(team => ({\n value: team.id,\n caption: team.name\n }));\n};\n",":host {\n display: grid;\n container-type: inline-size;\n container-name: host-container;\n block-size: 100%;\n inline-size: 100%;\n align-items: center;\n justify-content: center;\n}\n\n.slide {\n display: grid;\n grid-template-columns: 1fr 1fr;\n block-size: 100%;\n max-block-size: 700px;\n max-inline-size: 1100px;\n background-color: var(--mer-surface__elevation--01);\n border-radius: var(--dialog-border-radius, var(--mer-spacing--md));\n overflow: hidden;\n\n &__illustration {\n overflow: hidden;\n object-fit: cover;\n object-position: left;\n block-size: 100%;\n inline-size: 100%;\n }\n\n &__main {\n display: grid;\n block-size: 100%;\n inline-size: 100%;\n padding: var(--mer-spacing--3xl);\n transform: translateY(var(--mer-spacing--2xs));\n transition: var(--switch-step-transtion-time) all;\n opacity: 0;\n\n &--visible {\n transform: translateY(0);\n opacity: 1;\n }\n }\n\n &__main-container {\n display: grid;\n place-self: center;\n gap: var(--mer-spacing--lg);\n max-inline-size: 480px;\n }\n\n &__main-header {\n display: grid;\n gap: var(--mer-spacing--lg);\n }\n\n &__main-title {\n display: flex;\n flex-direction: column;\n font-size: var(--mer-font__size--xl);\n font-weight: var(--mer-font__weight--semi-bold);\n letter-spacing: 0.02em;\n color: var(--mer-text__on-surface);\n }\n\n &__main-description {\n display: grid;\n gap: var(--mer-spacing--2xl);\n font-size: var(--mer-font__size--sm);\n font-weight: var(--mer-font__weight--light);\n line-height: var(--mer-line-height--spaced);\n color: var(--mer-text__complementary);\n max-inline-size: 370px;\n }\n}\n\n.teams-list {\n inline-size: 100%;\n max-inline-size: 400px;\n}\n\n.main-btn {\n inline-size: 100%;\n max-inline-size: 124px;\n}\n\n@container host-container (max-width: 768px) {\n .slide {\n grid-template-columns: 1fr 2fr;\n }\n}\n\n@container host-container (max-width: 640px) {\n .slide {\n grid-template-columns: 1fr 5fr;\n }\n}\n\n// WA (this class should be defined on Mercury\n.hyperlink {\n text-decoration: underline;\n cursor: pointer;\n}\n// WA checkboxes labels should not include margin-block-start when\n// placed inside a field-inline.\n.field-inline > .label-agreement {\n margin-block-start: 0 !important;\n}\n","// Stencil\nimport {\n Component,\n Host,\n h,\n Prop,\n State,\n Watch,\n Element,\n getAssetPath\n} from \"@stencil/core\";\n// Other Libraries\nimport { MercuryBundles } from \"@genexus/mercury\";\nimport { ComboBoxItemModel } from \"@genexus/chameleon-controls-library/dist/types/components/combo-box/types\";\n// Custom Imports\nimport { Locale } from \"../../common/locale\";\nimport { mapTeamsToComboBoxItemModel } from \"./helpers\";\n\nconst COPYRIGHTS_ILLUSTRATION = getAssetPath(\n `./gx-ide-assets/welcome-page/images/copyrights-illustration.png`\n);\nconst ICON_NEXT = getAssetPath(\n `./gx-ide-assets/welcome-page/images/icon-next.svg`\n);\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"utils/typography\",\n \"components/button\",\n \"components/combo-box\",\n \"components/checkbox\",\n \"utils/form\"\n];\n\nconst CHECKED_VALUE = \"on\";\n\n@Component({\n tag: \"gx-ide-sign-in-team\",\n styleUrl: \"sign-in-team.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/sign-in-team\"]\n})\nexport class GxIdeSignInTeam {\n /**\n * The component hard-coded strings translations.\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #componentLocale: any;\n // Select User Team References :\n #userTeamsModel: ComboBoxItemModel[] = [];\n #chSelectTeamEl: HTMLChComboBoxRenderElement;\n #switchStepTransitionTime: number = 100;\n #termsAndConditionsCheckboxEl!: HTMLChCheckboxElement;\n #privacyPolicyCheckboxEl!: HTMLChCheckboxElement;\n\n @Element() el: HTMLGxIdeSignInTeamElement;\n\n /**\n * This is a handover from \"authStep\" that allows updating descriptions once\n * the slide is hidden. This enables a smooth transition between descriptions.\n */\n\n @State() authStepInternal: AuthStep;\n\n /**\n * Defines if the main slide is visible or not. Used for smooth transitions\n * between slides.\n */\n @State() slideIsVisible: boolean = true;\n\n /**\n * True if terms and conditions are accepted.\n */\n @State() termsAndConditionsAccepted: boolean = false;\n\n /**\n * The authentication step to display\n */\n @Prop() readonly authStep: AuthStep = \"signIn\";\n @Watch(\"authStep\")\n authStepChanged(newAuthStep: AuthStep) {\n this.slideIsVisible = false;\n // switch step\n setTimeout(() => {\n this.authStepInternal = newAuthStep;\n }, this.#switchStepTransitionTime);\n // show slide\n setTimeout(() => {\n this.slideIsVisible = true;\n }, this.#switchStepTransitionTime * 2);\n }\n\n /**\n * Callback executed when the user clicks the 'Continue' button\n */\n @Prop() readonly continueCallback!: (teamId: string) => Promise<void>;\n\n /**\n * Callback executed when the user click the \"Sign In\" button\n */\n @Prop() readonly signInCallback!: () => Promise<void>;\n\n /**\n * When true, it will diplay checkboxes for the user to confirm terms and conditions\n */\n @Prop() readonly termsConfirmationRequired: boolean = false;\n\n /**\n * Array that contains the user's teams\n */\n @Prop() readonly teams!: TeamData[];\n @Watch(\"teams\")\n teamsChanged(newTeams: TeamData[]) {\n this.#userTeamsModel = mapTeamsToComboBoxItemModel(newTeams);\n }\n\n /**\n * Callback executed when the user clicks on the \"term and conditions\" link\n */\n @Prop() readonly termsCallback: () => Promise<void>;\n\n /**\n * Callback executed when the user clicks on the \"privacy policy\" link\n */\n @Prop() readonly privacyCallback: () => Promise<void>;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n this.el.style.setProperty(\n \"--switch-step-transtion-time\",\n this.#switchStepTransitionTime.toString() + \"ms\"\n );\n // Initialize values\n this.authStepInternal = this.authStep;\n this.teamsChanged(this.teams);\n }\n\n #authStepCallback = () => {\n if (this.authStep === \"signIn\") {\n this.signInCallback();\n } else if (this.authStep === \"selectUserTeam\") {\n this.#continueHandler();\n }\n };\n\n #continueHandler = async () => {\n await this.continueCallback(this.#chSelectTeamEl.value);\n };\n\n #renderStepHeader = (): HTMLElement => {\n return (\n <header class=\"slide__main-header\">\n <img\n src={ICON_NEXT}\n alt=\"\" // decorative\n />\n <h2\n // Split the title into two spans for better styling\n class=\"slide__main-title\"\n >\n <span>{this.#componentLocale[this.authStepInternal].titlePart1}</span>\n <span>{this.#componentLocale[this.authStepInternal].titlePart2}</span>\n </h2>\n </header>\n );\n };\n\n #renderStepFooter = (): HTMLElement => {\n const signInDisabled =\n this.authStep === \"signIn\" &&\n this.termsConfirmationRequired &&\n !this.termsAndConditionsAccepted;\n return (\n <div>\n <button\n class=\"button-primary main-btn\"\n onClick={this.#authStepCallback}\n disabled={signInDisabled}\n >\n {this.#componentLocale[this.authStepInternal].buttonCaption}\n </button>\n </div>\n );\n };\n\n #evaluateTermsConditionsAndPrivacyAccepted = () => {\n const termsAndConditionsAccepted =\n this.#termsAndConditionsCheckboxEl.value === CHECKED_VALUE;\n const privacyPolicyAccepted =\n this.#privacyPolicyCheckboxEl.value === CHECKED_VALUE;\n this.termsAndConditionsAccepted =\n termsAndConditionsAccepted && privacyPolicyAccepted;\n };\n\n #termsAndConditionsClickedHandler = (event: MouseEvent) => {\n event.preventDefault();\n this.termsCallback();\n };\n\n #privacyPolicyClickedHandler = (event: MouseEvent) => {\n event.preventDefault();\n this.privacyCallback();\n };\n\n #evaluateStepRender = () => {\n if (this.authStepInternal === \"signIn\") {\n return [\n this.#renderStepHeader(),\n <p class=\"body-regular-l\">\n {this.#componentLocale.signIn.description}\n </p>,\n this.termsConfirmationRequired && (\n <div class=\"field-group\">\n <div\n // terms and conditions\n class=\"field field-inline\"\n >\n <ch-checkbox\n checkedValue={CHECKED_VALUE}\n id=\"terms-and-conditions\"\n class=\"checkbox\"\n ref={(el: HTMLChCheckboxElement) =>\n (this.#termsAndConditionsCheckboxEl =\n el as HTMLChCheckboxElement)\n }\n onInput={this.#evaluateTermsConditionsAndPrivacyAccepted}\n ></ch-checkbox>\n <label\n htmlFor=\"terms-and-conditions\"\n class=\"label label-agreement\"\n >\n {this.#componentLocale.agreement.termsAndConditionsLabel}\n <span\n class={{ hyperlink: !!this.termsCallback }}\n onClick={\n this.termsCallback && this.#termsAndConditionsClickedHandler\n }\n >\n {this.#componentLocale.agreement.termsAndConditionsLink}\n </span>\n </label>\n </div>\n <div\n // privacy policy\n class=\"field field-inline\"\n >\n <ch-checkbox\n checkedValue={CHECKED_VALUE}\n id=\"privacy-policy\"\n class=\"checkbox\"\n ref={(el: HTMLChCheckboxElement) =>\n (this.#privacyPolicyCheckboxEl = el as HTMLChCheckboxElement)\n }\n onInput={this.#evaluateTermsConditionsAndPrivacyAccepted}\n ></ch-checkbox>\n <label htmlFor=\"privacy-policy\" class=\"label label-agreement\">\n {this.#componentLocale.agreement.privacyAndPolicyLabel}\n <span\n class={{ hyperlink: !!this.privacyCallback }}\n onClick={\n this.privacyCallback && this.#privacyPolicyClickedHandler\n }\n >\n {this.#componentLocale.agreement.privacyAndPolicyLink}\n </span>\n </label>\n </div>\n </div>\n ),\n\n this.#renderStepFooter()\n ];\n } else if (\n this.authStepInternal === \"fetchUserTeams\" ||\n this.authStepInternal === \"settingUpSession\"\n ) {\n const loaderTitle =\n this.authStepInternal === \"fetchUserTeams\"\n ? this.#componentLocale.loader.fetchingTeamsTitle\n : this.#componentLocale.loader.settingUpSessionTitle;\n const loaderDescription =\n this.authStepInternal === \"fetchUserTeams\"\n ? this.#componentLocale.loader.fetchingTeamsDescription\n : this.#componentLocale.loader.settingUpDescription;\n return (\n <gx-ide-loader\n show\n loaderTitle={loaderTitle}\n description={loaderDescription}\n ></gx-ide-loader>\n );\n } else if (this.authStepInternal === \"selectUserTeam\") {\n return [\n this.#renderStepHeader(),\n <div class=\"slide__select-team-description\">\n <p class=\"body-semi-bold-l\">\n {this.#componentLocale.selectUserTeam.infoMessage}\n </p>\n </div>,\n <div class=\"field-group\">\n <div class=\"field field-block\">\n <label htmlFor=\"teams\">\n {this.#componentLocale.selectUserTeam.label}\n </label>\n <ch-combo-box-render\n id=\"teams\"\n accessibleName=\"Teams\"\n class=\"combo-box teams-list\"\n model={this.#userTeamsModel}\n value={this.#userTeamsModel[0]?.value}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#chSelectTeamEl = el as HTMLChComboBoxRenderElement)\n }\n ></ch-combo-box-render>\n </div>\n </div>,\n this.#renderStepFooter()\n ];\n }\n };\n\n render() {\n return (\n <Host>\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <section class=\"slide\">\n <img\n src={COPYRIGHTS_ILLUSTRATION}\n class=\"slide__illustration\"\n alt=\"\" // decorative\n />\n\n <div\n class={{\n \"slide__main\": true,\n \"slide__main--visible\": this.slideIsVisible\n }}\n >\n <div class=\"slide__main-container\">\n {this.#evaluateStepRender()}\n </div>\n </div>\n </section>\n </Host>\n );\n }\n}\n\nexport type AuthStep =\n | \"signIn\"\n | \"fetchUserTeams\"\n | \"selectUserTeam\"\n | \"settingUpSession\";\n\nexport type TeamData = {\n id: string;\n name: string;\n};\n"],"mappings":";;;;AAGO,MAAMA,8BACXC;EAEA,KAAKA,GAAO;IACV,OAAO;;EAET,OAAOA,EAAMC,KAAIC,MAAI;IACnBC,OAAOD,EAAKE;IACZC,SAASH,EAAKI;;AACb;;ACZL,MAAMC,IAAgB;;;;;;;;;;;;;;;;;ACkBtB,MAAMC,IAA0BC,EAC9B;;AAEF,MAAMC,IAAYD,EAChB;;AAEF,MAAME,IAA8B,EAClC,qBACA,oBACA,qBACA,wBACA,uBACA;;AAGF,MAAMC,IAAgB;;MAQTC,IAAe;;;;;;;QAK1BC,EAAAC,IAAAC,WAAA;;QAEAC,EAAAF,IAAAC,MAAuC;IACvCE,EAAAH,IAAAC,WAAA;IACAG,EA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,YACZ,gCACAnE,EAAAT,MAAIG,GAAA,KAA2B0E,aAAa;;QAG9C7E,KAAKmB,mBAAmBnB,KAAKO;IAC7BP,KAAKsE,aAAatE,KAAKhB;;EA2LzB,MAAA8F;IACE,OACE/D,EAACgE,GAAI,MACHhE,EAAA;MAAUiD,OAAOrE;QACjBoB,EAAA;MAASC,OAAM;OACbD,EAAA;MACEE,KAAKzB;MACLwB,OAAM;MACNE,KAAI;QAGNH,EAAA;MACEC,OAAO;QACLgE,aAAe;QACf,wBAAwBhF,KAAKoE;;OAG/BrD,EAAA;MAAKC,OAAM;OACRP,EAAAT,MAAIqC,GAAA,KAAoB1B,KAAxBX"}
|
|
@@ -223,7 +223,9 @@ var m = undefined && undefined.__classPrivateFieldSet || function(e, t, n, a, s)
|
|
|
223
223
|
|
|
224
224
|
var u, p, g, f, w, y, b;
|
|
225
225
|
|
|
226
|
-
|
|
226
|
+
// TODO: Add back "components/chat-lit" once chat bundle for lit is ready
|
|
227
|
+
// on a new Mercury version
|
|
228
|
+
const k = [ "resets/box-sizing", "utils/elevation", "components/markdown-viewer" ];
|
|
227
229
|
|
|
228
230
|
const v = class {
|
|
229
231
|
constructor(t) {
|
|
@@ -354,4 +356,4 @@ y = new WeakMap, b = new WeakMap;
|
|
|
354
356
|
v.style = l;
|
|
355
357
|
|
|
356
358
|
export { v as gx_ide_sc_chat_container };
|
|
357
|
-
//# sourceMappingURL=p-
|
|
359
|
+
//# sourceMappingURL=p-8d6f2b4f.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ASSISTANT_RESPONSE_SHORT_MARKDOWN","ASSISTANT_NAME","ASSISTANT_RESPONSE_MARKDOWN","Array","from","length","_","index","id","role","content","codeFixerRecord","metadata","status","assistantName","time","parts","PROCESSING_PLACEHOLDER","sendChatMessages","chatRef","generatingResponse","addNewMessage","Date","getTime","setTimeout","updateLastMessage","dummyStreaming","stopGeneratingAnswer","console","log","Promise","resolve","chatCallbacksWithChatRef","chChatRef","uploadFile","file","url","mimeType","counter","stringToDisplay","mode","streamingCompleted","substring","chatTranslations","accessibleName","clearChat","copyMessageContent","downloadCodeButton","sendButton","sendInput","stopGeneratingAnswerButton","placeholder","text","copyCodeButton","processing","sourceFiles","chatShowcaseCss","CSS_BUNDLES","GxIdeScChatContainer","_GxIdeScChatContainer_chatContainerRef","set","this","_GxIdeScChatContainer_chatWelcomeRef","_GxIdeScChatContainer_chChatRef","_GxIdeScChatContainer_chatCallbacks","_GxIdeScChatContainer_copyConversationCallbackHandler","__classPrivateFieldGet","showCopyConversationMessage","_GxIdeScChatContainer_deleteConversationCallbackHandler","_GxIdeScChatContainer_suggestedPrompRequestedCallbackHandler","async","prompt","assistantFinalResponse","toLowerCase","includes","userPrompt","exitWelcome","componentDidLoad","assistantStatus","componentDidRender","__classPrivateFieldSet","componentWillLoad","chatItems","render","h","Host","model","chatTitle","copyConversationCallback","deleteConversationCallback","ref","el","class","callbacks","loadingState","renderItem","renderItemMercury","items","showAdditionalContent","translations","markdownTheme","slot","suggestedPrompRequestedCallback"],"sources":["src/showcase/chat-container/models.ts","src/showcase/chat-container/callbacks.ts","src/showcase/chat-container/chat-showcase.scss?tag=gx-ide-sc-chat-container&encapsulation=shadow","src/showcase/chat-container/chat.showcase.tsx"],"sourcesContent":["import type {\n ChatMessage,\n ChatTranslations\n} from \"@genexus/chameleon-controls-library\";\n\nimport { MercuryChatMessageMetadata } from \"../../components/chat/lit-custom-render/types\";\n\nexport const ASSISTANT_RESPONSE_SHORT_MARKDOWN =\n '\\n### Code block {#code-block}\\nTo create code blocks, you’ll use three backticks (` ``` `) or three tildes (`~~~`) on the lines before and after the code block.\\n\\n```json\\n{\\n \"firstName\": \"John\",\\n \"lastName\": \"Smith\",\\n \"age\": 25\\n}';\n\nexport const ASSISTANT_NAME = \"Nexa\";\n\n// - - - - - - - - - - - - - -\n// Types of messages\n// - - - - - - - - - - - - - -\n\nexport const userMessageChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"user\",\n content:\n \"Generate a web form for customer registration with fields for name, email, phone, and address. Include validation, save the data to the database, and show a confirmation message after submission.\",\n metadata: null\n }\n];\n\nexport const assistantMessageChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"I’ve created the basic structure for the registration form, but I need a bit more info: Should the address include city, state, and ZIP? Do you want a separate confirmation page or just a message on the same screen? Any specific format or validation for the phone number?\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n }\n];\n\nexport const assistantMessageWarningChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"The CustomerRegistration panel was created with warnings: The “Phone” field uses a generic character format—consider a phone mask. No address validation rules applied.The data is still saved correctly, and the panel works as expected.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"warning\"\n }\n];\n\nexport const assistantMessageSuccessChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"The CustomerRegistration web panel was created successfully. Fields: Name, Email, Phone, Address. Validations applied (required, email format). Data saved to “Customer” transaction. Confirmation message shown after submit. Let me know if you'd like to add styles or link it to another object.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"success\"\n }\n];\n\nexport const errorMessageChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"error\",\n content:\n \"Sorry, I couldn't generate the requested form. Reason: The “Customer” transaction does not exist in the current Knowledge Base. Please create the “Customer” object or check if it’s named differently.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n }\n];\n\nexport const assistantWaitingChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"waiting\",\n content: \"Creating CustomerRegistration panel\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n }\n];\n\nexport const chatTranslations: ChatTranslations = {\n accessibleName: {\n clearChat: \"Clear chat\",\n copyMessageContent: \"Copy assistant content\",\n downloadCodeButton: \"Download code\",\n sendButton: \"Send\",\n sendInput: \"Message\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n },\n placeholder: {\n sendInput: \"Ask me a question...\"\n },\n text: {\n copyCodeButton: \"Copy code\",\n copyMessageContent: \"Copy\",\n downloadCodeButton: \"Download\",\n processing: `Processing...`,\n sourceFiles: \"Source files:\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n }\n};\n\n// All messages\n\nexport const allMessagesModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"user\",\n content:\n \"Generate a web form for customer registration with fields for name, email, phone, and address. Include validation, save the data to the database, and show a confirmation message after submission.\",\n metadata: null\n },\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"I’ve created the basic structure for the registration form, but I need a bit more info: Should the address include city, state, and ZIP? Do you want a separate confirmation page or just a message on the same screen? Any specific format or validation for the phone number?\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"The CustomerRegistration panel was created with warnings: The “Phone” field uses a generic character format—consider a phone mask. No address validation rules applied.The data is still saved correctly, and the panel works as expected.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"warning\"\n },\n {\n id: \"1\",\n role: \"error\",\n content:\n \"Sorry, I couldn't generate the requested form. Reason: The “Customer” transaction does not exist in the current Knowledge Base. Please create the “Customer” object or check if it’s named differently.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"5\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Your information has been saved successfully, and all changes are now reflected in your account. You can continue with the next steps or return to the dashboard at any time.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"15:00\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"success\"\n }\n];\n\n// - - - - - - - - - - - - - -\n// Other messages\n// - - - - - - - - - - - - - -\n\nexport const ASSISTANT_RESPONSE_MARKDOWN = `\n###### Code block {#code-block}\nTo create code blocks, you’ll use three backticks (\\` \\`\\`\\` \\`) or three tildes (\\`~~~\\`) on the lines before and after the code block.\n\n\\`\\`\\`\n{\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"age\": 25\n}\n\\`\\`\\`\n\nAnother way to create code blocks is to indent every line of the block by at least four spaces or one tab.\n\n <html>\n <head>\n </head>\n </html>\n\n\n###### Syntax Highlighting {#syntax-highlighting}\nThis feature allows you to add color highlighting for whatever language your code was written in.\nTo add syntax highlighting, specify a language next to the backticks before the fenced code block.\n\n\\`\\`\\`json\n{\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"age\": 25\n}\n\\`\\`\\`\n\n\\`\\`\\`javascript\nimport React from 'react'\nimport ReactDOM from 'react-dom'\nimport Markdown from 'react-markdown'\nimport rehypeHighlight from 'rehype-highlight'\n\nconst markdown = \\`\n# Your markdown here\n\\`\n\nReactDOM.render(\n <Markdown rehypePlugins={[rehypeHighlight]}>{markdown}</Markdown>,\n document.querySelector('#content')\n)\n\\`\\`\\`\n\n###### Horizontal Rules {#horizontal-rules}\nTo create a horizontal rule, use three or more asterisks (\\`***\\`), dashes (\\`---\\`), or underscores (\\`___\\`) on a line by themselves.\n`;\n\nexport const chatRecord: ChatMessage[] = [\n { id: \"1\", role: \"user\", content: \"Hello world\" },\n { id: \"2\", role: \"assistant\", content: ASSISTANT_RESPONSE_MARKDOWN },\n { id: \"3\", role: \"user\", content: \"Hello world 1\" },\n { id: \"4\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN },\n { id: \"5\", role: \"user\", content: \"Hello world 2\" },\n { id: \"6\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN },\n { id: \"7\", role: \"user\", content: \"Hello world 3\" },\n { id: \"8\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN },\n { id: \"9\", role: \"user\", content: \"Hello world 4\" },\n { id: \"10\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN }\n];\n\nexport const longChatRecord: ChatMessage[] = Array.from(\n { length: 40 },\n (_, index) =>\n index % 2 === 0\n ? {\n id: `index: ${index}`,\n role: \"user\",\n content:\n `index: ${index}` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n`\n }\n : {\n id: `index: ${index}`,\n role: \"assistant\",\n content:\n ASSISTANT_RESPONSE_SHORT_MARKDOWN +\n `\\nindex: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n`\n }\n);\n\nexport const codeFixerRecord: ChatMessage[] = [\n {\n id: \"1\",\n role: \"user\",\n content: \"Please give me an example about...\",\n metadata: \"14:55\"\n },\n {\n id: \"2\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Action required example. Action required example. Action required example.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"3\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Some fields contain missing or invalid data, which may prevent the process from completing correctly. Review your input carefully and make any necessary corrections before continuing.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"warning\"\n },\n {\n id: \"4\",\n role: \"error\",\n content:\n \"An unexpected error occurred while processing your request, and the operation couldn’t be completed.Please check your internet connection or try again later. If the problem persists, contact support.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"5\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Your information has been saved successfully, and all changes are now reflected in your account. You can continue with the next steps or return to the dashboard at any time.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"success\"\n },\n {\n id: \"6\",\n role: \"user\",\n content:\n \"Implement the function calculate_average_grade in grades.py that takes a list of grades as input and returns the average grade as a floating-point number\",\n metadata: \"15:00\"\n },\n {\n id: \"7\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"You can provide further details or updates regarding your support ticket and its associated code. Your input here helps us better understand and address your issue effectively.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"8\",\n role: \"assistant\",\n status: \"waiting\",\n content: \"You can provide further details or updates\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"9\",\n role: \"assistant\",\n status: \"complete\",\n content: ASSISTANT_RESPONSE_SHORT_MARKDOWN,\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n }\n];\n","import {\n ChatCallbacks,\n ChatTranslations\n} from \"@genexus/chameleon-controls-library\";\nimport { ChatMessageFile } from \"@genexus/chameleon-controls-library/dist/types/components/chat/types\";\n\nimport { ASSISTANT_RESPONSE_MARKDOWN } from \"./models\";\n\nimport { ASSISTANT_NAME } from \"./models\";\nimport { MercuryChatMessageMetadata } from \"../../components/chat/lit-custom-render/types\";\n\nconst PROCESSING_PLACEHOLDER = \"{{ASSISTANT_NAME}}\";\n\nconst sendChatMessages = (chatRef: HTMLChChatElement) => () => {\n chatRef.generatingResponse = true;\n\n chatRef.addNewMessage({\n id: `${new Date().getTime()}`,\n role: \"assistant\",\n content: \"Analyzing\",\n status: \"waiting\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n });\n\n setTimeout(() => {\n chatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: \"Processing with Chat with LLMs\",\n status: \"waiting\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n \"replace\"\n );\n\n setTimeout(() => {\n dummyStreaming(chatRef, 20, ASSISTANT_RESPONSE_MARKDOWN, \"replace\");\n }, 2000);\n }, 2000);\n};\n\nconst stopGeneratingAnswer = (): Promise<void> => {\n console.log(\"stop generating answer\");\n return new Promise<void>(resolve => {\n // Lógica asincrónica aquí si es necesario\n resolve();\n });\n};\n\nexport const chatCallbacksWithChatRef = (\n chChatRef: HTMLChChatElement\n): ChatCallbacks => {\n return {\n sendChatMessages: sendChatMessages(chChatRef),\n uploadFile: (file: File) =>\n new Promise<ChatMessageFile>(() => {\n console.log(\"file\", file);\n\n return Promise.resolve({\n url: \"Error\",\n mimeType: \"application/javascript\"\n } satisfies ChatMessageFile);\n }),\n stopGeneratingAnswer: stopGeneratingAnswer\n };\n};\n\nfunction dummyStreaming(\n chatRef: HTMLChChatElement,\n counter: number,\n stringToDisplay: string,\n mode: \"concat\" | \"replace\"\n) {\n setTimeout(\n () => {\n const streamingCompleted = counter >= stringToDisplay.length;\n\n chatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: stringToDisplay.substring(counter - 20, counter),\n\n // {\n // message: stringToDisplay.substring(counter - 20, counter),\n // files: streamingCompleted\n // ? [\n // {\n // url: \"https://next.genexus.ai\",\n // caption: \"Mars Exploration Contract\"\n // },\n // {\n // url: \"https://gx-chameleon.netlify.app\",\n // caption: \"Venus Exploration Contract\"\n // }\n // ]\n // : undefined\n // },\n status: streamingCompleted ? \"complete\" : \"streaming\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n mode\n );\n\n if (!streamingCompleted) {\n dummyStreaming(chatRef, counter + 20, stringToDisplay, \"concat\");\n } else {\n chatRef.generatingResponse = false;\n }\n },\n counter % 200 === 0 ? 50 : 40\n );\n}\n\nexport const chatTranslations: ChatTranslations = {\n accessibleName: {\n clearChat: \"Clear chat\",\n copyMessageContent: \"Copy message\",\n downloadCodeButton: \"Download code\",\n sendButton: \"Send\",\n sendInput: \"Message\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n },\n placeholder: {\n sendInput: \"Ask me a question...\"\n },\n text: {\n copyCodeButton: \"Copy code\",\n copyMessageContent: \"Copy message content\",\n downloadCodeButton: \"Download code\",\n processing: `Processing with ${PROCESSING_PLACEHOLDER}`,\n sourceFiles: \"Source files:\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n }\n};\n",":host {\n block-size: 100%;\n display: grid;\n}\n","import { Component, Host, h, State, Prop, Method } from \"@stencil/core\";\nimport { MercuryBundles } from \"@genexus/mercury\";\nimport { renderItemMercury } from \"../../components/chat/lit-custom-render/render-item.lit\";\nimport { codeFixerRecord } from \"./models\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"utils/elevation\",\n \"components/chat-lit\",\n \"components/markdown-viewer\"\n];\n\nimport { chatCallbacksWithChatRef, chatTranslations } from \"./callbacks\";\nimport {\n ChatMessage,\n ChatCallbacks\n} from \"@genexus/chameleon-controls-library\";\nimport { ChatMessageUser } from \"@genexus/chameleon-controls-library/dist/types/components/chat/types\";\n\n@Component({\n tag: \"gx-ide-sc-chat-container\",\n styleUrl: \"chat-showcase.scss\",\n shadow: true\n})\nexport class GxIdeScChatContainer {\n #chatContainerRef!: HTMLGxIdeChatContainerElement;\n #chatWelcomeRef!: HTMLGxIdeChatWelcomeElement;\n #chChatRef!: HTMLChChatElement;\n #chatCallbacks: ChatCallbacks;\n\n /**\n * If true, the chat items length will be 0, since this is a requirement for dipslaying the ch-chat\n * \"empty-chat\" slot that welcome screen uses to display.\n */\n @Prop() readonly mode: \"welcome\" | \"messages-sample\" | \"empty\" =\n \"messages-sample\";\n\n @State() generatingResponse: boolean = false;\n @State() loadingState:\n | \"all-records-loaded\"\n | \"initial\"\n | \"loading\"\n | \"more-data-to-fetch\" = \"all-records-loaded\";\n @State() showAdditionalContent: boolean = false;\n @State() conversationCopied: boolean = false;\n @State() assistantStatus: string = \"Getting Data\";\n @State() chatItems: ChatMessage[] = [];\n\n /**\n * It will exit the wellcome screen and remove it from the dom.\n */\n @Method()\n async exitWelcome() {\n // hand exitWelcome to gx-ide-chat-welcome\n this.#chatWelcomeRef.exitWelcome();\n }\n\n #copyConversationCallbackHandler = () => {\n this.#chatContainerRef.showCopyConversationMessage();\n };\n\n #deleteConversationCallbackHandler = () => {};\n\n componentDidLoad() {\n setTimeout(() => {\n this.assistantStatus = \"Creating Data Base..\";\n }, 1000);\n }\n\n componentDidRender() {\n if (!this.#chatCallbacks && this.#chChatRef) {\n this.#chatCallbacks = chatCallbacksWithChatRef(this.#chChatRef);\n }\n }\n\n async componentWillLoad() {\n if (this.mode === \"messages-sample\") {\n this.chatItems = codeFixerRecord;\n } else if (this.mode === \"welcome\") {\n this.chatItems = [];\n } else if (this.mode === \"empty\") {\n this.chatItems = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content: \"Hello! I am your assistant.\",\n metadata: \"14:56\"\n }\n ];\n }\n }\n #suggestedPrompRequestedCallbackHandler = async (\n prompt: string\n ): Promise<void> => {\n let assistantFinalResponse: string;\n if (prompt.toLowerCase().includes(\"transaction\")) {\n assistantFinalResponse =\n 'To create a transaction in GeneXus, start by opening your KB (Knowledge Base) and selecting \"Transaction\" from the \"New Object\" options. Give it a name and define its attributes, starting with a primary key followed by the related data fields. GeneXus will automatically infer the data structure and relationships based on how you define the attributes and their nesting. Once saved, it generates the necessary database tables and forms for inserting, updating, and deleting records. You can then run the application to test the transaction directly in your browser.';\n } else if (prompt.toLowerCase().includes(\"entity\")) {\n assistantFinalResponse =\n 'In GeneXus, creating an entity usually means defining a Transaction object that represents a real-world concept like \"Customer\" or \"Product.\" To do this, create a new Transaction, name it after the entity, and define its attributes—starting with a unique identifier (like CustomerId) and then adding other fields (like CustomerName, CustomerEmail). GeneXus treats this Transaction as an entity and uses it to generate the corresponding table and interface automatically.';\n } else {\n assistantFinalResponse =\n \"Sorry, I didn’t catch that—mind rephrasing it? 😅\";\n }\n\n const userPrompt: ChatMessageUser = {\n id: \"1\",\n role: \"user\",\n content: prompt\n };\n this.#chChatRef.addNewMessage(userPrompt);\n setTimeout(() => {\n this.#chChatRef.addNewMessage({\n id: `${new Date().getTime()}`,\n role: \"assistant\",\n content: \"Analyzing\",\n status: \"waiting\"\n });\n setTimeout(() => {\n this.#chChatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: \"Processing with Chat with LLMs\",\n status: \"waiting\"\n },\n \"replace\"\n );\n setTimeout(() => {\n this.#chChatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: \"Getting information\",\n status: \"waiting\"\n },\n \"replace\"\n );\n this.#chChatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: assistantFinalResponse,\n status: \"complete\"\n },\n \"replace\"\n );\n }, 1500);\n }, 1500);\n }, 100);\n };\n\n render() {\n return (\n <Host>\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <gx-ide-chat-container\n chatTitle=\"GeneXus Assistant\"\n copyConversationCallback={this.#copyConversationCallbackHandler}\n deleteConversationCallback={this.#deleteConversationCallbackHandler}\n ref={el =>\n (this.#chatContainerRef = el as HTMLGxIdeChatContainerElement)\n }\n class=\"elevation-1\"\n >\n <ch-chat\n callbacks={this.#chatCallbacks}\n class=\"chat-lit\"\n generatingResponse={this.generatingResponse}\n loadingState={this.loadingState} // \"all-records-loaded\" to display the welcome screen\n renderItem={renderItemMercury}\n items={this.chatItems} // length 0 to display the welcome screen\n showAdditionalContent={this.showAdditionalContent}\n translations={chatTranslations}\n ref={(el: HTMLChChatElement) =>\n (this.#chChatRef = el as HTMLChChatElement)\n }\n markdownTheme=\"components/markdown-viewer\"\n >\n <gx-ide-chat-welcome\n ref={el =>\n (this.#chatWelcomeRef = el as HTMLGxIdeChatWelcomeElement)\n }\n slot=\"empty-chat\"\n suggestedPrompRequestedCallback={\n this.#suggestedPrompRequestedCallbackHandler\n }\n ></gx-ide-chat-welcome>\n <div slot=\"additional-content\">\n Custom content that is rendered when the chat renders content\n </div>\n </ch-chat>\n </gx-ide-chat-container>\n </Host>\n );\n }\n}\n"],"mappings":";;;;AAOO,MAAMA,IACX;;AAEK,MAAMC,IAAiB;;;;8BAyKvB;MAAMC,IAA8B;;AAiEEC,MAAMC,KACjD;EAAEC,QAAQ;IACV,CAACC,GAAGC,MACFA,IAAQ,MAAM,IACV;EACEC,IAAI,UAAUD;EACdE,MAAM;EACNC,SACE,UAAUH,MACV,UAAUA,QACV,UAAUA,QACV,UAAUA,QACV,UAAUA,QACV,UAAUA,QACV,UAAUA;IAEd;EACEC,IAAI,UAAUD;EACdE,MAAM;EACNC,SACEV,IACA,YAAYO,QACZ,UAAUA,QACV,UAAUA,QACV,UAAUA,QACV,UAAUA,QACV,UAAUA,QACV,UAAUA;;;AAIf,MAAMI,IAAiC,EAC5C;EACEH,IAAI;EACJC,MAAM;EACNC,SAAS;EACTE,UAAU;GAEZ;EACEJ,IAAI;EACJC,MAAM;EACNI,QAAQ;EACRH,SACE;EACFE,UAAU;IACRE,eAAeb;IACfc,MAAM;;GAGV;EACEP,IAAI;EACJC,MAAM;EACNI,QAAQ;EACRH,SACE;EACFE,UAAU;IACRE,eAAeb;IACfc,MAAM;;EAERC,OAAO;GAET;EACER,IAAI;EACJC,MAAM;EACNC,SACE;EACFE,UAAU;IACRE,eAAeb;IACfc,MAAM;;GAGV;EACEP,IAAI;EACJC,MAAM;EACNI,QAAQ;EACRH,SACE;EACFE,UAAU;IACRE,eAAeb;IACfc,MAAM;;EAERC,OAAO;GAET;EACER,IAAI;EACJC,MAAM;EACNC,SACE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B;MACZgB,uBAAuBrC,KAAKqC;MAC5BC,cAAcxD;MACd+C,KAAMC,KACHX,EAAAnB,MAAIE,GAAc4B,GAAuB;MAE5CS,eAAc;OAEdhB,EAAA;MACEM,KAAKC,KACFX,EAAAnB,MAAIC,GAAmB6B,GAAiC;MAE3DU,MAAK;MACLC,iCACEpC,EAAAL,MAAIQ,GAAA;QAGRe,EAAA;MAAKiB,MAAK;OAAoB"}
|
|
1
|
+
{"version":3,"names":["ASSISTANT_RESPONSE_SHORT_MARKDOWN","ASSISTANT_NAME","ASSISTANT_RESPONSE_MARKDOWN","Array","from","length","_","index","id","role","content","codeFixerRecord","metadata","status","assistantName","time","parts","PROCESSING_PLACEHOLDER","sendChatMessages","chatRef","generatingResponse","addNewMessage","Date","getTime","setTimeout","updateLastMessage","dummyStreaming","stopGeneratingAnswer","console","log","Promise","resolve","chatCallbacksWithChatRef","chChatRef","uploadFile","file","url","mimeType","counter","stringToDisplay","mode","streamingCompleted","substring","chatTranslations","accessibleName","clearChat","copyMessageContent","downloadCodeButton","sendButton","sendInput","stopGeneratingAnswerButton","placeholder","text","copyCodeButton","processing","sourceFiles","chatShowcaseCss","CSS_BUNDLES","GxIdeScChatContainer","_GxIdeScChatContainer_chatContainerRef","set","this","_GxIdeScChatContainer_chatWelcomeRef","_GxIdeScChatContainer_chChatRef","_GxIdeScChatContainer_chatCallbacks","_GxIdeScChatContainer_copyConversationCallbackHandler","__classPrivateFieldGet","showCopyConversationMessage","_GxIdeScChatContainer_deleteConversationCallbackHandler","_GxIdeScChatContainer_suggestedPrompRequestedCallbackHandler","async","prompt","assistantFinalResponse","toLowerCase","includes","userPrompt","exitWelcome","componentDidLoad","assistantStatus","componentDidRender","__classPrivateFieldSet","componentWillLoad","chatItems","render","h","Host","model","chatTitle","copyConversationCallback","deleteConversationCallback","ref","el","class","callbacks","loadingState","renderItem","renderItemMercury","items","showAdditionalContent","translations","markdownTheme","slot","suggestedPrompRequestedCallback"],"sources":["src/showcase/chat-container/models.ts","src/showcase/chat-container/callbacks.ts","src/showcase/chat-container/chat-showcase.scss?tag=gx-ide-sc-chat-container&encapsulation=shadow","src/showcase/chat-container/chat.showcase.tsx"],"sourcesContent":["import type {\n ChatMessage,\n ChatTranslations\n} from \"@genexus/chameleon-controls-library\";\n\nimport { MercuryChatMessageMetadata } from \"../../components/chat/lit-custom-render/types\";\n\nexport const ASSISTANT_RESPONSE_SHORT_MARKDOWN =\n '\\n### Code block {#code-block}\\nTo create code blocks, you’ll use three backticks (` ``` `) or three tildes (`~~~`) on the lines before and after the code block.\\n\\n```json\\n{\\n \"firstName\": \"John\",\\n \"lastName\": \"Smith\",\\n \"age\": 25\\n}';\n\nexport const ASSISTANT_NAME = \"Nexa\";\n\n// - - - - - - - - - - - - - -\n// Types of messages\n// - - - - - - - - - - - - - -\n\nexport const userMessageChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"user\",\n content:\n \"Generate a web form for customer registration with fields for name, email, phone, and address. Include validation, save the data to the database, and show a confirmation message after submission.\",\n metadata: null\n }\n];\n\nexport const assistantMessageChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"I’ve created the basic structure for the registration form, but I need a bit more info: Should the address include city, state, and ZIP? Do you want a separate confirmation page or just a message on the same screen? Any specific format or validation for the phone number?\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n }\n];\n\nexport const assistantMessageWarningChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"The CustomerRegistration panel was created with warnings: The “Phone” field uses a generic character format—consider a phone mask. No address validation rules applied.The data is still saved correctly, and the panel works as expected.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"warning\"\n }\n];\n\nexport const assistantMessageSuccessChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"The CustomerRegistration web panel was created successfully. Fields: Name, Email, Phone, Address. Validations applied (required, email format). Data saved to “Customer” transaction. Confirmation message shown after submit. Let me know if you'd like to add styles or link it to another object.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"success\"\n }\n];\n\nexport const errorMessageChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"error\",\n content:\n \"Sorry, I couldn't generate the requested form. Reason: The “Customer” transaction does not exist in the current Knowledge Base. Please create the “Customer” object or check if it’s named differently.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n }\n];\n\nexport const assistantWaitingChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"waiting\",\n content: \"Creating CustomerRegistration panel\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n }\n];\n\nexport const chatTranslations: ChatTranslations = {\n accessibleName: {\n clearChat: \"Clear chat\",\n copyMessageContent: \"Copy assistant content\",\n downloadCodeButton: \"Download code\",\n sendButton: \"Send\",\n sendInput: \"Message\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n },\n placeholder: {\n sendInput: \"Ask me a question...\"\n },\n text: {\n copyCodeButton: \"Copy code\",\n copyMessageContent: \"Copy\",\n downloadCodeButton: \"Download\",\n processing: `Processing...`,\n sourceFiles: \"Source files:\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n }\n};\n\n// All messages\n\nexport const allMessagesModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"user\",\n content:\n \"Generate a web form for customer registration with fields for name, email, phone, and address. Include validation, save the data to the database, and show a confirmation message after submission.\",\n metadata: null\n },\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"I’ve created the basic structure for the registration form, but I need a bit more info: Should the address include city, state, and ZIP? Do you want a separate confirmation page or just a message on the same screen? Any specific format or validation for the phone number?\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"The CustomerRegistration panel was created with warnings: The “Phone” field uses a generic character format—consider a phone mask. No address validation rules applied.The data is still saved correctly, and the panel works as expected.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"warning\"\n },\n {\n id: \"1\",\n role: \"error\",\n content:\n \"Sorry, I couldn't generate the requested form. Reason: The “Customer” transaction does not exist in the current Knowledge Base. Please create the “Customer” object or check if it’s named differently.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"5\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Your information has been saved successfully, and all changes are now reflected in your account. You can continue with the next steps or return to the dashboard at any time.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"15:00\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"success\"\n }\n];\n\n// - - - - - - - - - - - - - -\n// Other messages\n// - - - - - - - - - - - - - -\n\nexport const ASSISTANT_RESPONSE_MARKDOWN = `\n###### Code block {#code-block}\nTo create code blocks, you’ll use three backticks (\\` \\`\\`\\` \\`) or three tildes (\\`~~~\\`) on the lines before and after the code block.\n\n\\`\\`\\`\n{\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"age\": 25\n}\n\\`\\`\\`\n\nAnother way to create code blocks is to indent every line of the block by at least four spaces or one tab.\n\n <html>\n <head>\n </head>\n </html>\n\n\n###### Syntax Highlighting {#syntax-highlighting}\nThis feature allows you to add color highlighting for whatever language your code was written in.\nTo add syntax highlighting, specify a language next to the backticks before the fenced code block.\n\n\\`\\`\\`json\n{\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"age\": 25\n}\n\\`\\`\\`\n\n\\`\\`\\`javascript\nimport React from 'react'\nimport ReactDOM from 'react-dom'\nimport Markdown from 'react-markdown'\nimport rehypeHighlight from 'rehype-highlight'\n\nconst markdown = \\`\n# Your markdown here\n\\`\n\nReactDOM.render(\n <Markdown rehypePlugins={[rehypeHighlight]}>{markdown}</Markdown>,\n document.querySelector('#content')\n)\n\\`\\`\\`\n\n###### Horizontal Rules {#horizontal-rules}\nTo create a horizontal rule, use three or more asterisks (\\`***\\`), dashes (\\`---\\`), or underscores (\\`___\\`) on a line by themselves.\n`;\n\nexport const chatRecord: ChatMessage[] = [\n { id: \"1\", role: \"user\", content: \"Hello world\" },\n { id: \"2\", role: \"assistant\", content: ASSISTANT_RESPONSE_MARKDOWN },\n { id: \"3\", role: \"user\", content: \"Hello world 1\" },\n { id: \"4\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN },\n { id: \"5\", role: \"user\", content: \"Hello world 2\" },\n { id: \"6\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN },\n { id: \"7\", role: \"user\", content: \"Hello world 3\" },\n { id: \"8\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN },\n { id: \"9\", role: \"user\", content: \"Hello world 4\" },\n { id: \"10\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN }\n];\n\nexport const longChatRecord: ChatMessage[] = Array.from(\n { length: 40 },\n (_, index) =>\n index % 2 === 0\n ? {\n id: `index: ${index}`,\n role: \"user\",\n content:\n `index: ${index}` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n`\n }\n : {\n id: `index: ${index}`,\n role: \"assistant\",\n content:\n ASSISTANT_RESPONSE_SHORT_MARKDOWN +\n `\\nindex: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n`\n }\n);\n\nexport const codeFixerRecord: ChatMessage[] = [\n {\n id: \"1\",\n role: \"user\",\n content: \"Please give me an example about...\",\n metadata: \"14:55\"\n },\n {\n id: \"2\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Action required example. Action required example. Action required example.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"3\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Some fields contain missing or invalid data, which may prevent the process from completing correctly. Review your input carefully and make any necessary corrections before continuing.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"warning\"\n },\n {\n id: \"4\",\n role: \"error\",\n content:\n \"An unexpected error occurred while processing your request, and the operation couldn’t be completed.Please check your internet connection or try again later. If the problem persists, contact support.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"5\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Your information has been saved successfully, and all changes are now reflected in your account. You can continue with the next steps or return to the dashboard at any time.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"success\"\n },\n {\n id: \"6\",\n role: \"user\",\n content:\n \"Implement the function calculate_average_grade in grades.py that takes a list of grades as input and returns the average grade as a floating-point number\",\n metadata: \"15:00\"\n },\n {\n id: \"7\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"You can provide further details or updates regarding your support ticket and its associated code. Your input here helps us better understand and address your issue effectively.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"8\",\n role: \"assistant\",\n status: \"waiting\",\n content: \"You can provide further details or updates\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"9\",\n role: \"assistant\",\n status: \"complete\",\n content: ASSISTANT_RESPONSE_SHORT_MARKDOWN,\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n }\n];\n","import {\n ChatCallbacks,\n ChatTranslations\n} from \"@genexus/chameleon-controls-library\";\nimport { ChatMessageFile } from \"@genexus/chameleon-controls-library/dist/types/components/chat/types\";\n\nimport { ASSISTANT_RESPONSE_MARKDOWN } from \"./models\";\n\nimport { ASSISTANT_NAME } from \"./models\";\nimport { MercuryChatMessageMetadata } from \"../../components/chat/lit-custom-render/types\";\n\nconst PROCESSING_PLACEHOLDER = \"{{ASSISTANT_NAME}}\";\n\nconst sendChatMessages = (chatRef: HTMLChChatElement) => () => {\n chatRef.generatingResponse = true;\n\n chatRef.addNewMessage({\n id: `${new Date().getTime()}`,\n role: \"assistant\",\n content: \"Analyzing\",\n status: \"waiting\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n });\n\n setTimeout(() => {\n chatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: \"Processing with Chat with LLMs\",\n status: \"waiting\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n \"replace\"\n );\n\n setTimeout(() => {\n dummyStreaming(chatRef, 20, ASSISTANT_RESPONSE_MARKDOWN, \"replace\");\n }, 2000);\n }, 2000);\n};\n\nconst stopGeneratingAnswer = (): Promise<void> => {\n console.log(\"stop generating answer\");\n return new Promise<void>(resolve => {\n // Lógica asincrónica aquí si es necesario\n resolve();\n });\n};\n\nexport const chatCallbacksWithChatRef = (\n chChatRef: HTMLChChatElement\n): ChatCallbacks => {\n return {\n sendChatMessages: sendChatMessages(chChatRef),\n uploadFile: (file: File) =>\n new Promise<ChatMessageFile>(() => {\n console.log(\"file\", file);\n\n return Promise.resolve({\n url: \"Error\",\n mimeType: \"application/javascript\"\n } satisfies ChatMessageFile);\n }),\n stopGeneratingAnswer: stopGeneratingAnswer\n };\n};\n\nfunction dummyStreaming(\n chatRef: HTMLChChatElement,\n counter: number,\n stringToDisplay: string,\n mode: \"concat\" | \"replace\"\n) {\n setTimeout(\n () => {\n const streamingCompleted = counter >= stringToDisplay.length;\n\n chatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: stringToDisplay.substring(counter - 20, counter),\n\n // {\n // message: stringToDisplay.substring(counter - 20, counter),\n // files: streamingCompleted\n // ? [\n // {\n // url: \"https://next.genexus.ai\",\n // caption: \"Mars Exploration Contract\"\n // },\n // {\n // url: \"https://gx-chameleon.netlify.app\",\n // caption: \"Venus Exploration Contract\"\n // }\n // ]\n // : undefined\n // },\n status: streamingCompleted ? \"complete\" : \"streaming\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n mode\n );\n\n if (!streamingCompleted) {\n dummyStreaming(chatRef, counter + 20, stringToDisplay, \"concat\");\n } else {\n chatRef.generatingResponse = false;\n }\n },\n counter % 200 === 0 ? 50 : 40\n );\n}\n\nexport const chatTranslations: ChatTranslations = {\n accessibleName: {\n clearChat: \"Clear chat\",\n copyMessageContent: \"Copy message\",\n downloadCodeButton: \"Download code\",\n sendButton: \"Send\",\n sendInput: \"Message\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n },\n placeholder: {\n sendInput: \"Ask me a question...\"\n },\n text: {\n copyCodeButton: \"Copy code\",\n copyMessageContent: \"Copy message content\",\n downloadCodeButton: \"Download code\",\n processing: `Processing with ${PROCESSING_PLACEHOLDER}`,\n sourceFiles: \"Source files:\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n }\n};\n",":host {\n block-size: 100%;\n display: grid;\n}\n","import { Component, Host, h, State, Prop, Method } from \"@stencil/core\";\nimport { renderItemMercury } from \"../../components/chat/lit-custom-render/render-item.lit\";\nimport { codeFixerRecord } from \"./models\";\n\n// TODO: Add back \"components/chat-lit\" once chat bundle for lit is ready\n// on a new Mercury version\nconst CSS_BUNDLES = [\n \"resets/box-sizing\",\n \"utils/elevation\",\n \"components/markdown-viewer\"\n];\n\nimport { chatCallbacksWithChatRef, chatTranslations } from \"./callbacks\";\nimport {\n ChatMessage,\n ChatCallbacks\n} from \"@genexus/chameleon-controls-library\";\nimport { ChatMessageUser } from \"@genexus/chameleon-controls-library/dist/types/components/chat/types\";\n\n@Component({\n tag: \"gx-ide-sc-chat-container\",\n styleUrl: \"chat-showcase.scss\",\n shadow: true\n})\nexport class GxIdeScChatContainer {\n #chatContainerRef!: HTMLGxIdeChatContainerElement;\n #chatWelcomeRef!: HTMLGxIdeChatWelcomeElement;\n #chChatRef!: HTMLChChatElement;\n #chatCallbacks: ChatCallbacks;\n\n /**\n * If true, the chat items length will be 0, since this is a requirement for dipslaying the ch-chat\n * \"empty-chat\" slot that welcome screen uses to display.\n */\n @Prop() readonly mode: \"welcome\" | \"messages-sample\" | \"empty\" =\n \"messages-sample\";\n\n @State() generatingResponse: boolean = false;\n @State() loadingState:\n | \"all-records-loaded\"\n | \"initial\"\n | \"loading\"\n | \"more-data-to-fetch\" = \"all-records-loaded\";\n @State() showAdditionalContent: boolean = false;\n @State() conversationCopied: boolean = false;\n @State() assistantStatus: string = \"Getting Data\";\n @State() chatItems: ChatMessage[] = [];\n\n /**\n * It will exit the wellcome screen and remove it from the dom.\n */\n @Method()\n async exitWelcome() {\n // hand exitWelcome to gx-ide-chat-welcome\n this.#chatWelcomeRef.exitWelcome();\n }\n\n #copyConversationCallbackHandler = () => {\n this.#chatContainerRef.showCopyConversationMessage();\n };\n\n #deleteConversationCallbackHandler = () => {};\n\n componentDidLoad() {\n setTimeout(() => {\n this.assistantStatus = \"Creating Data Base..\";\n }, 1000);\n }\n\n componentDidRender() {\n if (!this.#chatCallbacks && this.#chChatRef) {\n this.#chatCallbacks = chatCallbacksWithChatRef(this.#chChatRef);\n }\n }\n\n async componentWillLoad() {\n if (this.mode === \"messages-sample\") {\n this.chatItems = codeFixerRecord;\n } else if (this.mode === \"welcome\") {\n this.chatItems = [];\n } else if (this.mode === \"empty\") {\n this.chatItems = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content: \"Hello! I am your assistant.\",\n metadata: \"14:56\"\n }\n ];\n }\n }\n #suggestedPrompRequestedCallbackHandler = async (\n prompt: string\n ): Promise<void> => {\n let assistantFinalResponse: string;\n if (prompt.toLowerCase().includes(\"transaction\")) {\n assistantFinalResponse =\n 'To create a transaction in GeneXus, start by opening your KB (Knowledge Base) and selecting \"Transaction\" from the \"New Object\" options. Give it a name and define its attributes, starting with a primary key followed by the related data fields. GeneXus will automatically infer the data structure and relationships based on how you define the attributes and their nesting. Once saved, it generates the necessary database tables and forms for inserting, updating, and deleting records. You can then run the application to test the transaction directly in your browser.';\n } else if (prompt.toLowerCase().includes(\"entity\")) {\n assistantFinalResponse =\n 'In GeneXus, creating an entity usually means defining a Transaction object that represents a real-world concept like \"Customer\" or \"Product.\" To do this, create a new Transaction, name it after the entity, and define its attributes—starting with a unique identifier (like CustomerId) and then adding other fields (like CustomerName, CustomerEmail). GeneXus treats this Transaction as an entity and uses it to generate the corresponding table and interface automatically.';\n } else {\n assistantFinalResponse =\n \"Sorry, I didn’t catch that—mind rephrasing it? 😅\";\n }\n\n const userPrompt: ChatMessageUser = {\n id: \"1\",\n role: \"user\",\n content: prompt\n };\n this.#chChatRef.addNewMessage(userPrompt);\n setTimeout(() => {\n this.#chChatRef.addNewMessage({\n id: `${new Date().getTime()}`,\n role: \"assistant\",\n content: \"Analyzing\",\n status: \"waiting\"\n });\n setTimeout(() => {\n this.#chChatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: \"Processing with Chat with LLMs\",\n status: \"waiting\"\n },\n \"replace\"\n );\n setTimeout(() => {\n this.#chChatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: \"Getting information\",\n status: \"waiting\"\n },\n \"replace\"\n );\n this.#chChatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: assistantFinalResponse,\n status: \"complete\"\n },\n \"replace\"\n );\n }, 1500);\n }, 1500);\n }, 100);\n };\n\n render() {\n return (\n <Host>\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <gx-ide-chat-container\n chatTitle=\"GeneXus Assistant\"\n copyConversationCallback={this.#copyConversationCallbackHandler}\n deleteConversationCallback={this.#deleteConversationCallbackHandler}\n ref={el =>\n (this.#chatContainerRef = el as HTMLGxIdeChatContainerElement)\n }\n class=\"elevation-1\"\n >\n <ch-chat\n callbacks={this.#chatCallbacks}\n class=\"chat-lit\"\n generatingResponse={this.generatingResponse}\n loadingState={this.loadingState} // \"all-records-loaded\" to display the welcome screen\n renderItem={renderItemMercury}\n items={this.chatItems} // length 0 to display the welcome screen\n showAdditionalContent={this.showAdditionalContent}\n translations={chatTranslations}\n ref={(el: HTMLChChatElement) =>\n (this.#chChatRef = el as HTMLChChatElement)\n }\n markdownTheme=\"components/markdown-viewer\"\n >\n <gx-ide-chat-welcome\n ref={el =>\n (this.#chatWelcomeRef = el as HTMLGxIdeChatWelcomeElement)\n }\n slot=\"empty-chat\"\n suggestedPrompRequestedCallback={\n this.#suggestedPrompRequestedCallbackHandler\n }\n ></gx-ide-chat-welcome>\n <div slot=\"additional-content\">\n Custom content that is rendered when the chat renders content\n </div>\n </ch-chat>\n </gx-ide-chat-container>\n </Host>\n );\n }\n}\n"],"mappings":";;;;AAOO,MAAMA,IACX;;AAEK,MAAMC,IAAiB;;;;8BAyKvB;MAAMC,IAA8B;;AAiEEC,MAAMC,KACjD;EAAEC,QAAQ;IACV,CAACC,GAAGC,MACFA,IAAQ,MAAM,IACV;EACEC,IAAI,UAAUD;EACdE,MAAM;EACNC,SACE,UAAUH,MACV,UAAUA,QACV,UAAUA,QACV,UAAUA,QACV,UAAUA,QACV,UAAUA,QACV,UAAUA;IAEd;EACEC,IAAI,UAAUD;EACdE,MAAM;EACNC,SACEV,IACA,YAAYO,QACZ,UAAUA,QACV,UAAU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