@genexus/genexus-ide-ui 1.1.55 → 1.1.57
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/assets-manager-089e91b1.js +7 -0
- package/dist/cjs/assets-manager-089e91b1.js.map +1 -0
- package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
- package/dist/cjs/gx-ide-bpm-app-declaration.cjs.entry.js +8 -4
- package/dist/cjs/gx-ide-bpm-app-declaration.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-bpm-task-documents.cjs.entry.js +8 -4
- package/dist/cjs/gx-ide-bpm-task-documents.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-chat-container_2.cjs.entry.js +12 -16
- package/dist/cjs/gx-ide-chat-container_2.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-create-kb-from-server.cjs.entry.js +8 -4
- package/dist/cjs/gx-ide-create-kb-from-server.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-current-user-info.cjs.entry.js +6 -2
- package/dist/cjs/gx-ide-current-user-info.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-data-selector.cjs.entry.js +6 -2
- package/dist/cjs/gx-ide-data-selector.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-data-type-selector.cjs.entry.js +6 -2
- package/dist/cjs/gx-ide-data-type-selector.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-design-import.cjs.entry.js +11 -7
- package/dist/cjs/gx-ide-design-import.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-details-acknowledgements.cjs.entry.js +6 -2
- package/dist/cjs/gx-ide-details-acknowledgements.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-entity-selector.cjs.entry.js +7 -3
- package/dist/cjs/gx-ide-entity-selector.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-file-item.cjs.entry.js +9 -5
- package/dist/cjs/gx-ide-file-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-file-uploader.cjs.entry.js +6 -2
- package/dist/cjs/gx-ide-file-uploader.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-json-import.cjs.entry.js +7 -3
- package/dist/cjs/gx-ide-json-import.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-kb-manager-export.cjs.entry.js +10 -6
- package/dist/cjs/gx-ide-kb-manager-export.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-kb-manager-import.cjs.entry.js +9 -5
- package/dist/cjs/gx-ide-kb-manager-import.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-manage-module-references.cjs.entry.js +7 -3
- package/dist/cjs/gx-ide-manage-module-references.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-new-kb.cjs.entry.js +6 -2
- package/dist/cjs/gx-ide-new-kb.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-new-version.cjs.entry.js +15 -3
- package/dist/cjs/gx-ide-new-version.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-object-selector.cjs.entry.js +7 -3
- package/dist/cjs/gx-ide-object-selector.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-open-api-import.cjs.entry.js +7 -3
- package/dist/cjs/gx-ide-open-api-import.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-plugin-details.cjs.entry.js +8 -4
- package/dist/cjs/gx-ide-plugin-details.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-plugin-explorer.cjs.entry.js +6 -2
- package/dist/cjs/gx-ide-plugin-explorer.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-references.cjs.entry.js +7 -3
- package/dist/cjs/gx-ide-references.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-sc-chat-container.cjs.entry.js +263 -20
- package/dist/cjs/gx-ide-sc-chat-container.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-select-kb-items.cjs.entry.js +7 -3
- package/dist/cjs/gx-ide-select-kb-items.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-server-selector.cjs.entry.js +9 -5
- package/dist/cjs/gx-ide-server-selector.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-share-kb.cjs.entry.js +6 -2
- package/dist/cjs/gx-ide-share-kb.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-splash.cjs.entry.js +6 -2
- package/dist/cjs/gx-ide-splash.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-start-page.cjs.entry.js +9 -5
- package/dist/cjs/gx-ide-start-page.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-starting-template.cjs.entry.js +6 -2
- package/dist/cjs/gx-ide-starting-template.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-team-dev-bring-changes.cjs.entry.js +14 -10
- package/dist/cjs/gx-ide-team-dev-bring-changes.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-team-dev-commit.cjs.entry.js +7 -3
- package/dist/cjs/gx-ide-team-dev-commit.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-team-dev-history.cjs.entry.js +10 -6
- package/dist/cjs/gx-ide-team-dev-history.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-team-dev-update-partial-selection.cjs.entry.js +6 -2
- package/dist/cjs/gx-ide-team-dev-update-partial-selection.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-team-dev-update.cjs.entry.js +17 -13
- package/dist/cjs/gx-ide-team-dev-update.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-welcome-page.cjs.entry.js +6 -2
- package/dist/cjs/gx-ide-welcome-page.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-ww-attributes.cjs.entry.js +6 -2
- package/dist/cjs/gx-ide-ww-attributes.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-ww-files.cjs.entry.js +8 -4
- package/dist/cjs/gx-ide-ww-files.cjs.entry.js.map +1 -1
- package/dist/cjs/index.cjs.js +0 -3
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mer-animated-dots-001c7465.js +79 -0
- package/dist/cjs/mer-animated-dots-001c7465.js.map +1 -0
- package/dist/cjs/{tabular-grid-render-b1767da2.js → tabular-grid-render-f97a5ab3.js} +18 -14
- package/dist/cjs/tabular-grid-render-f97a5ab3.js.map +1 -0
- package/dist/cjs/{utilities-0e316b39.js → utilities-0815a260.js} +10 -6
- package/dist/cjs/utilities-0815a260.js.map +1 -0
- package/dist/collection/components/chat/chat-container/chat-container.js +2 -10
- package/dist/collection/components/chat/chat-container/chat-container.js.map +1 -1
- package/dist/collection/components/new-version/gx-ide-assets/new-version/shortcuts.json +15 -0
- package/dist/collection/components/new-version/new-version.js +17 -4
- package/dist/collection/components/new-version/new-version.js.map +1 -1
- package/dist/collection/index.js +0 -2
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/showcase/chat-container/callbacks.js +9 -9
- package/dist/collection/showcase/chat-container/callbacks.js.map +1 -1
- package/dist/collection/showcase/chat-container/chat.showcase.js +4 -4
- package/dist/collection/showcase/chat-container/chat.showcase.js.map +1 -1
- package/dist/collection/showcase/chat-container/models.js +18 -18
- package/dist/collection/showcase/chat-container/models.js.map +1 -1
- package/dist/components/chat-container.js +6 -11
- package/dist/components/chat-container.js.map +1 -1
- package/dist/components/chat-welcome.js +4 -1
- package/dist/components/chat-welcome.js.map +1 -1
- package/dist/components/entity-selector.js +4 -1
- package/dist/components/entity-selector.js.map +1 -1
- package/dist/components/file-item.js +4 -1
- package/dist/components/file-item.js.map +1 -1
- package/dist/components/gx-ide-bpm-app-declaration.js +4 -1
- package/dist/components/gx-ide-bpm-app-declaration.js.map +1 -1
- package/dist/components/gx-ide-bpm-task-documents.js +4 -1
- package/dist/components/gx-ide-bpm-task-documents.js.map +1 -1
- package/dist/components/gx-ide-create-kb-from-server.js +4 -1
- package/dist/components/gx-ide-create-kb-from-server.js.map +1 -1
- package/dist/components/gx-ide-current-user-info.js +4 -1
- package/dist/components/gx-ide-current-user-info.js.map +1 -1
- package/dist/components/gx-ide-data-selector.js +4 -1
- package/dist/components/gx-ide-data-selector.js.map +1 -1
- package/dist/components/gx-ide-data-type-selector.js +4 -1
- package/dist/components/gx-ide-data-type-selector.js.map +1 -1
- package/dist/components/gx-ide-design-import.js +4 -1
- package/dist/components/gx-ide-design-import.js.map +1 -1
- package/dist/components/gx-ide-details-acknowledgements.js +4 -1
- package/dist/components/gx-ide-details-acknowledgements.js.map +1 -1
- package/dist/components/gx-ide-file-uploader.js +4 -1
- package/dist/components/gx-ide-file-uploader.js.map +1 -1
- package/dist/components/gx-ide-json-import.js +4 -1
- package/dist/components/gx-ide-json-import.js.map +1 -1
- package/dist/components/gx-ide-kb-manager-export.js +4 -1
- package/dist/components/gx-ide-kb-manager-export.js.map +1 -1
- package/dist/components/gx-ide-kb-manager-import.js +4 -1
- package/dist/components/gx-ide-kb-manager-import.js.map +1 -1
- package/dist/components/gx-ide-manage-module-references.js +4 -1
- package/dist/components/gx-ide-manage-module-references.js.map +1 -1
- package/dist/components/gx-ide-new-kb.js +4 -1
- package/dist/components/gx-ide-new-kb.js.map +1 -1
- package/dist/components/gx-ide-new-version.js +17 -4
- package/dist/components/gx-ide-new-version.js.map +1 -1
- package/dist/components/gx-ide-object-selector.js +4 -1
- package/dist/components/gx-ide-object-selector.js.map +1 -1
- package/dist/components/gx-ide-open-api-import.js +4 -1
- package/dist/components/gx-ide-open-api-import.js.map +1 -1
- package/dist/components/gx-ide-plugin-details.js +4 -1
- package/dist/components/gx-ide-plugin-details.js.map +1 -1
- package/dist/components/gx-ide-plugin-explorer.js +4 -1
- package/dist/components/gx-ide-plugin-explorer.js.map +1 -1
- package/dist/components/gx-ide-references.js +4 -1
- package/dist/components/gx-ide-references.js.map +1 -1
- package/dist/components/gx-ide-sc-chat-container.js +263 -20
- package/dist/components/gx-ide-sc-chat-container.js.map +1 -1
- package/dist/components/gx-ide-server-selector.js +4 -1
- package/dist/components/gx-ide-server-selector.js.map +1 -1
- package/dist/components/gx-ide-share-kb.js +4 -1
- package/dist/components/gx-ide-share-kb.js.map +1 -1
- package/dist/components/gx-ide-splash.js +4 -1
- package/dist/components/gx-ide-splash.js.map +1 -1
- package/dist/components/gx-ide-start-page.js +4 -1
- package/dist/components/gx-ide-start-page.js.map +1 -1
- package/dist/components/gx-ide-starting-template.js +4 -1
- package/dist/components/gx-ide-starting-template.js.map +1 -1
- package/dist/components/gx-ide-team-dev-bring-changes.js +4 -1
- package/dist/components/gx-ide-team-dev-bring-changes.js.map +1 -1
- package/dist/components/gx-ide-team-dev-history.js +4 -1
- package/dist/components/gx-ide-team-dev-history.js.map +1 -1
- package/dist/components/gx-ide-team-dev-update-partial-selection.js +4 -1
- package/dist/components/gx-ide-team-dev-update-partial-selection.js.map +1 -1
- package/dist/components/gx-ide-team-dev-update.js +4 -1
- package/dist/components/gx-ide-team-dev-update.js.map +1 -1
- package/dist/components/gx-ide-welcome-page.js +4 -1
- package/dist/components/gx-ide-welcome-page.js.map +1 -1
- package/dist/components/gx-ide-ww-attributes.js +4 -1
- package/dist/components/gx-ide-ww-attributes.js.map +1 -1
- package/dist/components/gx-ide-ww-files.js +4 -1
- package/dist/components/gx-ide-ww-files.js.map +1 -1
- package/dist/components/index.js +0 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/mer-animated-dots.js +81 -0
- package/dist/components/mer-animated-dots.js.map +1 -0
- package/dist/components/select-kb-items.js +4 -1
- package/dist/components/select-kb-items.js.map +1 -1
- package/dist/components/tabular-grid-render.js +4 -1
- package/dist/components/tabular-grid-render.js.map +1 -1
- package/dist/components/utilities.js +4 -1
- package/dist/components/utilities.js.map +1 -1
- package/dist/esm/assets-manager-7d6fc08f.js +5 -0
- package/dist/esm/assets-manager-7d6fc08f.js.map +1 -0
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-bpm-app-declaration.entry.js +5 -1
- package/dist/esm/gx-ide-bpm-app-declaration.entry.js.map +1 -1
- package/dist/esm/gx-ide-bpm-task-documents.entry.js +5 -1
- package/dist/esm/gx-ide-bpm-task-documents.entry.js.map +1 -1
- package/dist/esm/gx-ide-chat-container_2.entry.js +7 -11
- package/dist/esm/gx-ide-chat-container_2.entry.js.map +1 -1
- package/dist/esm/gx-ide-create-kb-from-server.entry.js +5 -1
- package/dist/esm/gx-ide-create-kb-from-server.entry.js.map +1 -1
- package/dist/esm/gx-ide-current-user-info.entry.js +5 -1
- package/dist/esm/gx-ide-current-user-info.entry.js.map +1 -1
- package/dist/esm/gx-ide-data-selector.entry.js +5 -1
- package/dist/esm/gx-ide-data-selector.entry.js.map +1 -1
- package/dist/esm/gx-ide-data-type-selector.entry.js +5 -1
- package/dist/esm/gx-ide-data-type-selector.entry.js.map +1 -1
- package/dist/esm/gx-ide-design-import.entry.js +5 -1
- package/dist/esm/gx-ide-design-import.entry.js.map +1 -1
- package/dist/esm/gx-ide-details-acknowledgements.entry.js +5 -1
- package/dist/esm/gx-ide-details-acknowledgements.entry.js.map +1 -1
- package/dist/esm/gx-ide-entity-selector.entry.js +5 -1
- package/dist/esm/gx-ide-entity-selector.entry.js.map +1 -1
- package/dist/esm/gx-ide-file-item.entry.js +5 -1
- package/dist/esm/gx-ide-file-item.entry.js.map +1 -1
- package/dist/esm/gx-ide-file-uploader.entry.js +5 -1
- package/dist/esm/gx-ide-file-uploader.entry.js.map +1 -1
- package/dist/esm/gx-ide-json-import.entry.js +5 -1
- package/dist/esm/gx-ide-json-import.entry.js.map +1 -1
- package/dist/esm/gx-ide-kb-manager-export.entry.js +5 -1
- package/dist/esm/gx-ide-kb-manager-export.entry.js.map +1 -1
- package/dist/esm/gx-ide-kb-manager-import.entry.js +5 -1
- package/dist/esm/gx-ide-kb-manager-import.entry.js.map +1 -1
- package/dist/esm/gx-ide-manage-module-references.entry.js +5 -1
- package/dist/esm/gx-ide-manage-module-references.entry.js.map +1 -1
- package/dist/esm/gx-ide-new-kb.entry.js +5 -1
- package/dist/esm/gx-ide-new-kb.entry.js.map +1 -1
- package/dist/esm/gx-ide-new-version.entry.js +16 -4
- package/dist/esm/gx-ide-new-version.entry.js.map +1 -1
- package/dist/esm/gx-ide-object-selector.entry.js +5 -1
- package/dist/esm/gx-ide-object-selector.entry.js.map +1 -1
- package/dist/esm/gx-ide-open-api-import.entry.js +5 -1
- package/dist/esm/gx-ide-open-api-import.entry.js.map +1 -1
- package/dist/esm/gx-ide-plugin-details.entry.js +5 -1
- package/dist/esm/gx-ide-plugin-details.entry.js.map +1 -1
- package/dist/esm/gx-ide-plugin-explorer.entry.js +5 -1
- package/dist/esm/gx-ide-plugin-explorer.entry.js.map +1 -1
- package/dist/esm/gx-ide-references.entry.js +5 -1
- package/dist/esm/gx-ide-references.entry.js.map +1 -1
- package/dist/esm/gx-ide-sc-chat-container.entry.js +263 -20
- package/dist/esm/gx-ide-sc-chat-container.entry.js.map +1 -1
- package/dist/esm/gx-ide-select-kb-items.entry.js +5 -1
- package/dist/esm/gx-ide-select-kb-items.entry.js.map +1 -1
- package/dist/esm/gx-ide-server-selector.entry.js +5 -1
- package/dist/esm/gx-ide-server-selector.entry.js.map +1 -1
- package/dist/esm/gx-ide-share-kb.entry.js +5 -1
- package/dist/esm/gx-ide-share-kb.entry.js.map +1 -1
- package/dist/esm/gx-ide-splash.entry.js +5 -1
- package/dist/esm/gx-ide-splash.entry.js.map +1 -1
- package/dist/esm/gx-ide-start-page.entry.js +5 -1
- package/dist/esm/gx-ide-start-page.entry.js.map +1 -1
- package/dist/esm/gx-ide-starting-template.entry.js +5 -1
- package/dist/esm/gx-ide-starting-template.entry.js.map +1 -1
- package/dist/esm/gx-ide-team-dev-bring-changes.entry.js +7 -3
- package/dist/esm/gx-ide-team-dev-bring-changes.entry.js.map +1 -1
- package/dist/esm/gx-ide-team-dev-commit.entry.js +7 -3
- package/dist/esm/gx-ide-team-dev-commit.entry.js.map +1 -1
- package/dist/esm/gx-ide-team-dev-history.entry.js +6 -2
- package/dist/esm/gx-ide-team-dev-history.entry.js.map +1 -1
- package/dist/esm/gx-ide-team-dev-update-partial-selection.entry.js +5 -1
- package/dist/esm/gx-ide-team-dev-update-partial-selection.entry.js.map +1 -1
- package/dist/esm/gx-ide-team-dev-update.entry.js +7 -3
- package/dist/esm/gx-ide-team-dev-update.entry.js.map +1 -1
- package/dist/esm/gx-ide-welcome-page.entry.js +5 -1
- package/dist/esm/gx-ide-welcome-page.entry.js.map +1 -1
- package/dist/esm/gx-ide-ww-attributes.entry.js +5 -1
- package/dist/esm/gx-ide-ww-attributes.entry.js.map +1 -1
- package/dist/esm/gx-ide-ww-files.entry.js +5 -1
- package/dist/esm/gx-ide-ww-files.entry.js.map +1 -1
- package/dist/esm/index.js +0 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mer-animated-dots-75d88f7e.js +77 -0
- package/dist/esm/mer-animated-dots-75d88f7e.js.map +1 -0
- package/dist/esm/{tabular-grid-render-96d67a8c.js → tabular-grid-render-2fca02f4.js} +7 -3
- package/dist/esm/tabular-grid-render-2fca02f4.js.map +1 -0
- package/dist/esm/{utilities-6624d90e.js → utilities-0cdc28eb.js} +6 -2
- package/dist/esm/utilities-0cdc28eb.js.map +1 -0
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
- package/dist/genexus-ide-ui/gx-ide-assets/new-version/shortcuts.json +15 -0
- package/dist/genexus-ide-ui/index.esm.js +0 -2
- package/dist/genexus-ide-ui/index.esm.js.map +1 -1
- package/dist/genexus-ide-ui/{p-2ce60f4c.entry.js → p-02883452.entry.js} +28 -20
- package/dist/genexus-ide-ui/{p-2ce60f4c.entry.js.map → p-02883452.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-c5eac770.entry.js → p-0548097b.entry.js} +10 -2
- package/dist/genexus-ide-ui/{p-c5eac770.entry.js.map → p-0548097b.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-64dbc4c0.entry.js → p-082780cc.entry.js} +10 -2
- package/dist/genexus-ide-ui/{p-64dbc4c0.entry.js.map → p-082780cc.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-9ac4aaa0.entry.js → p-1baf026c.entry.js} +16 -8
- package/dist/genexus-ide-ui/{p-9ac4aaa0.entry.js.map → p-1baf026c.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-098a7288.entry.js → p-1d647672.entry.js} +19 -11
- package/dist/genexus-ide-ui/{p-098a7288.entry.js.map → p-1d647672.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-13630aa2.entry.js → p-1e1d2672.entry.js} +51 -43
- package/dist/genexus-ide-ui/{p-13630aa2.entry.js.map → p-1e1d2672.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-b6a75c44.entry.js → p-207a698a.entry.js} +57 -49
- package/dist/genexus-ide-ui/{p-b6a75c44.entry.js.map → p-207a698a.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-d18c51fe.entry.js → p-2726ab59.entry.js} +18 -10
- package/dist/genexus-ide-ui/{p-d18c51fe.entry.js.map → p-2726ab59.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-0c5b7e75.entry.js → p-27633aae.entry.js} +10 -2
- package/dist/genexus-ide-ui/{p-0c5b7e75.entry.js.map → p-27633aae.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-2fe7ffc8.entry.js → p-28c11aff.entry.js} +32 -24
- package/dist/genexus-ide-ui/{p-2fe7ffc8.entry.js.map → p-28c11aff.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-3b955964.entry.js → p-2a51ea80.entry.js} +10 -2
- package/dist/genexus-ide-ui/{p-3b955964.entry.js.map → p-2a51ea80.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-1056dfe7.entry.js → p-336bb2ce.entry.js} +28 -20
- package/dist/genexus-ide-ui/{p-1056dfe7.entry.js.map → p-336bb2ce.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-ac026635.entry.js → p-364e8ecb.entry.js} +16 -8
- package/dist/genexus-ide-ui/{p-ac026635.entry.js.map → p-364e8ecb.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/p-3c14bdfc.entry.js +234 -0
- package/dist/genexus-ide-ui/p-3c14bdfc.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-1d044bf5.entry.js → p-4548ae72.entry.js} +17 -9
- package/dist/genexus-ide-ui/{p-1d044bf5.entry.js.map → p-4548ae72.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-80e49324.entry.js → p-46bb921b.entry.js} +36 -28
- package/dist/genexus-ide-ui/{p-80e49324.entry.js.map → p-46bb921b.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-11a60dbe.entry.js → p-506760d7.entry.js} +10 -2
- package/dist/genexus-ide-ui/{p-11a60dbe.entry.js.map → p-506760d7.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/p-6e29711e.entry.js +608 -0
- package/dist/genexus-ide-ui/p-6e29711e.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-7b986243.entry.js → p-71d4d3dd.entry.js} +32 -24
- package/dist/genexus-ide-ui/{p-7b986243.entry.js.map → p-71d4d3dd.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-891faf90.entry.js → p-77c315d9.entry.js} +28 -20
- package/dist/genexus-ide-ui/{p-891faf90.entry.js.map → p-77c315d9.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-18bbaa49.entry.js → p-7c95f511.entry.js} +16 -8
- package/dist/genexus-ide-ui/{p-18bbaa49.entry.js.map → p-7c95f511.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-eedb407c.entry.js → p-7e3cccf7.entry.js} +10 -2
- package/dist/genexus-ide-ui/{p-eedb407c.entry.js.map → p-7e3cccf7.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-410a35da.entry.js → p-8925fc99.entry.js} +40 -32
- package/dist/genexus-ide-ui/{p-410a35da.entry.js.map → p-8925fc99.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-072419f9.entry.js → p-94f74c12.entry.js} +18 -10
- package/dist/genexus-ide-ui/{p-072419f9.entry.js.map → p-94f74c12.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-d24c1115.entry.js → p-97f6438c.entry.js} +67 -59
- package/dist/genexus-ide-ui/{p-d24c1115.entry.js.map → p-97f6438c.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-9270c80f.entry.js → p-981873da.entry.js} +114 -118
- package/dist/genexus-ide-ui/p-981873da.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-17b54532.entry.js → p-99b1dfd7.entry.js} +39 -31
- package/dist/genexus-ide-ui/{p-17b54532.entry.js.map → p-99b1dfd7.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-e1d0adf6.entry.js → p-9f7c347c.entry.js} +24 -16
- package/dist/genexus-ide-ui/{p-e1d0adf6.entry.js.map → p-9f7c347c.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-eacc81c8.entry.js → p-a28c2a64.entry.js} +122 -114
- package/dist/genexus-ide-ui/{p-eacc81c8.entry.js.map → p-a28c2a64.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-cccd6565.entry.js → p-a73db549.entry.js} +10 -2
- package/dist/genexus-ide-ui/{p-cccd6565.entry.js.map → p-a73db549.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-547fbde8.entry.js → p-be1ceb01.entry.js} +28 -20
- package/dist/genexus-ide-ui/{p-547fbde8.entry.js.map → p-be1ceb01.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-7adb9d1f.entry.js → p-c133095b.entry.js} +78 -70
- package/dist/genexus-ide-ui/{p-7adb9d1f.entry.js.map → p-c133095b.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-a58048e9.entry.js → p-c1c3996c.entry.js} +12 -4
- package/dist/genexus-ide-ui/{p-a58048e9.entry.js.map → p-c1c3996c.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-7551c2e9.entry.js → p-c426a3e7.entry.js} +22 -14
- package/dist/genexus-ide-ui/{p-7551c2e9.entry.js.map → p-c426a3e7.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-4f88fecd.entry.js → p-d12739cf.entry.js} +17 -9
- package/dist/genexus-ide-ui/{p-4f88fecd.entry.js.map → p-d12739cf.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-c8270f7d.js → p-d3ee56a4.js} +45 -37
- package/dist/genexus-ide-ui/{p-c8270f7d.js.map → p-d3ee56a4.js.map} +1 -1
- package/dist/genexus-ide-ui/p-d42e842b.js +7 -0
- package/dist/genexus-ide-ui/p-d42e842b.js.map +1 -0
- package/dist/genexus-ide-ui/{p-401bfc97.js → p-d4ecd3bb.js} +9366 -7152
- package/dist/genexus-ide-ui/p-d4ecd3bb.js.map +1 -0
- package/dist/genexus-ide-ui/{p-48e87e4f.entry.js → p-de6e9132.entry.js} +71 -63
- package/dist/genexus-ide-ui/{p-48e87e4f.entry.js.map → p-de6e9132.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-05fa08d7.entry.js → p-e4e3a7af.entry.js} +19 -11
- package/dist/genexus-ide-ui/{p-05fa08d7.entry.js.map → p-e4e3a7af.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-a24571ca.js → p-ea4b35b6.js} +19 -11
- package/dist/genexus-ide-ui/{p-a24571ca.js.map → p-ea4b35b6.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-bd0ffc08.entry.js → p-f47b08c5.entry.js} +44 -36
- package/dist/genexus-ide-ui/{p-bd0ffc08.entry.js.map → p-f47b08c5.entry.js.map} +1 -1
- package/dist/types/components/new-version/new-version.d.ts +4 -0
- package/dist/types/index.d.ts +0 -2
- package/package.json +9 -8
- package/dist/cjs/MERCURY_ASSETS-f14e91ff.js +0 -9
- package/dist/cjs/MERCURY_ASSETS-f14e91ff.js.map +0 -1
- package/dist/cjs/render-item.lit-3f18e009.js +0 -329
- package/dist/cjs/render-item.lit-3f18e009.js.map +0 -1
- package/dist/cjs/tabular-grid-render-b1767da2.js.map +0 -1
- package/dist/cjs/utilities-0e316b39.js.map +0 -1
- package/dist/collection/components/chat/chat-container/gx-ide-assets/chat-container/chat-lit.css +0 -376
- package/dist/collection/components/chat/lit-custom-render/actions.lit.js +0 -27
- package/dist/collection/components/chat/lit-custom-render/actions.lit.js.map +0 -1
- package/dist/collection/components/chat/lit-custom-render/code-block.lit.js +0 -46
- package/dist/collection/components/chat/lit-custom-render/code-block.lit.js.map +0 -1
- package/dist/collection/components/chat/lit-custom-render/dots-animation.js +0 -61
- package/dist/collection/components/chat/lit-custom-render/dots-animation.js.map +0 -1
- package/dist/collection/components/chat/lit-custom-render/render-item.lit.js +0 -122
- package/dist/collection/components/chat/lit-custom-render/render-item.lit.js.map +0 -1
- package/dist/collection/components/chat/lit-custom-render/spinner-animation.js +0 -58
- package/dist/collection/components/chat/lit-custom-render/spinner-animation.js.map +0 -1
- package/dist/collection/components/chat/lit-custom-render/types.js +0 -2
- package/dist/collection/components/chat/lit-custom-render/types.js.map +0 -1
- package/dist/collection/components/chat/lit-custom-render/utils.js +0 -50
- package/dist/collection/components/chat/lit-custom-render/utils.js.map +0 -1
- package/dist/components/MERCURY_ASSETS.js +0 -7
- package/dist/components/MERCURY_ASSETS.js.map +0 -1
- package/dist/components/render-item.lit.js +0 -327
- package/dist/components/render-item.lit.js.map +0 -1
- package/dist/esm/MERCURY_ASSETS-ccf43ae3.js +0 -7
- package/dist/esm/MERCURY_ASSETS-ccf43ae3.js.map +0 -1
- package/dist/esm/render-item.lit-449f2946.js +0 -327
- package/dist/esm/render-item.lit-449f2946.js.map +0 -1
- package/dist/esm/tabular-grid-render-96d67a8c.js.map +0 -1
- package/dist/esm/utilities-6624d90e.js.map +0 -1
- package/dist/genexus-ide-ui/gx-ide-assets/chat-container/chat-lit.css +0 -376
- package/dist/genexus-ide-ui/p-401bfc97.js.map +0 -1
- package/dist/genexus-ide-ui/p-5f65a4bb.entry.js +0 -218
- package/dist/genexus-ide-ui/p-5f65a4bb.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-8d6f2b4f.entry.js +0 -359
- package/dist/genexus-ide-ui/p-8d6f2b4f.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-9270c80f.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-fd4f9904.js +0 -955
- package/dist/genexus-ide-ui/p-fd4f9904.js.map +0 -1
- package/dist/types/components/chat/lit-custom-render/actions.lit.d.ts +0 -2
- package/dist/types/components/chat/lit-custom-render/code-block.lit.d.ts +0 -2
- package/dist/types/components/chat/lit-custom-render/dots-animation.d.ts +0 -5
- package/dist/types/components/chat/lit-custom-render/render-item.lit.d.ts +0 -3
- package/dist/types/components/chat/lit-custom-render/spinner-animation.d.ts +0 -5
- package/dist/types/components/chat/lit-custom-render/types.d.ts +0 -4
- package/dist/types/components/chat/lit-custom-render/utils.d.ts +0 -23
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callbacks.js","sourceRoot":"","sources":["../../../src/showcase/chat-container/callbacks.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAEvD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG1C,MAAM,sBAAsB,GAAG,oBAAoB,CAAC;AAEpD,MAAM,gBAAgB,GAAG,CAAC,OAA0B,EAAE,EAAE,CAAC,GAAG,EAAE;IAC5D,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"callbacks.js","sourceRoot":"","sources":["../../../src/showcase/chat-container/callbacks.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAEvD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG1C,MAAM,sBAAsB,GAAG,oBAAoB,CAAC;AAEpD,MAAM,gBAAgB,G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AAE;QACd,SAAS,EAAE,YAAY;QACvB,kBAAkB,EAAE,cAAc;QAClC,kBAAkB,EAAE,eAAe;QACnC,UAAU,EAAE,MAAM;QAClB,SAAS,EAAE,SAAS;QACpB,kBAAkB,EAAE,wBAAwB;KAC7C;IACD,WAAW,EAAE;QACX,SAAS,EAAE,sBAAsB;KAClC;IACD,IAAI,EAAE;QACJ,cAAc,EAAE,WAAW;QAC3B,kBAAkB,EAAE,sBAAsB;QAC1C,kBAAkB,EAAE,eAAe;QACnC,UAAU,EAAE,mBAAmB,sBAAsB,EAAE;QACvD,WAAW,EAAE,eAAe;QAC5B,kBAAkB,EAAE,EAAE;KACvB;CACF,CAAC","sourcesContent":["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 \"@genexus/mercury\";\n\nconst PROCESSING_PLACEHOLDER = \"{{ASSISTANT_NAME}}\";\n\nconst sendChatMessages = (chatRef: HTMLChChatElement) => () => {\n chatRef.waitingResponse = true;\n\n chatRef.addNewMessage({\n id: `${new Date().getTime()}`,\n role: \"assistant\",\n content: \"Analyzing\",\n status: \"waiting\",\n metadata: {\n agentName: 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 agentName: 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 stopResponseAnswer = (): 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 stopResponse: stopResponseAnswer\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 agentName: 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.waitingResponse = 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 stopResponseButton: \"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 stopResponseButton: \"\"\n }\n};\n"]}
|
|
@@ -16,13 +16,13 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
16
16
|
};
|
|
17
17
|
var _GxIdeScChatContainer_chatContainerRef, _GxIdeScChatContainer_chatWelcomeRef, _GxIdeScChatContainer_chChatRef, _GxIdeScChatContainer_chatCallbacks, _GxIdeScChatContainer_copyConversationCallbackHandler, _GxIdeScChatContainer_deleteConversationCallbackHandler, _GxIdeScChatContainer_suggestedPrompRequestedCallbackHandler;
|
|
18
18
|
import { Host, h } from "@stencil/core";
|
|
19
|
-
import {
|
|
19
|
+
import { renderItem as mercuryChatRenderItem } from "@genexus/mercury";
|
|
20
|
+
import { sendContainerLayout as mercurySendContainerLayout } from "@genexus/mercury";
|
|
20
21
|
import { codeFixerRecord } from "./models";
|
|
21
|
-
// TODO: Add back "components/chat-lit" once chat bundle for lit is ready
|
|
22
|
-
// on a new Mercury version
|
|
23
22
|
const CSS_BUNDLES = [
|
|
24
23
|
"resets/box-sizing",
|
|
25
24
|
"utils/elevation",
|
|
25
|
+
"components/chat",
|
|
26
26
|
"components/markdown-viewer"
|
|
27
27
|
];
|
|
28
28
|
import { chatCallbacksWithChatRef, chatTranslations } from "./callbacks";
|
|
@@ -129,7 +129,7 @@ export class GxIdeScChatContainer {
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
render() {
|
|
132
|
-
return (h(Host, null, h("ch-theme", { model: CSS_BUNDLES }), h("gx-ide-chat-container", { chatTitle: "GeneXus Assistant", copyConversationCallback: __classPrivateFieldGet(this, _GxIdeScChatContainer_copyConversationCallbackHandler, "f"), deleteConversationCallback: __classPrivateFieldGet(this, _GxIdeScChatContainer_deleteConversationCallbackHandler, "f"), ref: el => (__classPrivateFieldSet(this, _GxIdeScChatContainer_chatContainerRef, el, "f")), class: "elevation-1" }, h("ch-chat", { callbacks: __classPrivateFieldGet(this, _GxIdeScChatContainer_chatCallbacks, "f"), class: "chat
|
|
132
|
+
return (h(Host, null, h("ch-theme", { model: CSS_BUNDLES }), h("gx-ide-chat-container", { chatTitle: "GeneXus Assistant", copyConversationCallback: __classPrivateFieldGet(this, _GxIdeScChatContainer_copyConversationCallbackHandler, "f"), deleteConversationCallback: __classPrivateFieldGet(this, _GxIdeScChatContainer_deleteConversationCallbackHandler, "f"), ref: el => (__classPrivateFieldSet(this, _GxIdeScChatContainer_chatContainerRef, el, "f")), class: "elevation-1" }, h("ch-chat", { callbacks: __classPrivateFieldGet(this, _GxIdeScChatContainer_chatCallbacks, "f"), class: "chat", waitingResponse: this.generatingResponse, loadingState: this.loadingState, renderItem: mercuryChatRenderItem, items: this.chatItems, showAdditionalContent: false, sendContainerLayout: mercurySendContainerLayout, translations: chatTranslations, ref: (el) => (__classPrivateFieldSet(this, _GxIdeScChatContainer_chChatRef, el, "f")), markdownTheme: "components/markdown-viewer" }, h("gx-ide-chat-welcome", { ref: el => (__classPrivateFieldSet(this, _GxIdeScChatContainer_chatWelcomeRef, el, "f")), slot: "empty-chat", suggestedPrompRequestedCallback: __classPrivateFieldGet(this, _GxIdeScChatContainer_suggestedPrompRequestedCallbackHandler, "f") }), h("div", { slot: "additional-content" }, "Custom content that is rendered when the chat renders content")))));
|
|
133
133
|
}
|
|
134
134
|
static get is() { return "gx-ide-sc-chat-container"; }
|
|
135
135
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.showcase.js","sourceRoot":"","sources":["../../../src/showcase/chat-container/chat.showcase.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yDAAyD,CAAC;AAC5F,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;A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BAAA,IAAI,oEAAwC,GAEzB;oBACvB,WAAK,IAAI,EAAC,oBAAoB,oEAExB,CACE,CACY,CACnB,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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"]}
|
|
1
|
+
{"version":3,"file":"chat.showcase.js","sourceRoot":"","s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qBAAqB,EAAE,KAAK,EAC5B,mBAAmB,EAAE,0BAA0B,EAC/C,YAAY,EAAE,gBAAgB,EAC9B,GAAG,EAAE,CAAC,EAAqB,EAAE,EAAE,CAC7B,CAAC,uBAAA,IAAI,mCAAc,EAAuB,MAAA,CAAC,EAE7C,aAAa,EAAC,4BAA4B;oBAE1C,2BACE,GAAG,EAAE,EAAE,CAAC,EAAE,CACR,CAAC,uBAAA,IAAI,wCAAmB,EAAiC,MAAA,CAAC,EAE5D,IAAI,EAAC,YAAY,EACjB,+BAA+B,EAC7B,uBAAA,IAAI,oEAAwC,GAEzB;oBACvB,WAAK,IAAI,EAAC,oBAAoB,oEAExB,CACE,CACY,CACnB,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, State, Prop, Method } from \"@stencil/core\";\nimport { renderItem as mercuryChatRenderItem } from \"@genexus/mercury\";\nimport { sendContainerLayout as mercurySendContainerLayout } from \"@genexus/mercury\";\nimport { codeFixerRecord } from \"./models\";\n\nconst CSS_BUNDLES = [\n \"resets/box-sizing\",\n \"utils/elevation\",\n \"components/chat\",\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\"\n waitingResponse={this.generatingResponse}\n loadingState={this.loadingState} // \"all-records-loaded\" to display the welcome screen\n renderItem={mercuryChatRenderItem}\n items={this.chatItems} // length 0 to display the welcome screen\n showAdditionalContent={false}\n sendContainerLayout={mercurySendContainerLayout}\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"]}
|
|
@@ -18,7 +18,7 @@ export const assistantMessageChatModel = [
|
|
|
18
18
|
status: "complete",
|
|
19
19
|
content: "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?",
|
|
20
20
|
metadata: {
|
|
21
|
-
|
|
21
|
+
agentName: ASSISTANT_NAME,
|
|
22
22
|
time: "14:25"
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -30,7 +30,7 @@ export const assistantMessageWarningChatModel = [
|
|
|
30
30
|
status: "complete",
|
|
31
31
|
content: "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.",
|
|
32
32
|
metadata: {
|
|
33
|
-
|
|
33
|
+
agentName: ASSISTANT_NAME,
|
|
34
34
|
time: "14:25"
|
|
35
35
|
},
|
|
36
36
|
parts: "warning"
|
|
@@ -43,7 +43,7 @@ export const assistantMessageSuccessChatModel = [
|
|
|
43
43
|
status: "complete",
|
|
44
44
|
content: "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.",
|
|
45
45
|
metadata: {
|
|
46
|
-
|
|
46
|
+
agentName: ASSISTANT_NAME,
|
|
47
47
|
time: "14:25"
|
|
48
48
|
},
|
|
49
49
|
parts: "success"
|
|
@@ -55,7 +55,7 @@ export const errorMessageChatModel = [
|
|
|
55
55
|
role: "error",
|
|
56
56
|
content: "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.",
|
|
57
57
|
metadata: {
|
|
58
|
-
|
|
58
|
+
agentName: ASSISTANT_NAME,
|
|
59
59
|
time: "14:25"
|
|
60
60
|
}
|
|
61
61
|
}
|
|
@@ -67,7 +67,7 @@ export const assistantWaitingChatModel = [
|
|
|
67
67
|
status: "waiting",
|
|
68
68
|
content: "Creating CustomerRegistration panel",
|
|
69
69
|
metadata: {
|
|
70
|
-
|
|
70
|
+
agentName: ASSISTANT_NAME,
|
|
71
71
|
time: "14:25"
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -79,7 +79,7 @@ export const chatTranslations = {
|
|
|
79
79
|
downloadCodeButton: "Download code",
|
|
80
80
|
sendButton: "Send",
|
|
81
81
|
sendInput: "Message",
|
|
82
|
-
|
|
82
|
+
stopResponseButton: "Stop generating answer"
|
|
83
83
|
},
|
|
84
84
|
placeholder: {
|
|
85
85
|
sendInput: "Ask me a question..."
|
|
@@ -90,7 +90,7 @@ export const chatTranslations = {
|
|
|
90
90
|
downloadCodeButton: "Download",
|
|
91
91
|
processing: `Processing...`,
|
|
92
92
|
sourceFiles: "Source files:",
|
|
93
|
-
|
|
93
|
+
stopResponseButton: "Stop generating answer"
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
96
|
// All messages
|
|
@@ -107,7 +107,7 @@ export const allMessagesModel = [
|
|
|
107
107
|
status: "complete",
|
|
108
108
|
content: "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?",
|
|
109
109
|
metadata: {
|
|
110
|
-
|
|
110
|
+
agentName: ASSISTANT_NAME,
|
|
111
111
|
time: "14:25"
|
|
112
112
|
}
|
|
113
113
|
},
|
|
@@ -117,7 +117,7 @@ export const allMessagesModel = [
|
|
|
117
117
|
status: "complete",
|
|
118
118
|
content: "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.",
|
|
119
119
|
metadata: {
|
|
120
|
-
|
|
120
|
+
agentName: ASSISTANT_NAME,
|
|
121
121
|
time: "14:25"
|
|
122
122
|
},
|
|
123
123
|
parts: "warning"
|
|
@@ -127,7 +127,7 @@ export const allMessagesModel = [
|
|
|
127
127
|
role: "error",
|
|
128
128
|
content: "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.",
|
|
129
129
|
metadata: {
|
|
130
|
-
|
|
130
|
+
agentName: ASSISTANT_NAME,
|
|
131
131
|
time: "14:25"
|
|
132
132
|
}
|
|
133
133
|
},
|
|
@@ -137,7 +137,7 @@ export const allMessagesModel = [
|
|
|
137
137
|
status: "complete",
|
|
138
138
|
content: "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.",
|
|
139
139
|
metadata: {
|
|
140
|
-
|
|
140
|
+
agentName: ASSISTANT_NAME,
|
|
141
141
|
time: "15:00"
|
|
142
142
|
},
|
|
143
143
|
parts: "success"
|
|
@@ -246,7 +246,7 @@ export const codeFixerRecord = [
|
|
|
246
246
|
status: "complete",
|
|
247
247
|
content: "Action required example. Action required example. Action required example.",
|
|
248
248
|
metadata: {
|
|
249
|
-
|
|
249
|
+
agentName: ASSISTANT_NAME,
|
|
250
250
|
time: "14:25"
|
|
251
251
|
}
|
|
252
252
|
},
|
|
@@ -256,7 +256,7 @@ export const codeFixerRecord = [
|
|
|
256
256
|
status: "complete",
|
|
257
257
|
content: "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.",
|
|
258
258
|
metadata: {
|
|
259
|
-
|
|
259
|
+
agentName: ASSISTANT_NAME,
|
|
260
260
|
time: "14:25"
|
|
261
261
|
},
|
|
262
262
|
parts: "warning"
|
|
@@ -266,7 +266,7 @@ export const codeFixerRecord = [
|
|
|
266
266
|
role: "error",
|
|
267
267
|
content: "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.",
|
|
268
268
|
metadata: {
|
|
269
|
-
|
|
269
|
+
agentName: ASSISTANT_NAME,
|
|
270
270
|
time: "14:25"
|
|
271
271
|
}
|
|
272
272
|
},
|
|
@@ -276,7 +276,7 @@ export const codeFixerRecord = [
|
|
|
276
276
|
status: "complete",
|
|
277
277
|
content: "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.",
|
|
278
278
|
metadata: {
|
|
279
|
-
|
|
279
|
+
agentName: ASSISTANT_NAME,
|
|
280
280
|
time: "14:25"
|
|
281
281
|
},
|
|
282
282
|
parts: "success"
|
|
@@ -293,7 +293,7 @@ export const codeFixerRecord = [
|
|
|
293
293
|
status: "complete",
|
|
294
294
|
content: "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.",
|
|
295
295
|
metadata: {
|
|
296
|
-
|
|
296
|
+
agentName: ASSISTANT_NAME,
|
|
297
297
|
time: "14:25"
|
|
298
298
|
}
|
|
299
299
|
},
|
|
@@ -303,7 +303,7 @@ export const codeFixerRecord = [
|
|
|
303
303
|
status: "waiting",
|
|
304
304
|
content: "You can provide further details or updates",
|
|
305
305
|
metadata: {
|
|
306
|
-
|
|
306
|
+
agentName: ASSISTANT_NAME,
|
|
307
307
|
time: "14:25"
|
|
308
308
|
}
|
|
309
309
|
},
|
|
@@ -313,7 +313,7 @@ export const codeFixerRecord = [
|
|
|
313
313
|
status: "complete",
|
|
314
314
|
content: ASSISTANT_RESPONSE_SHORT_MARKDOWN,
|
|
315
315
|
metadata: {
|
|
316
|
-
|
|
316
|
+
agentName: ASSISTANT_NAME,
|
|
317
317
|
time: "14:25"
|
|
318
318
|
}
|
|
319
319
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/showcase/chat-container/models.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,iCAAiC,GAC5C,iPAAiP,CAAC;AAEpP,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC;AAErC,8BAA8B;AAC9B,oBAAoB;AACpB,8BAA8B;AAE9B,MAAM,CAAC,MAAM,oBAAoB,GAAkB;IACjD;QACE,EAAE,EAAE,GAAG;QACP,IAAI,EAAE,MAAM;QACZ,OAAO,EACL,qMAAqM;QACvM,QAAQ,EAAE,IAAI;KACf;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAkB;IACtD;QACE,EAAE,EAAE,GAAG;QACP,IAAI,EAAE,WAAW;QACjB,MAAM,EAAE,UAAU;QAClB,OAAO,EACL,iRAAiR;QACnR,QAAQ,EAAE;YACR,aAAa,EAAE,cAAc;YAC7B,IAAI,EAAE,OAAO;SACuB;KACvC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,gCAAgC,GAAkB;IAC7D;QACE,EAAE,EAAE,GAAG;QACP,IAAI,EAAE,WAAW;QACjB,MAAM,EAAE,UAAU;QAClB,OAAO,EACL,4OAA4O;QAC9O,QAAQ,EAAE;YACR,aAAa,EAAE,cAAc;YAC7B,IAAI,EAAE,OAAO;SACuB;QACtC,KAAK,EAAE,SAAS;KACjB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,gCAAgC,GAAkB;IAC7D;QACE,EAAE,EAAE,GAAG;QACP,IAAI,EAAE,WAAW;QACjB,MAAM,EAAE,UAAU;QAClB,OAAO,EACL,sSAAsS;QACxS,QAAQ,EAAE;YACR,aAAa,EAAE,cAAc;YAC7B,IAAI,EAAE,OAAO;SACuB;QACtC,KAAK,EAAE,SAAS;KACjB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAkB;IAClD;QACE,EAAE,EAAE,GAAG;QACP,IAAI,EAAE,OAAO;QACb,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,UAAU;QAClB,OAAO,EAAE,iCAAiC;QAC1C,QAAQ,EAAE;YACR,aAAa,EAAE,cAAc;YAC7B,IAAI,EAAE,OAAO;SACuB;KACvC;CACF,CAAC","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"]}
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/showcase/chat-container/models.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,iCAAiC,GAC5C,iPAAiP,CAAC;AAEpP,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC;AAErC,8BAA8B;AAC9B,oBAAoB;AACpB,8BAA8B;AAE9B,MAAM,CAAC,MAAM,oBAAoB,GAAkB;IACjD;QACE,EAAE,EAAE,GAAG;QACP,IAAI,EAAE,MAAM;QACZ,OAAO,EACL,qMAAqM;QACvM,QAAQ,EAAE,IAAI;KACf;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAkB;IACtD;QACE,EAAE,EAAE,GAAG;QACP,IAAI,EAAE,WAAW;QACjB,MAAM,EAAE,UAAU;QAClB,OAAO,EACL,iRAAiR;QACnR,QAAQ,EAAE;YACR,SAAS,EAAE,cAAc;YACzB,IAAI,EAAE,OAAO;SACuB;KACvC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,gCAAgC,GAAkB;IAC7D;QACE,EAAE,EAAE,GAAG;QACP,IAAI,EAAE,WAAW;QACjB,MAAM,EAAE,UAAU;QAClB,OAAO,EACL,4OAA4O;QAC9O,QAAQ,EAAE;YACR,SAAS,EAAE,cAAc;YACzB,IAAI,EAAE,OAAO;SACuB;QACtC,KAAK,EAAE,SAAS;KACjB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,gCAAgC,GAAkB;IAC7D;QACE,EAAE,EAAE,GAAG;QACP,IAAI,EAAE,WAAW;QACjB,MAAM,EAAE,UAAU;QAClB,OAAO,EACL,sSAAsS;QACxS,QAAQ,EAAE;YACR,SAAS,EAAE,cAAc;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,4CAA4C;QACrD,QAAQ,EAAE;YACR,SAAS,EAAE,cAAc;YACzB,IAAI,EAAE,OAAO;SACuB;KACvC;IACD;QACE,EAAE,EAAE,GAAG;QACP,IAAI,EAAE,WAAW;QACjB,MAAM,EAAE,UAAU;QAClB,OAAO,EAAE,iCAAiC;QAC1C,QAAQ,EAAE;YACR,SAAS,EAAE,cAAc;YACzB,IAAI,EAAE,OAAO;SACuB;KACvC;CACF,CAAC","sourcesContent":["import type {\n ChatMessage,\n ChatTranslations\n} from \"@genexus/chameleon-controls-library\";\n\nimport { MercuryChatMessageMetadata } from \"@genexus/mercury\";\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 agentName: 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 agentName: 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 agentName: 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 agentName: 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 agentName: 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 stopResponseButton: \"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 stopResponseButton: \"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 agentName: 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 agentName: 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 agentName: 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 agentName: 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 agentName: 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 agentName: 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 agentName: 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 agentName: 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 agentName: 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 agentName: 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 agentName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n }\n];\n"]}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { g as getIconPath } from './
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { g as getIconPath } from './mer-animated-dots.js';
|
|
3
|
+
import 'lit';
|
|
4
|
+
import 'lit/directives/when.js';
|
|
5
|
+
import 'lit/directives/if-defined.js';
|
|
3
6
|
import { L as Locale } from './locale.js';
|
|
4
7
|
|
|
5
8
|
const chatContainerCss = ".chat-container{background-color:var(--elevation-background-color, --mer-surface__elevation--01);display:grid;block-size:100%;overflow:auto;grid-template-rows:1fr;position:relative;--chat-common-border-radius:var(--mer-spacing--2xs)}.chat-container.with-header{grid-template-rows:max-content 1fr}.section{display:contents}.header{padding:var(--mer-spacing--2xs) var(--mer-spacing--2xs) var(--mer-spacing--2xs) var(--mer-spacing--sm);display:flex;align-items:center;justify-content:space-between;gap:var(--mer-spacing--sm);color:var(--mer-text__bright);border-block-end:var(--mer-border__width--sm) solid var(--color-border-surface-on-elevation-01, #333d47)}.header .button-copy-chat,.header .button-delete-chat{--control__border-color:transparent !important}.header .button-delete-chat:hover{filter:brightness(1.3)}.header .button-delete-chat:active{filter:brightness(0.8)}.ch-chat-container{overflow:auto;position:relative;display:grid}.chat-container__conversation-copied{position:absolute;z-index:1;inline-size:100%;block-size:100%;background:rgba(22, 22, 23, 0.75);backdrop-filter:saturate(180%) blur(20px);display:grid;align-items:center;justify-content:center;text-align:center;padding:32px;--mer-icon__box--md:18px;pointer-events:none;overflow:hidden;animation:fadeIn 100ms ease-in-out forwards;opacity:0}.chat-container__conversation-copied-wrapper{display:flex;align-items:center;gap:var(--mer-spacing--sm);position:relative;inset-block-start:4px;opacity:0;animation:liftUp var(--mer-timing--fast) ease-in-out forwards;animation-delay:var(--mer-timing--fast)}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes liftUp{from{opacity:0;inset-block-start:4px}to{opacity:1;inset-block-start:0}}.chat::part(code-block-header__copy){--copy-text-opacity:0;--copy-text-translate-x:6px;opacity:var(--copy-text-opacity);pointer-events:none;transform:translateX(var(--copy-text-translate-x));transition:opacity 100ms ease-in-out, transform 100ms ease-in-out;font-size:12px}.chat::part(code-block-header__copy-copied){--copy-button-pointer-events:none !important;--copy-text-opacity:1;--copy-text-translate-x:0}.chat::part(code-block-header){align-items:center;display:flex;gap:8px}";
|
|
@@ -21,9 +24,6 @@ var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) ||
|
|
|
21
24
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
22
25
|
};
|
|
23
26
|
var _GxIdeChatContainer_menuItems, _GxIdeChatContainer_componentLocale, _GxIdeChatContainer_showMenuHandler, _GxIdeChatContainer_menuExpandedChangeHandler, _GxIdeChatContainer_copyConversationHandler, _GxIdeChatContainer_deleteConversationHandler;
|
|
24
|
-
// TODO: Remove this once update chat bundle for lit is ready
|
|
25
|
-
// on a new Mercury version
|
|
26
|
-
const CHAT_LIT_PATH = getAssetPath(`./gx-ide-assets/chat-container/chat-lit.css`);
|
|
27
27
|
const CSS_BUNDLES = [
|
|
28
28
|
"resets/box-sizing",
|
|
29
29
|
"utils/typography",
|
|
@@ -33,11 +33,6 @@ const CSS_BUNDLES = [
|
|
|
33
33
|
"components/icon",
|
|
34
34
|
"utils/elevation"
|
|
35
35
|
];
|
|
36
|
-
const CSS_BUNDLE_CHAT_LIT = {
|
|
37
|
-
// styleSheet: chatListCss,
|
|
38
|
-
url: CHAT_LIT_PATH,
|
|
39
|
-
name: "components/chat-lit"
|
|
40
|
-
};
|
|
41
36
|
const COPY_ICON = getIconPath({
|
|
42
37
|
category: "system",
|
|
43
38
|
name: "copy",
|
|
@@ -115,7 +110,7 @@ const GxIdeChatContainer = /*@__PURE__*/ proxyCustomElement(class GxIdeChatConta
|
|
|
115
110
|
return (h(Host, { class: {
|
|
116
111
|
"chat-container": true,
|
|
117
112
|
"with-header": !!renderHeader
|
|
118
|
-
} }, h("ch-theme", { model: CSS_BUNDLES }), h("
|
|
113
|
+
} }, h("ch-theme", { model: CSS_BUNDLES }), h("section", { class: "section" }, renderHeader && (h("header", { class: "header tiny-semi-bold-l" }, this.chatTitle && this.chatTitle, renderButtonsGroup && (h("ch-action-menu-render", { class: "dropdown", blockAlign: "inside-start", inlineAlign: "inside-end", model: __classPrivateFieldGet(this, _GxIdeChatContainer_menuItems, "f"), expanded: this.menuIsExpanded, onExpandedChange: __classPrivateFieldGet(this, _GxIdeChatContainer_menuExpandedChangeHandler, "f") }, h("button", { class: "button-tertiary button-icon-only", onClick: __classPrivateFieldGet(this, _GxIdeChatContainer_showMenuHandler, "f"), type: "button", "aria-label": __classPrivateFieldGet(this, _GxIdeChatContainer_componentLocale, "f").showMenuAriaLabel, title: __classPrivateFieldGet(this, _GxIdeChatContainer_componentLocale, "f").showMenuAriaLabel }, h("ch-image", { class: "icon-md", src: MORE_HORIZONTAL_ICON })), this.copyConversationCallback && (h("button", { class: "button-tertiary button-icon-and-text button-copy-chat", slot: "copy-chat-button", onClick: __classPrivateFieldGet(this, _GxIdeChatContainer_copyConversationHandler, "f"), type: "button", "aria-label": __classPrivateFieldGet(this, _GxIdeChatContainer_componentLocale, "f").copyConversationAriaLabel, title: __classPrivateFieldGet(this, _GxIdeChatContainer_componentLocale, "f").copyConversationAriaLabel }, h("ch-image", { class: "icon-md", src: COPY_ICON }), __classPrivateFieldGet(this, _GxIdeChatContainer_componentLocale, "f").copyConversationLabel)), this.deleteConversationCallback && (h("button", { class: "button-tertiary button-icon-and-text button-delete-chat", slot: "delete-chat-button", onClick: __classPrivateFieldGet(this, _GxIdeChatContainer_deleteConversationHandler, "f"), type: "button", "aria-label": __classPrivateFieldGet(this, _GxIdeChatContainer_componentLocale, "f").deleteConversationAriaLabel, title: __classPrivateFieldGet(this, _GxIdeChatContainer_componentLocale, "f").deleteConversationAriaLabel }, h("ch-image", { class: "icon-md", src: DELETE_ICON }), __classPrivateFieldGet(this, _GxIdeChatContainer_componentLocale, "f").clearConversationLabel)))))), h("section", { class: "ch-chat-container" }, h("slot", null), this.displayConversationCopiedMessage && (h("div", { class: "chat-container__conversation-copied" }, h("div", { class: "chat-container__conversation-copied-wrapper" }, h("ch-image", { class: "icon-md", src: CONVERSATION_ICON }), h("p", { class: "body-regular-l" }, "conversation copied"))))))));
|
|
119
114
|
}
|
|
120
115
|
static get assetsDirs() { return ["gx-ide-assets/chat-container"]; }
|
|
121
116
|
get el() { return this; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"chat-container.js","mappings":";;;;AAAA,MAAM,gBAAgB,GAAG,0oEAA0oE;;;;;;;;;;;;;;;;;;;ACgBnqE;AACA;AACA,MAAM,aAAa,GAAG,YAAY,CAChC,6CAA6C,CAC9C,CAAC;AAEF,MAAM,WAAW,GAAmB;IAClC,mBAAmB;IACnB,kBAAkB;IAClB,qBAAqB;IACrB,mBAAmB;IACnB,qBAAqB;IACrB,iBAAiB;IACjB,iBAAiB;CAClB,CAAC;AACF,MAAM,mBAAmB,GAAmB;;IAE1C,GAAG,EAAE,aAAa;IAClB,IAAI,EAAE,qBAAqB;CAC5B,CAAC;AAEF,MAAM,SAAS,GAAG,WAAW,CAAC;IAC5B,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,SAAS;CACrB,CAAC,CAAC;AACH,MAAM,WAAW,GAAG,WAAW,CAAC;IAC9B,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,iBAA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EAEjD,KAAK,EAAE,uBAAA,IAAI,2CAAiB,CAAC,yBAAyB,IAEtD,gBAAU,KAAK,EAAC,SAAS,EAAC,GAAG,EAAE,SAAS,GAAa,EACpD,uBAAA,IAAI,2CAAiB,CAAC,qBAAqB,CACrC,CACV,EACA,IAAI,CAAC,0BAA0B,KAC9B,cACE,KAAK,EAAC,yDAAyD,EAC/D,IAAI,EAAC,oBAAoB,EACzB,OAAO,EAAE,uBAAA,IAAI,qDAA2B,EACxC,IAAI,EAAC,QAAQ,gBAEX,uBAAA,IAAI,2CAAiB,CAAC,2BAA2B,EAEnD,KAAK,EAAE,uBAAA,IAAI,2CAAiB,CAAC,2BAA2B,IAExD,gBAAU,KAAK,EAAC,SAAS,EAAC,GAAG,EAAE,WAAW,GAAa,EACtD,uBAAA,IAAI,2CAAiB,CAAC,sBAAsB,CACtC,CACV,CACqB,CACzB,CACM,CACV,EACD,eAAS,KAAK,EAAC,mBAAmB,IAChC,eAAa,EACZ,IAAI,CAAC,gCAAgC,KACpC,WAAK,KAAK,EAAC,qCAAqC,IAC9C,WAAK,KAAK,EAAC,6CAA6C,IACtD,gBAAU,KAAK,EAAC,SAAS,EAAC,GAAG,EAAE,iBAAiB,GAAa,EAC7D,SAAG,KAAK,EAAC,gBAAgB,0BAAwB,CAC7C,CACF,CACP,CACO,CAEF,CACL,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/chat/chat-container/chat-container.scss?tag=gx-ide-chat-container","src/components/chat/chat-container/chat-container.tsx"],"sourcesContent":[".chat-container {\n background-color: var(\n --elevation-background-color,\n --mer-surface__elevation--01\n );\n display: grid;\n block-size: 100%;\n overflow: auto;\n grid-template-rows: 1fr;\n position: relative;\n --chat-common-border-radius: var(--mer-spacing--2xs);\n}\n\n.chat-container.with-header {\n grid-template-rows: max-content 1fr;\n}\n\n.section {\n display: contents;\n}\n\n.header {\n padding: var(--mer-spacing--2xs) var(--mer-spacing--2xs)\n var(--mer-spacing--2xs) var(--mer-spacing--sm);\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--mer-spacing--sm);\n color: var(--mer-text__bright);\n border-block-end: var(--mer-border__width--sm) solid\n var(--color-border-surface-on-elevation-01, #333d47);\n\n .button-copy-chat,\n .button-delete-chat {\n --control__border-color: transparent !important;\n }\n\n .button-delete-chat {\n &:hover {\n filter: brightness(1.3);\n }\n &:active {\n filter: brightness(0.8);\n }\n }\n}\n\n.ch-chat-container {\n overflow: auto;\n position: relative;\n display: grid;\n}\n\n// - - - - - - - - - - - - - -\n// other\n// - - - - - - - - - - - - - -\n\n.chat-container__conversation-copied {\n position: absolute;\n z-index: 1;\n inline-size: 100%;\n block-size: 100%;\n background: rgba(22, 22, 23, 0.75);\n backdrop-filter: saturate(180%) blur(20px);\n display: grid;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 32px;\n --mer-icon__box--md: 18px;\n pointer-events: none;\n overflow: hidden;\n animation: fadeIn 100ms ease-in-out forwards;\n opacity: 0;\n}\n\n.chat-container__conversation-copied-wrapper {\n display: flex;\n align-items: center;\n gap: var(--mer-spacing--sm);\n position: relative;\n inset-block-start: 4px;\n opacity: 0;\n animation: liftUp var(--mer-timing--fast) ease-in-out forwards;\n animation-delay: var(--mer-timing--fast);\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes liftUp {\n from {\n opacity: 0;\n inset-block-start: 4px;\n }\n to {\n opacity: 1;\n inset-block-start: 0;\n }\n}\n\n// The following styles shoul be moved over to Mercury\n\n.chat::part(code-block-header__copy) {\n --copy-text-opacity: 0;\n --copy-text-translate-x: 6px;\n opacity: var(--copy-text-opacity);\n pointer-events: none;\n transform: translateX(var(--copy-text-translate-x));\n transition:\n opacity 100ms ease-in-out,\n transform 100ms ease-in-out;\n font-size: 12px;\n}\n.chat::part(code-block-header__copy-copied) {\n --copy-button-pointer-events: none !important;\n --copy-text-opacity: 1;\n --copy-text-translate-x: 0;\n}\n.chat::part(code-block-header) {\n align-items: center;\n display: flex;\n gap: 8px;\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Element,\n Method,\n State,\n getAssetPath\n} from \"@stencil/core\";\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\nimport { ActionMenuModel } from \"@genexus/chameleon-controls-library\";\n\nimport { Locale } from \"../../../common/locale\";\nimport { ThemeItemModel } from \"@genexus/chameleon-controls-library/dist/types/components/theme/theme-types\";\n\n// TODO: Remove this once update chat bundle for lit is ready\n// on a new Mercury version\nconst CHAT_LIT_PATH = getAssetPath(\n `./gx-ide-assets/chat-container/chat-lit.css`\n);\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"utils/typography\",\n \"chameleon/scrollbar\",\n \"components/button\",\n \"components/dropdown\",\n \"components/icon\",\n \"utils/elevation\"\n];\nconst CSS_BUNDLE_CHAT_LIT: ThemeItemModel = {\n // styleSheet: chatListCss,\n url: CHAT_LIT_PATH,\n name: \"components/chat-lit\"\n};\n\nconst COPY_ICON = getIconPath({\n category: \"system\",\n name: \"copy\",\n colorType: \"primary\"\n});\nconst DELETE_ICON = getIconPath({\n category: \"system\",\n name: \"delete-outlined\",\n colorType: \"primary\"\n});\nconst CONVERSATION_ICON = getIconPath({\n category: \"objects\",\n name: \"conversational-flows\"\n});\nconst MORE_HORIZONTAL_ICON = getIconPath({\n category: \"system\",\n name: \"more-horizontal\",\n colorType: \"neutral\"\n});\n\n@Component({\n tag: \"gx-ide-chat-container\",\n styleUrl: \"chat-container.scss\",\n shadow: false,\n assetsDirs: [\"gx-ide-assets/chat-container\"]\n})\nexport class GxIdeChatContainer {\n #menuItems: ActionMenuModel = [\n { type: \"slot\", id: \"delete-chat-button\" },\n { type: \"slot\", id: \"copy-chat-button\" }\n ];\n\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\n @Element() el: HTMLGxIdeChatContainerElement;\n\n /**\n * Coneration Copied\n */\n @State() displayConversationCopiedMessage: boolean = false;\n\n /**\n * Displays or hides the menu\n */\n @State() menuIsExpanded: boolean = false;\n\n /**\n * The chat title\n */\n @Prop() readonly chatTitle?: string;\n\n /**\n * If true a button for copying the conversation will be render on the header\n */\n @Prop() readonly copyConversationCallback: () => void;\n\n /**\n * If true a button for deleting the conversation will be render on the header\n */\n @Prop() readonly deleteConversationCallback: () => void;\n\n /**\n * If true a the welcome screen will be rendered\n */\n @Prop() readonly displayWelcomeScreen: boolean = false;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n /**\n * It will display a feedback message that the conversation has been copied\n */\n @Method()\n async showCopyConversationMessage() {\n this.displayConversationCopiedMessage = true;\n setTimeout(() => {\n this.displayConversationCopiedMessage = false;\n }, 2000);\n }\n\n #showMenuHandler = () => {\n this.menuIsExpanded = true;\n };\n\n #menuExpandedChangeHandler = (event: CustomEvent<boolean>) => {\n this.menuIsExpanded = event.detail;\n };\n\n #copyConversationHandler = () => {\n if (this.copyConversationCallback) {\n this.copyConversationCallback();\n this.menuIsExpanded = false;\n }\n };\n #deleteConversationHandler = () => {\n if (this.deleteConversationCallback) {\n this.deleteConversationCallback();\n this.menuIsExpanded = false;\n }\n };\n\n render() {\n const renderHeader =\n this.chatTitle ||\n this.copyConversationCallback ||\n this.deleteConversationCallback;\n\n const renderButtonsGroup =\n this.copyConversationCallback || this.deleteConversationCallback;\n return (\n <Host\n class={{\n \"chat-container\": true,\n \"with-header\": !!renderHeader\n }}\n >\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <ch-theme model={CSS_BUNDLE_CHAT_LIT}></ch-theme>\n <section class=\"section\">\n {renderHeader && (\n <header class=\"header tiny-semi-bold-l\">\n {this.chatTitle && this.chatTitle}\n {renderButtonsGroup && (\n <ch-action-menu-render\n class=\"dropdown\"\n blockAlign=\"inside-start\"\n inlineAlign=\"inside-end\"\n model={this.#menuItems}\n expanded={this.menuIsExpanded}\n onExpandedChange={this.#menuExpandedChangeHandler}\n >\n <button\n class=\"button-tertiary button-icon-only\"\n onClick={this.#showMenuHandler}\n type=\"button\"\n aria-label={this.#componentLocale.showMenuAriaLabel}\n title={this.#componentLocale.showMenuAriaLabel}\n >\n <ch-image\n class=\"icon-md\"\n src={MORE_HORIZONTAL_ICON}\n ></ch-image>\n </button>\n {this.copyConversationCallback && (\n <button\n class=\"button-tertiary button-icon-and-text button-copy-chat\"\n slot=\"copy-chat-button\"\n onClick={this.#copyConversationHandler}\n type=\"button\"\n aria-label={\n this.#componentLocale.copyConversationAriaLabel\n }\n title={this.#componentLocale.copyConversationAriaLabel}\n >\n <ch-image class=\"icon-md\" src={COPY_ICON}></ch-image>\n {this.#componentLocale.copyConversationLabel}\n </button>\n )}\n {this.deleteConversationCallback && (\n <button\n class=\"button-tertiary button-icon-and-text button-delete-chat\"\n slot=\"delete-chat-button\"\n onClick={this.#deleteConversationHandler}\n type=\"button\"\n aria-label={\n this.#componentLocale.deleteConversationAriaLabel\n }\n title={this.#componentLocale.deleteConversationAriaLabel}\n >\n <ch-image class=\"icon-md\" src={DELETE_ICON}></ch-image>\n {this.#componentLocale.clearConversationLabel}\n </button>\n )}\n </ch-action-menu-render>\n )}\n </header>\n )}\n <section class=\"ch-chat-container\">\n <slot></slot>\n {this.displayConversationCopiedMessage && (\n <div class=\"chat-container__conversation-copied\">\n <div class=\"chat-container__conversation-copied-wrapper\">\n <ch-image class=\"icon-md\" src={CONVERSATION_ICON}></ch-image>\n <p class=\"body-regular-l\">conversation copied</p>\n </div>\n </div>\n )}\n </section>\n {/* <footer class=\"footer elevation-1\">footer</footer> */}\n </section>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"chat-container.js","mappings":";;;;;;;AAAA,MAAM,gBAAgB,GAAG,0oEAA0oE;;;;;;;;;;;;;;;;;;;ACcnqE,MAAM,WAAW,GAAmB;IAClC,mBAAmB;IACnB,kBAAkB;IAClB,qBAAqB;IAC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K,EAAC,SAAS,EACf,GAAG,EAAE,oBAAoB,GACf,CACL,EACR,IAAI,CAAC,wBAAwB,KAC5B,cACE,KAAK,EAAC,uDAAuD,EAC7D,IAAI,EAAC,kBAAkB,EACvB,OAAO,EAAE,uBAAA,IAAI,mDAAyB,EACtC,IAAI,EAAC,QAAQ,gBAEX,uBAAA,IAAI,2CAAiB,CAAC,yBAAyB,EAEjD,KAAK,EAAE,uBAAA,IAAI,2CAAiB,CAAC,yBAAyB,IAEtD,gBAAU,KAAK,EAAC,SAAS,EAAC,GAAG,EAAE,SAAS,GAAa,EACpD,uBAAA,IAAI,2CAAiB,CAAC,qBAAqB,CACrC,CACV,EACA,IAAI,CAAC,0BAA0B,KAC9B,cACE,KAAK,EAAC,yDAAyD,EAC/D,IAAI,EAAC,oBAAoB,EACzB,OAAO,EAAE,uBAAA,IAAI,qDAA2B,EACxC,IAAI,EAAC,QAAQ,gBAEX,uBAAA,IAAI,2CAAiB,CAAC,2BAA2B,EAEnD,KAAK,EAAE,uBAAA,IAAI,2CAAiB,CAAC,2BAA2B,IAExD,gBAAU,KAAK,EAAC,SAAS,EAAC,GAAG,EAAE,WAAW,GAAa,EACtD,uBAAA,IAAI,2CAAiB,CAAC,sBAAsB,CACtC,CACV,CACqB,CACzB,CACM,CACV,EACD,eAAS,KAAK,EAAC,mBAAmB,IAChC,eAAa,EACZ,IAAI,CAAC,gCAAgC,KACpC,WAAK,KAAK,EAAC,qCAAqC,IAC9C,WAAK,KAAK,EAAC,6CAA6C,IACtD,gBAAU,KAAK,EAAC,SAAS,EAAC,GAAG,EAAE,iBAAiB,GAAa,EAC7D,SAAG,KAAK,EAAC,gBAAgB,0BAAwB,CAC7C,CACF,CACP,CACO,CAEF,CACL,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/chat/chat-container/chat-container.scss?tag=gx-ide-chat-container","src/components/chat/chat-container/chat-container.tsx"],"sourcesContent":[".chat-container {\n background-color: var(\n --elevation-background-color,\n --mer-surface__elevation--01\n );\n display: grid;\n block-size: 100%;\n overflow: auto;\n grid-template-rows: 1fr;\n position: relative;\n --chat-common-border-radius: var(--mer-spacing--2xs);\n}\n\n.chat-container.with-header {\n grid-template-rows: max-content 1fr;\n}\n\n.section {\n display: contents;\n}\n\n.header {\n padding: var(--mer-spacing--2xs) var(--mer-spacing--2xs)\n var(--mer-spacing--2xs) var(--mer-spacing--sm);\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--mer-spacing--sm);\n color: var(--mer-text__bright);\n border-block-end: var(--mer-border__width--sm) solid\n var(--color-border-surface-on-elevation-01, #333d47);\n\n .button-copy-chat,\n .button-delete-chat {\n --control__border-color: transparent !important;\n }\n\n .button-delete-chat {\n &:hover {\n filter: brightness(1.3);\n }\n &:active {\n filter: brightness(0.8);\n }\n }\n}\n\n.ch-chat-container {\n overflow: auto;\n position: relative;\n display: grid;\n}\n\n// - - - - - - - - - - - - - -\n// other\n// - - - - - - - - - - - - - -\n\n.chat-container__conversation-copied {\n position: absolute;\n z-index: 1;\n inline-size: 100%;\n block-size: 100%;\n background: rgba(22, 22, 23, 0.75);\n backdrop-filter: saturate(180%) blur(20px);\n display: grid;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 32px;\n --mer-icon__box--md: 18px;\n pointer-events: none;\n overflow: hidden;\n animation: fadeIn 100ms ease-in-out forwards;\n opacity: 0;\n}\n\n.chat-container__conversation-copied-wrapper {\n display: flex;\n align-items: center;\n gap: var(--mer-spacing--sm);\n position: relative;\n inset-block-start: 4px;\n opacity: 0;\n animation: liftUp var(--mer-timing--fast) ease-in-out forwards;\n animation-delay: var(--mer-timing--fast);\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes liftUp {\n from {\n opacity: 0;\n inset-block-start: 4px;\n }\n to {\n opacity: 1;\n inset-block-start: 0;\n }\n}\n\n// The following styles shoul be moved over to Mercury\n\n.chat::part(code-block-header__copy) {\n --copy-text-opacity: 0;\n --copy-text-translate-x: 6px;\n opacity: var(--copy-text-opacity);\n pointer-events: none;\n transform: translateX(var(--copy-text-translate-x));\n transition:\n opacity 100ms ease-in-out,\n transform 100ms ease-in-out;\n font-size: 12px;\n}\n.chat::part(code-block-header__copy-copied) {\n --copy-button-pointer-events: none !important;\n --copy-text-opacity: 1;\n --copy-text-translate-x: 0;\n}\n.chat::part(code-block-header) {\n align-items: center;\n display: flex;\n gap: 8px;\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Element,\n Method,\n State\n} from \"@stencil/core\";\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\nimport { ActionMenuModel } from \"@genexus/chameleon-controls-library\";\n\nimport { Locale } from \"../../../common/locale\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"utils/typography\",\n \"chameleon/scrollbar\",\n \"components/button\",\n \"components/dropdown\",\n \"components/icon\",\n \"utils/elevation\"\n];\n\nconst COPY_ICON = getIconPath({\n category: \"system\",\n name: \"copy\",\n colorType: \"primary\"\n});\nconst DELETE_ICON = getIconPath({\n category: \"system\",\n name: \"delete-outlined\",\n colorType: \"primary\"\n});\nconst CONVERSATION_ICON = getIconPath({\n category: \"objects\",\n name: \"conversational-flows\"\n});\nconst MORE_HORIZONTAL_ICON = getIconPath({\n category: \"system\",\n name: \"more-horizontal\",\n colorType: \"neutral\"\n});\n\n@Component({\n tag: \"gx-ide-chat-container\",\n styleUrl: \"chat-container.scss\",\n shadow: false,\n assetsDirs: [\"gx-ide-assets/chat-container\"]\n})\nexport class GxIdeChatContainer {\n #menuItems: ActionMenuModel = [\n { type: \"slot\", id: \"delete-chat-button\" },\n { type: \"slot\", id: \"copy-chat-button\" }\n ];\n\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\n @Element() el: HTMLGxIdeChatContainerElement;\n\n /**\n * Coneration Copied\n */\n @State() displayConversationCopiedMessage: boolean = false;\n\n /**\n * Displays or hides the menu\n */\n @State() menuIsExpanded: boolean = false;\n\n /**\n * The chat title\n */\n @Prop() readonly chatTitle?: string;\n\n /**\n * If true a button for copying the conversation will be render on the header\n */\n @Prop() readonly copyConversationCallback: () => void;\n\n /**\n * If true a button for deleting the conversation will be render on the header\n */\n @Prop() readonly deleteConversationCallback: () => void;\n\n /**\n * If true a the welcome screen will be rendered\n */\n @Prop() readonly displayWelcomeScreen: boolean = false;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n /**\n * It will display a feedback message that the conversation has been copied\n */\n @Method()\n async showCopyConversationMessage() {\n this.displayConversationCopiedMessage = true;\n setTimeout(() => {\n this.displayConversationCopiedMessage = false;\n }, 2000);\n }\n\n #showMenuHandler = () => {\n this.menuIsExpanded = true;\n };\n\n #menuExpandedChangeHandler = (event: CustomEvent<boolean>) => {\n this.menuIsExpanded = event.detail;\n };\n\n #copyConversationHandler = () => {\n if (this.copyConversationCallback) {\n this.copyConversationCallback();\n this.menuIsExpanded = false;\n }\n };\n #deleteConversationHandler = () => {\n if (this.deleteConversationCallback) {\n this.deleteConversationCallback();\n this.menuIsExpanded = false;\n }\n };\n\n render() {\n const renderHeader =\n this.chatTitle ||\n this.copyConversationCallback ||\n this.deleteConversationCallback;\n\n const renderButtonsGroup =\n this.copyConversationCallback || this.deleteConversationCallback;\n return (\n <Host\n class={{\n \"chat-container\": true,\n \"with-header\": !!renderHeader\n }}\n >\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <section class=\"section\">\n {renderHeader && (\n <header class=\"header tiny-semi-bold-l\">\n {this.chatTitle && this.chatTitle}\n {renderButtonsGroup && (\n <ch-action-menu-render\n class=\"dropdown\"\n blockAlign=\"inside-start\"\n inlineAlign=\"inside-end\"\n model={this.#menuItems}\n expanded={this.menuIsExpanded}\n onExpandedChange={this.#menuExpandedChangeHandler}\n >\n <button\n class=\"button-tertiary button-icon-only\"\n onClick={this.#showMenuHandler}\n type=\"button\"\n aria-label={this.#componentLocale.showMenuAriaLabel}\n title={this.#componentLocale.showMenuAriaLabel}\n >\n <ch-image\n class=\"icon-md\"\n src={MORE_HORIZONTAL_ICON}\n ></ch-image>\n </button>\n {this.copyConversationCallback && (\n <button\n class=\"button-tertiary button-icon-and-text button-copy-chat\"\n slot=\"copy-chat-button\"\n onClick={this.#copyConversationHandler}\n type=\"button\"\n aria-label={\n this.#componentLocale.copyConversationAriaLabel\n }\n title={this.#componentLocale.copyConversationAriaLabel}\n >\n <ch-image class=\"icon-md\" src={COPY_ICON}></ch-image>\n {this.#componentLocale.copyConversationLabel}\n </button>\n )}\n {this.deleteConversationCallback && (\n <button\n class=\"button-tertiary button-icon-and-text button-delete-chat\"\n slot=\"delete-chat-button\"\n onClick={this.#deleteConversationHandler}\n type=\"button\"\n aria-label={\n this.#componentLocale.deleteConversationAriaLabel\n }\n title={this.#componentLocale.deleteConversationAriaLabel}\n >\n <ch-image class=\"icon-md\" src={DELETE_ICON}></ch-image>\n {this.#componentLocale.clearConversationLabel}\n </button>\n )}\n </ch-action-menu-render>\n )}\n </header>\n )}\n <section class=\"ch-chat-container\">\n <slot></slot>\n {this.displayConversationCopiedMessage && (\n <div class=\"chat-container__conversation-copied\">\n <div class=\"chat-container__conversation-copied-wrapper\">\n <ch-image class=\"icon-md\" src={CONVERSATION_ICON}></ch-image>\n <p class=\"body-regular-l\">conversation copied</p>\n </div>\n </div>\n )}\n </section>\n {/* <footer class=\"footer elevation-1\">footer</footer> */}\n </section>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { getAssetPath, proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { g as getIconPath } from './
|
|
2
|
+
import { g as getIconPath } from './mer-animated-dots.js';
|
|
3
|
+
import 'lit';
|
|
4
|
+
import 'lit/directives/when.js';
|
|
5
|
+
import 'lit/directives/if-defined.js';
|
|
3
6
|
import { L as Locale } from './locale.js';
|
|
4
7
|
|
|
5
8
|
const chatWelcomeCss = ":host{block-size:100%}.welcome-container{--opacity:1;--translate-y:0;opacity:var(--opacity);transform:translateY(var(--translate-y));transition:all var(--transition-duration);display:flex;block-size:100%;grid-template-rows:max-content max-content;flex-direction:column;justify-content:space-between;background-repeat:no-repeat;background-size:cover;background-size:contain}.welcome-container.hidden{--opacity:0;--translate-y:4px}.header{--opacity:0;--translate-y:3px;transition:all var(--transition-duration) var(--transition-delay) cubic-bezier(0.4, 0, 0.2, 1);transform:translateY(var(--translate-y));opacity:var(--opacity);display:flex;flex-direction:column;gap:var(--mer-spacing--md);align-items:center;padding:var(--mer-spacing--md)}.header--visible{--opacity:1;--translate-y:0}.header__circle{inline-size:55px;block-size:55px;background-size:contain;background-repeat:no-repeat;background-position:center center;margin-block-end:-6px}.header__title{display:grid;text-align:center;margin:0;text-align:center;white-space:pre-line;line-height:1.3;font-weight:600;font-size:var(--font-size-header-h3)}.header__greeting{line-height:1.4;text-align:center;font-weight:300}.suggested-prompts{--opacity:1;opacity:var(--opacity);transition:opacity var(--transition-duration);display:flex;flex-direction:column;gap:var(--mer-spacing--md);list-style:none;margin:0;padding:var(--mer-spacing--md)}.suggested-prompts.hidden{--opacity:0}.suggested-prompts__button{opacity:0;transform:translateX(-3px);animation:fadeInSuggestedPromptButton var(--mer-timing--regular) ease forwards;animation-delay:var(--delay, 0s);border:0;padding:var(--mer-spacing--sm);border-radius:44px;font-size:14px;font-style:oblique;cursor:pointer;display:flex;align-items:center;gap:var(--mer-spacing--xs);background-color:#22334a;font-weight:100;max-inline-size:300px}.suggested-prompts__button:hover{background-color:#1a2b42}.suggested-prompts__icon{flex-shrink:0}@keyframes fadeInSuggestedPromptButton{from{opacity:0;transform:translateX(-3px)}to{opacity:1;transform:translateX(0)}}";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"chat-welcome.js","mappings":";;;;AAAA,MAAM,cAAc,GAAG,mgEAAmgE;;;;;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oB,EAAE,GAAG,uBAAuB,IAAI;gBACpD,uBAAuB,EAAE,GAAG,0BAA0B,IAAI;aAC3D,IAED,YACE,KAAK,EAAC,gBAAgB,EACtB,KAAK,EAAE,EAAE,eAAe,EAAE,OAAO,SAAS,GAAG,EAAE,GACzC,EACR,UAAI,KAAK,EAAC,eAAe,IAAE,IAAI,CAAC,YAAY,CAAM,EAClD,SAAG,KAAK,EAAC,kBAAkB,IAAE,IAAI,CAAC,eAAe,CAAK,CAC/C,EAER,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,oBAAoB,KACjD,UAAI,KAAK,EAAC,mBAAmB,IAC1B,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,MACnC,UAAI,KAAK,EAAC,yBAAyB,IACjC,cACE,KAAK,EAAE;gBACL,2BAA2B,EAAE,IAAI;aAClC,EACD,OAAO,EAAE,uBAAA,IAAI,0CAAkB,EAC/B,KAAK,EAAE;gBACL,SAAS,EAAE,GAAG,gCAAgC,GAAG,CAAC,IAAI;aACvD,kBACa,MAAM,IAEpB,gBACE,GAAG,EAAE,OAAO,EACZ,KAAK,EAAC,iCAAiC,GAC7B,EACX,MAAM,EACP,gBACE,GAAG,EAAE,gBAAgB,EACrB,KAAK,EAAC,iCAAiC,GAC7B,CACL,CACN,CACN,CAAC,CACC,CACN,CACG,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/chat/chat-welcome/chat-welcome.scss?tag=gx-ide-chat-welcome&encapsulation=shadow","src/components/chat/chat-welcome/chat-welcome.tsx"],"sourcesContent":[":host {\n block-size: 100%;\n}\n\n$sharedPadding: var(--mer-spacing--md);\n\n.welcome-container {\n --opacity: 1;\n --translate-y: 0;\n opacity: var(--opacity);\n transform: translateY(var(--translate-y));\n transition: all var(--transition-duration);\n display: flex;\n block-size: 100%;\n grid-template-rows: max-content max-content;\n flex-direction: column;\n justify-content: space-between;\n background-repeat: no-repeat;\n background-size: cover;\n background-size: contain;\n\n &.hidden {\n --opacity: 0;\n --translate-y: 4px;\n }\n}\n\n%absolute-centered {\n position: absolute;\n inset-inline-start: 50%;\n inset-block-start: 50%;\n transform: translate(-50%, -50%);\n}\n\n.header {\n --opacity: 0;\n --translate-y: 3px;\n transition: all var(--transition-duration) var(--transition-delay)\n cubic-bezier(0.4, 0, 0.2, 1);\n transform: translateY(var(--translate-y));\n opacity: var(--opacity);\n display: flex;\n flex-direction: column;\n gap: var(--mer-spacing--md);\n align-items: center;\n padding: $sharedPadding;\n\n &--visible {\n --opacity: 1;\n --translate-y: 0;\n }\n\n &__circle {\n $circleSize: 55px;\n inline-size: $circleSize;\n block-size: $circleSize;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center center;\n margin-block-end: -6px;\n }\n\n &__title {\n display: grid;\n text-align: center;\n margin: 0;\n text-align: center;\n white-space: pre-line;\n line-height: 1.3;\n font-weight: 600;\n font-size: var(--font-size-header-h3);\n }\n\n &__greeting {\n line-height: 1.4;\n text-align: center;\n font-weight: 300;\n }\n}\n\n.suggested-prompts {\n --opacity: 1;\n opacity: var(--opacity);\n transition: opacity var(--transition-duration);\n display: flex;\n flex-direction: column;\n gap: var(--mer-spacing--md);\n list-style: none;\n margin: 0;\n padding: $sharedPadding;\n\n &.hidden {\n --opacity: 0;\n }\n\n &__item {\n }\n\n &__button {\n opacity: 0;\n transform: translateX(-3px);\n animation: fadeInSuggestedPromptButton var(--mer-timing--regular) ease\n forwards;\n animation-delay: var(--delay, 0s);\n\n border: 0;\n padding: var(--mer-spacing--sm);\n border-radius: 44px; // Works with up to a a four lines button\n font-size: 14px; // TODO : Use a token when available\n font-style: oblique;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: var(--mer-spacing--xs);\n background-color: #22334a; // TODO : Use a token when available\n font-weight: 100;\n max-inline-size: 300px;\n\n &:hover {\n background-color: #1a2b42;\n }\n }\n\n &__icon {\n flex-shrink: 0;\n }\n}\n\n@keyframes fadeInSuggestedPromptButton {\n from {\n opacity: 0;\n transform: translateX(-3px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n","/* eslint-disable @stencil-community/strict-mutable */\nimport {\n Component,\n Host,\n h,\n Prop,\n Element,\n State,\n getAssetPath,\n Method\n} from \"@stencil/core\";\nimport { getIconPath } from \"@genexus/mercury\";\n\nimport { Locale } from \"../../../common/locale\";\n\nconst HEADER_ILLUSTRATION = getAssetPath(\n `./gx-ide-assets/chat-welcome/images/header-illustration.svg`\n);\nconst AI_AVATAR = getAssetPath(\n `./gx-ide-assets/chat-welcome/images/ai-avatar-welcome.svg`\n);\n\nconst HEADER_TRANSITION_DELAY: number = 100;\nconst HEADER_TRANSITION_DURATION: number = 500;\nconst SUGGESTED_PROMPT_BUTTON_INTERVAL: number = 200;\nconst SUGGESTED_PROMPT_BUTTONS_DELAY: number = 500;\nconst WELCOME_EXIT_DURATION: number = 100;\n\nconst AI_ICON = getIconPath({\n category: \"system\",\n name: \"assistant\",\n colorType: \"primary\"\n});\nconst ARROW_RIGHT_ICON = getIconPath({\n category: \"system\",\n name: \"arrow-right\",\n colorType: \"primary\"\n});\n\nconst CSS_BUNDLES = [\n \"resets/box-sizing\",\n \"components/icon\",\n \"utils/typography\"\n];\n\n@Component({\n tag: \"gx-ide-chat-welcome\",\n styleUrl: \"chat-welcome.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/chat-welcome\"]\n})\nexport class GxIdeChatWelcome {\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #componentLocale: any;\n\n @Element() el: HTMLGxIdeChatWelcomeElement;\n\n /**\n * When true, it will display the welcome elements (title, greeting, and buttons)\n */\n @State() showHeader: boolean = false;\n\n /**\n * When true, it will display the suggested prompts buttons\n */\n @State() showSuggestedPrompts: boolean = false;\n\n /**\n * When true, it will hide entire welcome layout\n */\n @State() hideWelcome: boolean = false;\n\n /**\n * The welcome title, if not provided, the default title will be used.\n */\n @Prop({ mutable: true }) welcomeTitle?: string;\n\n /**\n * The welcome greeting description, if not provided, the default title will be used.\n */\n @Prop({ mutable: true }) welcomeGreeting?: string;\n\n /**\n * The suggested prompts, if not provided, the default title will be used.\n */\n @Prop({ mutable: true }) suggestedPrompts?: string[];\n\n /**\n * Fired when the user clicks on a suggested prompt button\n */\n @Prop() readonly suggestedPrompRequestedCallback: (\n prompt: string\n ) => Promise<void>;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n\n // Set defaults\n if (!this.welcomeTitle) {\n this.welcomeTitle = this.#componentLocale.welcomeTitle;\n }\n if (!this.welcomeGreeting) {\n this.welcomeGreeting = this.#componentLocale.welcomeGreeting;\n }\n if (!this.suggestedPrompts) {\n this.suggestedPrompts = this.#componentLocale.suggestedPrompts;\n }\n }\n\n componentDidRender() {\n if (!this.hideWelcome) {\n this.#animationEntrance();\n }\n }\n\n /**\n * It will exit the wellcome screen and remove it from the dom.\n */\n @Method()\n async exitWelcome() {\n this.#animationExit();\n }\n\n #animationEntrance = () => {\n setTimeout(() => {\n this.showHeader = true;\n setTimeout(() => {\n this.showSuggestedPrompts = true;\n }, SUGGESTED_PROMPT_BUTTONS_DELAY);\n }, HEADER_TRANSITION_DELAY + HEADER_TRANSITION_DURATION);\n };\n\n #sendPromptToChat = async (e: MouseEvent) => {\n const prompt = (e.currentTarget as HTMLButtonElement).dataset[\"prommpt\"];\n await this.#animationExit();\n this.suggestedPrompRequestedCallback(prompt);\n };\n\n #animationExit = async (): Promise<void> => {\n this.hideWelcome = true;\n await new Promise(resolve => setTimeout(resolve, WELCOME_EXIT_DURATION));\n };\n\n render() {\n return (\n <Host>\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <div\n class={{ \"welcome-container\": true, \"hidden\": this.hideWelcome }}\n style={{\n \"backgroundImage\": `url(${HEADER_ILLUSTRATION})`,\n \"--transition-duration\": `${WELCOME_EXIT_DURATION}ms`\n }}\n >\n <header\n class={{ \"header\": true, \"header--visible\": this.showHeader }}\n style={{\n \"--transition-delay\": `${HEADER_TRANSITION_DELAY}ms`,\n \"--transition-duration\": `${HEADER_TRANSITION_DURATION}ms`\n }}\n >\n <span\n class=\"header__circle\"\n style={{ backgroundImage: `url(${AI_AVATAR})` }}\n ></span>\n <h2 class=\"header__title\">{this.welcomeTitle}</h2>\n <p class=\"header__greeting\">{this.welcomeGreeting}</p>\n </header>\n\n {this.suggestedPrompts && this.showSuggestedPrompts && (\n <ul class=\"suggested-prompts\">\n {this.suggestedPrompts.map((prompt, i) => (\n <li class=\"suggested-prompts__item\">\n <button\n class={{\n \"suggested-prompts__button\": true\n }}\n onClick={this.#sendPromptToChat}\n style={{\n \"--delay\": `${SUGGESTED_PROMPT_BUTTON_INTERVAL * i}ms`\n }}\n data-prommpt={prompt}\n >\n <ch-image\n src={AI_ICON}\n class=\"icon-md suggested-prompts__icon\"\n ></ch-image>\n {prompt}\n <ch-image\n src={ARROW_RIGHT_ICON}\n class=\"icon-md suggested-prompts__icon\"\n ></ch-image>\n </button>\n </li>\n ))}\n </ul>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"chat-welcome.js","mappings":";;;;;;;AAAA,MAAM,cAAc,GAAG,mgEAAmgE;;;;;;;;;;;;;;;;;;;ACe1hE,MAAM,mBAAmB,GAAG,YAAY,CACtC,6DAA6D,CAC9D,CAAC;AACF,MAAM,SAAS,GAAG,YAAY,CAC5B,2DAA2D,CAC5D,CAAC;AAEF,MAAM,uBAAuB,GAAW,GAAG,CAAC;AAC5C,MAAM,0BAA0B,GAAW,GAAG,CAAC;AAC/C,MAAM,gCAAgC,GAAW,GAAG,CAAC;AACrD,MAAM,8BAA8B,GAAW,GAAG,CAAC;AACnD,MAAM,qBAAqB,GAAW,GAAG,CAAC;AAE1C,MAAM,OAAO,GAAG,WAAW,CAAC;IAC1B,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,WAAW;IACjB,SAAS,EAAE,SAAS;CACrB,CAAC,CAAC;AACH,M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,KAAK,EAAC,yBAAyB,IACjC,cACE,KAAK,EAAE;gBACL,2BAA2B,EAAE,IAAI;aAClC,EACD,OAAO,EAAE,uBAAA,IAAI,0CAAkB,EAC/B,KAAK,EAAE;gBACL,SAAS,EAAE,GAAG,gCAAgC,GAAG,CAAC,IAAI;aACvD,kBACa,MAAM,IAEpB,gBACE,GAAG,EAAE,OAAO,EACZ,KAAK,EAAC,iCAAiC,GAC7B,EACX,MAAM,EACP,gBACE,GAAG,EAAE,gBAAgB,EACrB,KAAK,EAAC,iCAAiC,GAC7B,CACL,CACN,CACN,CAAC,CACC,CACN,CACG,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/chat/chat-welcome/chat-welcome.scss?tag=gx-ide-chat-welcome&encapsulation=shadow","src/components/chat/chat-welcome/chat-welcome.tsx"],"sourcesContent":[":host {\n block-size: 100%;\n}\n\n$sharedPadding: var(--mer-spacing--md);\n\n.welcome-container {\n --opacity: 1;\n --translate-y: 0;\n opacity: var(--opacity);\n transform: translateY(var(--translate-y));\n transition: all var(--transition-duration);\n display: flex;\n block-size: 100%;\n grid-template-rows: max-content max-content;\n flex-direction: column;\n justify-content: space-between;\n background-repeat: no-repeat;\n background-size: cover;\n background-size: contain;\n\n &.hidden {\n --opacity: 0;\n --translate-y: 4px;\n }\n}\n\n%absolute-centered {\n position: absolute;\n inset-inline-start: 50%;\n inset-block-start: 50%;\n transform: translate(-50%, -50%);\n}\n\n.header {\n --opacity: 0;\n --translate-y: 3px;\n transition: all var(--transition-duration) var(--transition-delay)\n cubic-bezier(0.4, 0, 0.2, 1);\n transform: translateY(var(--translate-y));\n opacity: var(--opacity);\n display: flex;\n flex-direction: column;\n gap: var(--mer-spacing--md);\n align-items: center;\n padding: $sharedPadding;\n\n &--visible {\n --opacity: 1;\n --translate-y: 0;\n }\n\n &__circle {\n $circleSize: 55px;\n inline-size: $circleSize;\n block-size: $circleSize;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center center;\n margin-block-end: -6px;\n }\n\n &__title {\n display: grid;\n text-align: center;\n margin: 0;\n text-align: center;\n white-space: pre-line;\n line-height: 1.3;\n font-weight: 600;\n font-size: var(--font-size-header-h3);\n }\n\n &__greeting {\n line-height: 1.4;\n text-align: center;\n font-weight: 300;\n }\n}\n\n.suggested-prompts {\n --opacity: 1;\n opacity: var(--opacity);\n transition: opacity var(--transition-duration);\n display: flex;\n flex-direction: column;\n gap: var(--mer-spacing--md);\n list-style: none;\n margin: 0;\n padding: $sharedPadding;\n\n &.hidden {\n --opacity: 0;\n }\n\n &__item {\n }\n\n &__button {\n opacity: 0;\n transform: translateX(-3px);\n animation: fadeInSuggestedPromptButton var(--mer-timing--regular) ease\n forwards;\n animation-delay: var(--delay, 0s);\n\n border: 0;\n padding: var(--mer-spacing--sm);\n border-radius: 44px; // Works with up to a a four lines button\n font-size: 14px; // TODO : Use a token when available\n font-style: oblique;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: var(--mer-spacing--xs);\n background-color: #22334a; // TODO : Use a token when available\n font-weight: 100;\n max-inline-size: 300px;\n\n &:hover {\n background-color: #1a2b42;\n }\n }\n\n &__icon {\n flex-shrink: 0;\n }\n}\n\n@keyframes fadeInSuggestedPromptButton {\n from {\n opacity: 0;\n transform: translateX(-3px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n","/* eslint-disable @stencil-community/strict-mutable */\nimport {\n Component,\n Host,\n h,\n Prop,\n Element,\n State,\n getAssetPath,\n Method\n} from \"@stencil/core\";\nimport { getIconPath } from \"@genexus/mercury\";\n\nimport { Locale } from \"../../../common/locale\";\n\nconst HEADER_ILLUSTRATION = getAssetPath(\n `./gx-ide-assets/chat-welcome/images/header-illustration.svg`\n);\nconst AI_AVATAR = getAssetPath(\n `./gx-ide-assets/chat-welcome/images/ai-avatar-welcome.svg`\n);\n\nconst HEADER_TRANSITION_DELAY: number = 100;\nconst HEADER_TRANSITION_DURATION: number = 500;\nconst SUGGESTED_PROMPT_BUTTON_INTERVAL: number = 200;\nconst SUGGESTED_PROMPT_BUTTONS_DELAY: number = 500;\nconst WELCOME_EXIT_DURATION: number = 100;\n\nconst AI_ICON = getIconPath({\n category: \"system\",\n name: \"assistant\",\n colorType: \"primary\"\n});\nconst ARROW_RIGHT_ICON = getIconPath({\n category: \"system\",\n name: \"arrow-right\",\n colorType: \"primary\"\n});\n\nconst CSS_BUNDLES = [\n \"resets/box-sizing\",\n \"components/icon\",\n \"utils/typography\"\n];\n\n@Component({\n tag: \"gx-ide-chat-welcome\",\n styleUrl: \"chat-welcome.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/chat-welcome\"]\n})\nexport class GxIdeChatWelcome {\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #componentLocale: any;\n\n @Element() el: HTMLGxIdeChatWelcomeElement;\n\n /**\n * When true, it will display the welcome elements (title, greeting, and buttons)\n */\n @State() showHeader: boolean = false;\n\n /**\n * When true, it will display the suggested prompts buttons\n */\n @State() showSuggestedPrompts: boolean = false;\n\n /**\n * When true, it will hide entire welcome layout\n */\n @State() hideWelcome: boolean = false;\n\n /**\n * The welcome title, if not provided, the default title will be used.\n */\n @Prop({ mutable: true }) welcomeTitle?: string;\n\n /**\n * The welcome greeting description, if not provided, the default title will be used.\n */\n @Prop({ mutable: true }) welcomeGreeting?: string;\n\n /**\n * The suggested prompts, if not provided, the default title will be used.\n */\n @Prop({ mutable: true }) suggestedPrompts?: string[];\n\n /**\n * Fired when the user clicks on a suggested prompt button\n */\n @Prop() readonly suggestedPrompRequestedCallback: (\n prompt: string\n ) => Promise<void>;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n\n // Set defaults\n if (!this.welcomeTitle) {\n this.welcomeTitle = this.#componentLocale.welcomeTitle;\n }\n if (!this.welcomeGreeting) {\n this.welcomeGreeting = this.#componentLocale.welcomeGreeting;\n }\n if (!this.suggestedPrompts) {\n this.suggestedPrompts = this.#componentLocale.suggestedPrompts;\n }\n }\n\n componentDidRender() {\n if (!this.hideWelcome) {\n this.#animationEntrance();\n }\n }\n\n /**\n * It will exit the wellcome screen and remove it from the dom.\n */\n @Method()\n async exitWelcome() {\n this.#animationExit();\n }\n\n #animationEntrance = () => {\n setTimeout(() => {\n this.showHeader = true;\n setTimeout(() => {\n this.showSuggestedPrompts = true;\n }, SUGGESTED_PROMPT_BUTTONS_DELAY);\n }, HEADER_TRANSITION_DELAY + HEADER_TRANSITION_DURATION);\n };\n\n #sendPromptToChat = async (e: MouseEvent) => {\n const prompt = (e.currentTarget as HTMLButtonElement).dataset[\"prommpt\"];\n await this.#animationExit();\n this.suggestedPrompRequestedCallback(prompt);\n };\n\n #animationExit = async (): Promise<void> => {\n this.hideWelcome = true;\n await new Promise(resolve => setTimeout(resolve, WELCOME_EXIT_DURATION));\n };\n\n render() {\n return (\n <Host>\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <div\n class={{ \"welcome-container\": true, \"hidden\": this.hideWelcome }}\n style={{\n \"backgroundImage\": `url(${HEADER_ILLUSTRATION})`,\n \"--transition-duration\": `${WELCOME_EXIT_DURATION}ms`\n }}\n >\n <header\n class={{ \"header\": true, \"header--visible\": this.showHeader }}\n style={{\n \"--transition-delay\": `${HEADER_TRANSITION_DELAY}ms`,\n \"--transition-duration\": `${HEADER_TRANSITION_DURATION}ms`\n }}\n >\n <span\n class=\"header__circle\"\n style={{ backgroundImage: `url(${AI_AVATAR})` }}\n ></span>\n <h2 class=\"header__title\">{this.welcomeTitle}</h2>\n <p class=\"header__greeting\">{this.welcomeGreeting}</p>\n </header>\n\n {this.suggestedPrompts && this.showSuggestedPrompts && (\n <ul class=\"suggested-prompts\">\n {this.suggestedPrompts.map((prompt, i) => (\n <li class=\"suggested-prompts__item\">\n <button\n class={{\n \"suggested-prompts__button\": true\n }}\n onClick={this.#sendPromptToChat}\n style={{\n \"--delay\": `${SUGGESTED_PROMPT_BUTTON_INTERVAL * i}ms`\n }}\n data-prommpt={prompt}\n >\n <ch-image\n src={AI_ICON}\n class=\"icon-md suggested-prompts__icon\"\n ></ch-image>\n {prompt}\n <ch-image\n src={ARROW_RIGHT_ICON}\n class=\"icon-md suggested-prompts__icon\"\n ></ch-image>\n </button>\n </li>\n ))}\n </ul>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { g as getIconPath } from './
|
|
2
|
+
import { g as getIconPath } from './mer-animated-dots.js';
|
|
3
|
+
import 'lit';
|
|
4
|
+
import 'lit/directives/when.js';
|
|
5
|
+
import 'lit/directives/if-defined.js';
|
|
3
6
|
import { L as Locale } from './locale.js';
|
|
4
7
|
|
|
5
8
|
const entitySelectorCss = ".wrapper{display:grid;grid-template-columns:1fr max-content max-content;gap:var(--mer-spacing--xs);border-radius:var(--control__border-radius);border:var(--control__border-width) var(--control__border-style) var(--control__border-color);padding:var(--control__padding-block) var(--control__padding-inline)}.wrapper:hover{--control__border-color:var(--control__border-color--hover)}.input{--control__padding-block:0;--control__padding-inline:0;--control__border-width:0;--focus__outline-width:0}:host(:focus-within) .wrapper{--control__border-color:var(--focus__outline-color)}:host(.entity-selector--button-has-focus) .wrapper{outline:none}:host([disabled]){pointer-events:none}:host([disabled]) .wrapper{background-color:var(--control__background-color--disabled);border-color:var(--control__border-color--disabled)}";
|