@genexus/genexus-ide-ui 1.1.32 → 1.1.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/gx-ide-chat-container_2.cjs.entry.js +9 -2
- package/dist/cjs/gx-ide-chat-container_2.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-sc-chat-container.cjs.entry.js +2 -1
- package/dist/cjs/gx-ide-sc-chat-container.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-sign-in-team.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-sign-in-team.cjs.entry.js.map +1 -1
- package/dist/collection/components/chat/chat-container/chat-container.js +10 -2
- package/dist/collection/components/chat/chat-container/chat-container.js.map +1 -1
- package/dist/collection/components/chat/chat-container/gx-ide-assets/chat-container/chat-lit.css +376 -0
- package/dist/collection/components/chat/chat-welcome/chat-welcome.js +0 -1
- package/dist/collection/components/chat/chat-welcome/chat-welcome.js.map +1 -1
- package/dist/collection/components/sign-in-team/sign-in-team.css +1 -2
- package/dist/collection/showcase/chat-container/chat.showcase.js +2 -1
- package/dist/collection/showcase/chat-container/chat.showcase.js.map +1 -1
- package/dist/components/chat-container.js +10 -2
- package/dist/components/chat-container.js.map +1 -1
- package/dist/components/chat-welcome.js +0 -1
- package/dist/components/chat-welcome.js.map +1 -1
- package/dist/components/gx-ide-sc-chat-container.js +2 -1
- package/dist/components/gx-ide-sc-chat-container.js.map +1 -1
- package/dist/components/gx-ide-sign-in-team.js +1 -1
- package/dist/components/gx-ide-sign-in-team.js.map +1 -1
- package/dist/esm/gx-ide-chat-container_2.entry.js +10 -3
- package/dist/esm/gx-ide-chat-container_2.entry.js.map +1 -1
- package/dist/esm/gx-ide-sc-chat-container.entry.js +2 -1
- package/dist/esm/gx-ide-sc-chat-container.entry.js.map +1 -1
- package/dist/esm/gx-ide-sign-in-team.entry.js +1 -1
- package/dist/esm/gx-ide-sign-in-team.entry.js.map +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
- package/dist/genexus-ide-ui/gx-ide-assets/chat-container/chat-lit.css +376 -0
- package/dist/genexus-ide-ui/{p-61343e93.entry.js → p-203f0417.entry.js} +8 -8
- package/dist/genexus-ide-ui/p-203f0417.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-137130ad.entry.js → p-8d6f2b4f.entry.js} +4 -2
- package/dist/genexus-ide-ui/{p-137130ad.entry.js.map → p-8d6f2b4f.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-1477d49a.entry.js → p-9270c80f.entry.js} +102 -90
- package/dist/genexus-ide-ui/p-9270c80f.entry.js.map +1 -0
- package/package.json +3 -3
- package/dist/genexus-ide-ui/p-1477d49a.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-61343e93.entry.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ASSISTANT_RESPONSE_SHORT_MARKDOWN","ASSISTANT_NAME","ASSISTANT_RESPONSE_MARKDOWN","Array","from","length","_","index","id","role","content","codeFixerRecord","metadata","status","assistantName","time","parts","PROCESSING_PLACEHOLDER","sendChatMessages","chatRef","generatingResponse","addNewMessage","Date","getTime","setTimeout","updateLastMessage","dummyStreaming","stopGeneratingAnswer","console","log","Promise","resolve","chatCallbacksWithChatRef","chChatRef","uploadFile","file","url","mimeType","counter","stringToDisplay","mode","streamingCompleted","substring","chatTranslations","accessibleName","clearChat","copyMessageContent","downloadCodeButton","sendButton","sendInput","stopGeneratingAnswerButton","placeholder","text","copyCodeButton","processing","sourceFiles","chatShowcaseCss","CSS_BUNDLES","GxIdeScChatContainer","_GxIdeScChatContainer_chatContainerRef","set","this","_GxIdeScChatContainer_chatWelcomeRef","_GxIdeScChatContainer_chChatRef","_GxIdeScChatContainer_chatCallbacks","_GxIdeScChatContainer_copyConversationCallbackHandler","__classPrivateFieldGet","showCopyConversationMessage","_GxIdeScChatContainer_deleteConversationCallbackHandler","_GxIdeScChatContainer_suggestedPrompRequestedCallbackHandler","async","prompt","assistantFinalResponse","toLowerCase","includes","userPrompt","exitWelcome","componentDidLoad","assistantStatus","componentDidRender","__classPrivateFieldSet","componentWillLoad","chatItems","render","h","Host","model","chatTitle","copyConversationCallback","deleteConversationCallback","ref","el","class","callbacks","loadingState","renderItem","renderItemMercury","items","showAdditionalContent","translations","markdownTheme","slot","suggestedPrompRequestedCallback"],"sources":["src/showcase/chat-container/models.ts","src/showcase/chat-container/callbacks.ts","src/showcase/chat-container/chat-showcase.scss?tag=gx-ide-sc-chat-container&encapsulation=shadow","src/showcase/chat-container/chat.showcase.tsx"],"sourcesContent":["import type {\n ChatMessage,\n ChatTranslations\n} from \"@genexus/chameleon-controls-library\";\n\nimport { MercuryChatMessageMetadata } from \"../../components/chat/lit-custom-render/types\";\n\nexport const ASSISTANT_RESPONSE_SHORT_MARKDOWN =\n '\\n### Code block {#code-block}\\nTo create code blocks, you’ll use three backticks (` ``` `) or three tildes (`~~~`) on the lines before and after the code block.\\n\\n```json\\n{\\n \"firstName\": \"John\",\\n \"lastName\": \"Smith\",\\n \"age\": 25\\n}';\n\nexport const ASSISTANT_NAME = \"Nexa\";\n\n// - - - - - - - - - - - - - -\n// Types of messages\n// - - - - - - - - - - - - - -\n\nexport const userMessageChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"user\",\n content:\n \"Generate a web form for customer registration with fields for name, email, phone, and address. Include validation, save the data to the database, and show a confirmation message after submission.\",\n metadata: null\n }\n];\n\nexport const assistantMessageChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"I’ve created the basic structure for the registration form, but I need a bit more info: Should the address include city, state, and ZIP? Do you want a separate confirmation page or just a message on the same screen? Any specific format or validation for the phone number?\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n }\n];\n\nexport const assistantMessageWarningChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"The CustomerRegistration panel was created with warnings: The “Phone” field uses a generic character format—consider a phone mask. No address validation rules applied.The data is still saved correctly, and the panel works as expected.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"warning\"\n }\n];\n\nexport const assistantMessageSuccessChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"The CustomerRegistration web panel was created successfully. Fields: Name, Email, Phone, Address. Validations applied (required, email format). Data saved to “Customer” transaction. Confirmation message shown after submit. Let me know if you'd like to add styles or link it to another object.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"success\"\n }\n];\n\nexport const errorMessageChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"error\",\n content:\n \"Sorry, I couldn't generate the requested form. Reason: The “Customer” transaction does not exist in the current Knowledge Base. Please create the “Customer” object or check if it’s named differently.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n }\n];\n\nexport const assistantWaitingChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"waiting\",\n content: \"Creating CustomerRegistration panel\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n }\n];\n\nexport const chatTranslations: ChatTranslations = {\n accessibleName: {\n clearChat: \"Clear chat\",\n copyMessageContent: \"Copy assistant content\",\n downloadCodeButton: \"Download code\",\n sendButton: \"Send\",\n sendInput: \"Message\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n },\n placeholder: {\n sendInput: \"Ask me a question...\"\n },\n text: {\n copyCodeButton: \"Copy code\",\n copyMessageContent: \"Copy\",\n downloadCodeButton: \"Download\",\n processing: `Processing...`,\n sourceFiles: \"Source files:\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n }\n};\n\n// All messages\n\nexport const allMessagesModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"user\",\n content:\n \"Generate a web form for customer registration with fields for name, email, phone, and address. Include validation, save the data to the database, and show a confirmation message after submission.\",\n metadata: null\n },\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"I’ve created the basic structure for the registration form, but I need a bit more info: Should the address include city, state, and ZIP? Do you want a separate confirmation page or just a message on the same screen? Any specific format or validation for the phone number?\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"The CustomerRegistration panel was created with warnings: The “Phone” field uses a generic character format—consider a phone mask. No address validation rules applied.The data is still saved correctly, and the panel works as expected.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"warning\"\n },\n {\n id: \"1\",\n role: \"error\",\n content:\n \"Sorry, I couldn't generate the requested form. Reason: The “Customer” transaction does not exist in the current Knowledge Base. Please create the “Customer” object or check if it’s named differently.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"5\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Your information has been saved successfully, and all changes are now reflected in your account. You can continue with the next steps or return to the dashboard at any time.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"15:00\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"success\"\n }\n];\n\n// - - - - - - - - - - - - - -\n// Other messages\n// - - - - - - - - - - - - - -\n\nexport const ASSISTANT_RESPONSE_MARKDOWN = `\n###### Code block {#code-block}\nTo create code blocks, you’ll use three backticks (\\` \\`\\`\\` \\`) or three tildes (\\`~~~\\`) on the lines before and after the code block.\n\n\\`\\`\\`\n{\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"age\": 25\n}\n\\`\\`\\`\n\nAnother way to create code blocks is to indent every line of the block by at least four spaces or one tab.\n\n <html>\n <head>\n </head>\n </html>\n\n\n###### Syntax Highlighting {#syntax-highlighting}\nThis feature allows you to add color highlighting for whatever language your code was written in.\nTo add syntax highlighting, specify a language next to the backticks before the fenced code block.\n\n\\`\\`\\`json\n{\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"age\": 25\n}\n\\`\\`\\`\n\n\\`\\`\\`javascript\nimport React from 'react'\nimport ReactDOM from 'react-dom'\nimport Markdown from 'react-markdown'\nimport rehypeHighlight from 'rehype-highlight'\n\nconst markdown = \\`\n# Your markdown here\n\\`\n\nReactDOM.render(\n <Markdown rehypePlugins={[rehypeHighlight]}>{markdown}</Markdown>,\n document.querySelector('#content')\n)\n\\`\\`\\`\n\n###### Horizontal Rules {#horizontal-rules}\nTo create a horizontal rule, use three or more asterisks (\\`***\\`), dashes (\\`---\\`), or underscores (\\`___\\`) on a line by themselves.\n`;\n\nexport const chatRecord: ChatMessage[] = [\n { id: \"1\", role: \"user\", content: \"Hello world\" },\n { id: \"2\", role: \"assistant\", content: ASSISTANT_RESPONSE_MARKDOWN },\n { id: \"3\", role: \"user\", content: \"Hello world 1\" },\n { id: \"4\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN },\n { id: \"5\", role: \"user\", content: \"Hello world 2\" },\n { id: \"6\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN },\n { id: \"7\", role: \"user\", content: \"Hello world 3\" },\n { id: \"8\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN },\n { id: \"9\", role: \"user\", content: \"Hello world 4\" },\n { id: \"10\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN }\n];\n\nexport const longChatRecord: ChatMessage[] = Array.from(\n { length: 40 },\n (_, index) =>\n index % 2 === 0\n ? {\n id: `index: ${index}`,\n role: \"user\",\n content:\n `index: ${index}` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n`\n }\n : {\n id: `index: ${index}`,\n role: \"assistant\",\n content:\n ASSISTANT_RESPONSE_SHORT_MARKDOWN +\n `\\nindex: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n`\n }\n);\n\nexport const codeFixerRecord: ChatMessage[] = [\n {\n id: \"1\",\n role: \"user\",\n content: \"Please give me an example about...\",\n metadata: \"14:55\"\n },\n {\n id: \"2\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Action required example. Action required example. Action required example.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"3\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Some fields contain missing or invalid data, which may prevent the process from completing correctly. Review your input carefully and make any necessary corrections before continuing.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"warning\"\n },\n {\n id: \"4\",\n role: \"error\",\n content:\n \"An unexpected error occurred while processing your request, and the operation couldn’t be completed.Please check your internet connection or try again later. If the problem persists, contact support.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"5\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Your information has been saved successfully, and all changes are now reflected in your account. You can continue with the next steps or return to the dashboard at any time.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"success\"\n },\n {\n id: \"6\",\n role: \"user\",\n content:\n \"Implement the function calculate_average_grade in grades.py that takes a list of grades as input and returns the average grade as a floating-point number\",\n metadata: \"15:00\"\n },\n {\n id: \"7\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"You can provide further details or updates regarding your support ticket and its associated code. Your input here helps us better understand and address your issue effectively.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"8\",\n role: \"assistant\",\n status: \"waiting\",\n content: \"You can provide further details or updates\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"9\",\n role: \"assistant\",\n status: \"complete\",\n content: ASSISTANT_RESPONSE_SHORT_MARKDOWN,\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n }\n];\n","import {\n ChatCallbacks,\n ChatTranslations\n} from \"@genexus/chameleon-controls-library\";\nimport { ChatMessageFile } from \"@genexus/chameleon-controls-library/dist/types/components/chat/types\";\n\nimport { ASSISTANT_RESPONSE_MARKDOWN } from \"./models\";\n\nimport { ASSISTANT_NAME } from \"./models\";\nimport { MercuryChatMessageMetadata } from \"../../components/chat/lit-custom-render/types\";\n\nconst PROCESSING_PLACEHOLDER = \"{{ASSISTANT_NAME}}\";\n\nconst sendChatMessages = (chatRef: HTMLChChatElement) => () => {\n chatRef.generatingResponse = true;\n\n chatRef.addNewMessage({\n id: `${new Date().getTime()}`,\n role: \"assistant\",\n content: \"Analyzing\",\n status: \"waiting\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n });\n\n setTimeout(() => {\n chatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: \"Processing with Chat with LLMs\",\n status: \"waiting\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n \"replace\"\n );\n\n setTimeout(() => {\n dummyStreaming(chatRef, 20, ASSISTANT_RESPONSE_MARKDOWN, \"replace\");\n }, 2000);\n }, 2000);\n};\n\nconst stopGeneratingAnswer = (): Promise<void> => {\n console.log(\"stop generating answer\");\n return new Promise<void>(resolve => {\n // Lógica asincrónica aquí si es necesario\n resolve();\n });\n};\n\nexport const chatCallbacksWithChatRef = (\n chChatRef: HTMLChChatElement\n): ChatCallbacks => {\n return {\n sendChatMessages: sendChatMessages(chChatRef),\n uploadFile: (file: File) =>\n new Promise<ChatMessageFile>(() => {\n console.log(\"file\", file);\n\n return Promise.resolve({\n url: \"Error\",\n mimeType: \"application/javascript\"\n } satisfies ChatMessageFile);\n }),\n stopGeneratingAnswer: stopGeneratingAnswer\n };\n};\n\nfunction dummyStreaming(\n chatRef: HTMLChChatElement,\n counter: number,\n stringToDisplay: string,\n mode: \"concat\" | \"replace\"\n) {\n setTimeout(\n () => {\n const streamingCompleted = counter >= stringToDisplay.length;\n\n chatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: stringToDisplay.substring(counter - 20, counter),\n\n // {\n // message: stringToDisplay.substring(counter - 20, counter),\n // files: streamingCompleted\n // ? [\n // {\n // url: \"https://next.genexus.ai\",\n // caption: \"Mars Exploration Contract\"\n // },\n // {\n // url: \"https://gx-chameleon.netlify.app\",\n // caption: \"Venus Exploration Contract\"\n // }\n // ]\n // : undefined\n // },\n status: streamingCompleted ? \"complete\" : \"streaming\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n mode\n );\n\n if (!streamingCompleted) {\n dummyStreaming(chatRef, counter + 20, stringToDisplay, \"concat\");\n } else {\n chatRef.generatingResponse = false;\n }\n },\n counter % 200 === 0 ? 50 : 40\n );\n}\n\nexport const chatTranslations: ChatTranslations = {\n accessibleName: {\n clearChat: \"Clear chat\",\n copyMessageContent: \"Copy message\",\n downloadCodeButton: \"Download code\",\n sendButton: \"Send\",\n sendInput: \"Message\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n },\n placeholder: {\n sendInput: \"Ask me a question...\"\n },\n text: {\n copyCodeButton: \"Copy code\",\n copyMessageContent: \"Copy message content\",\n downloadCodeButton: \"Download code\",\n processing: `Processing with ${PROCESSING_PLACEHOLDER}`,\n sourceFiles: \"Source files:\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n }\n};\n",":host {\n block-size: 100%;\n display: grid;\n}\n","import { Component, Host, h, State, Prop, Method } from \"@stencil/core\";\nimport { MercuryBundles } from \"@genexus/mercury\";\nimport { renderItemMercury } from \"../../components/chat/lit-custom-render/render-item.lit\";\nimport { codeFixerRecord } from \"./models\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"utils/elevation\",\n \"components/chat-lit\",\n \"components/markdown-viewer\"\n];\n\nimport { chatCallbacksWithChatRef, chatTranslations } from \"./callbacks\";\nimport {\n ChatMessage,\n ChatCallbacks\n} from \"@genexus/chameleon-controls-library\";\nimport { ChatMessageUser } from \"@genexus/chameleon-controls-library/dist/types/components/chat/types\";\n\n@Component({\n tag: \"gx-ide-sc-chat-container\",\n styleUrl: \"chat-showcase.scss\",\n shadow: true\n})\nexport class GxIdeScChatContainer {\n #chatContainerRef!: HTMLGxIdeChatContainerElement;\n #chatWelcomeRef!: HTMLGxIdeChatWelcomeElement;\n #chChatRef!: HTMLChChatElement;\n #chatCallbacks: ChatCallbacks;\n\n /**\n * If true, the chat items length will be 0, since this is a requirement for dipslaying the ch-chat\n * \"empty-chat\" slot that welcome screen uses to display.\n */\n @Prop() readonly mode: \"welcome\" | \"messages-sample\" | \"empty\" =\n \"messages-sample\";\n\n @State() generatingResponse: boolean = false;\n @State() loadingState:\n | \"all-records-loaded\"\n | \"initial\"\n | \"loading\"\n | \"more-data-to-fetch\" = \"all-records-loaded\";\n @State() showAdditionalContent: boolean = false;\n @State() conversationCopied: boolean = false;\n @State() assistantStatus: string = \"Getting Data\";\n @State() chatItems: ChatMessage[] = [];\n\n /**\n * It will exit the wellcome screen and remove it from the dom.\n */\n @Method()\n async exitWelcome() {\n // hand exitWelcome to gx-ide-chat-welcome\n this.#chatWelcomeRef.exitWelcome();\n }\n\n #copyConversationCallbackHandler = () => {\n this.#chatContainerRef.showCopyConversationMessage();\n };\n\n #deleteConversationCallbackHandler = () => {};\n\n componentDidLoad() {\n setTimeout(() => {\n this.assistantStatus = \"Creating Data Base..\";\n }, 1000);\n }\n\n componentDidRender() {\n if (!this.#chatCallbacks && this.#chChatRef) {\n this.#chatCallbacks = chatCallbacksWithChatRef(this.#chChatRef);\n }\n }\n\n async componentWillLoad() {\n if (this.mode === \"messages-sample\") {\n this.chatItems = codeFixerRecord;\n } else if (this.mode === \"welcome\") {\n this.chatItems = [];\n } else if (this.mode === \"empty\") {\n this.chatItems = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content: \"Hello! I am your assistant.\",\n metadata: \"14:56\"\n }\n ];\n }\n }\n #suggestedPrompRequestedCallbackHandler = async (\n prompt: string\n ): Promise<void> => {\n let assistantFinalResponse: string;\n if (prompt.toLowerCase().includes(\"transaction\")) {\n assistantFinalResponse =\n 'To create a transaction in GeneXus, start by opening your KB (Knowledge Base) and selecting \"Transaction\" from the \"New Object\" options. Give it a name and define its attributes, starting with a primary key followed by the related data fields. GeneXus will automatically infer the data structure and relationships based on how you define the attributes and their nesting. Once saved, it generates the necessary database tables and forms for inserting, updating, and deleting records. You can then run the application to test the transaction directly in your browser.';\n } else if (prompt.toLowerCase().includes(\"entity\")) {\n assistantFinalResponse =\n 'In GeneXus, creating an entity usually means defining a Transaction object that represents a real-world concept like \"Customer\" or \"Product.\" To do this, create a new Transaction, name it after the entity, and define its attributes—starting with a unique identifier (like CustomerId) and then adding other fields (like CustomerName, CustomerEmail). GeneXus treats this Transaction as an entity and uses it to generate the corresponding table and interface automatically.';\n } else {\n assistantFinalResponse =\n \"Sorry, I didn’t catch that—mind rephrasing it? 😅\";\n }\n\n const userPrompt: ChatMessageUser = {\n id: \"1\",\n role: \"user\",\n content: prompt\n };\n this.#chChatRef.addNewMessage(userPrompt);\n setTimeout(() => {\n this.#chChatRef.addNewMessage({\n id: `${new Date().getTime()}`,\n role: \"assistant\",\n content: \"Analyzing\",\n status: \"waiting\"\n });\n setTimeout(() => {\n this.#chChatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: \"Processing with Chat with LLMs\",\n status: \"waiting\"\n },\n \"replace\"\n );\n setTimeout(() => {\n this.#chChatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: \"Getting information\",\n status: \"waiting\"\n },\n \"replace\"\n );\n this.#chChatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: assistantFinalResponse,\n status: \"complete\"\n },\n \"replace\"\n );\n }, 1500);\n }, 1500);\n }, 100);\n };\n\n render() {\n return (\n <Host>\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <gx-ide-chat-container\n chatTitle=\"GeneXus Assistant\"\n copyConversationCallback={this.#copyConversationCallbackHandler}\n deleteConversationCallback={this.#deleteConversationCallbackHandler}\n ref={el =>\n (this.#chatContainerRef = el as HTMLGxIdeChatContainerElement)\n }\n class=\"elevation-1\"\n >\n <ch-chat\n callbacks={this.#chatCallbacks}\n class=\"chat-lit\"\n generatingResponse={this.generatingResponse}\n loadingState={this.loadingState} // \"all-records-loaded\" to display the welcome screen\n renderItem={renderItemMercury}\n items={this.chatItems} // length 0 to display the welcome screen\n showAdditionalContent={this.showAdditionalContent}\n translations={chatTranslations}\n ref={(el: HTMLChChatElement) =>\n (this.#chChatRef = el as HTMLChChatElement)\n }\n markdownTheme=\"components/markdown-viewer\"\n >\n <gx-ide-chat-welcome\n ref={el =>\n (this.#chatWelcomeRef = el as HTMLGxIdeChatWelcomeElement)\n }\n slot=\"empty-chat\"\n suggestedPrompRequestedCallback={\n this.#suggestedPrompRequestedCallbackHandler\n }\n ></gx-ide-chat-welcome>\n <div slot=\"additional-content\">\n Custom content that is rendered when the chat renders content\n </div>\n </ch-chat>\n </gx-ide-chat-container>\n </Host>\n );\n }\n}\n"],"mappings":";;;;AAOO,MAAMA,IACX;;AAEK,MAAMC,IAAiB;;;;8BAyKvB;MAAMC,IAA8B;;AAiEEC,MAAMC,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sB,QAC5C;;EAGL,kBAAAC;IACE,KAAKb,EAAAL,MAAIG,GAAA,QAAmBE,EAAAL,MAAIE,GAAA,MAAa;MAC3CiB,EAAAnB,MAAIG,GAAkBhC,yBAAyBkC,EAAAL,MAAIE,GAAA,OAAY;;;EAInE,uBAAMkB;IACJ,IAAIpB,KAAKrB,SAAS,mBAAmB;MACnCqB,KAAKqB,YAAYvE;WACZ,IAAIkD,KAAKrB,SAAS,WAAW;MAClCqB,KAAKqB,YAAY;WACZ,IAAIrB,KAAKrB,SAAS,SAAS;MAChCqB,KAAKqB,YAAY,EACf;QACE1E,IAAI;QACJC,MAAM;QACNI,QAAQ;QACRH,SAAS;QACTE,UAAU;;;;EAgElB,MAAAuE;IACE,OACEC,EAACC,GAAI,MACHD,EAAA;MAAUE,OAAO7B;QACjB2B,EAAA;MACEG,WAAU;MACVC,0BAA0BtB,EAAAL,MAAII,GAAA;MAC9BwB,4BAA4BvB,EAAAL,MAAIO,GAAA;MAChCsB,KAAKC,KACFX,EAAAnB,MAAIF,GAAqBgC,GAAmC;MAE/DC,OAAM;OAENR,EAAA;MACES,WAAW3B,EAAAL,MAAIG,GAAA;MACf4B,OAAM;MACNxE,oBAAoByC,KAAKzC;MACzB0E,cAAcjC,KAAKiC;MACnBC,YAAYC;MACZC,OAAOpC,KAAKqB;MACZgB,uBAAuBrC,KAAKqC;MAC5BC,cAAcxD;MACd+C,KAAMC,KACHX,EAAAnB,MAAIE,GAAc4B,GAAuB;MAE5CS,eAAc;OAEdhB,EAAA;MACEM,KAAKC,KACFX,EAAAnB,MAAIC,GAAmB6B,GAAiC;MAE3DU,MAAK;MACLC,iCACEpC,EAAAL,MAAIQ,GAAA;QAGRe,EAAA;MAAKiB,MAAK;OAAoB"}
|
|
1
|
+
{"version":3,"names":["ASSISTANT_RESPONSE_SHORT_MARKDOWN","ASSISTANT_NAME","ASSISTANT_RESPONSE_MARKDOWN","Array","from","length","_","index","id","role","content","codeFixerRecord","metadata","status","assistantName","time","parts","PROCESSING_PLACEHOLDER","sendChatMessages","chatRef","generatingResponse","addNewMessage","Date","getTime","setTimeout","updateLastMessage","dummyStreaming","stopGeneratingAnswer","console","log","Promise","resolve","chatCallbacksWithChatRef","chChatRef","uploadFile","file","url","mimeType","counter","stringToDisplay","mode","streamingCompleted","substring","chatTranslations","accessibleName","clearChat","copyMessageContent","downloadCodeButton","sendButton","sendInput","stopGeneratingAnswerButton","placeholder","text","copyCodeButton","processing","sourceFiles","chatShowcaseCss","CSS_BUNDLES","GxIdeScChatContainer","_GxIdeScChatContainer_chatContainerRef","set","this","_GxIdeScChatContainer_chatWelcomeRef","_GxIdeScChatContainer_chChatRef","_GxIdeScChatContainer_chatCallbacks","_GxIdeScChatContainer_copyConversationCallbackHandler","__classPrivateFieldGet","showCopyConversationMessage","_GxIdeScChatContainer_deleteConversationCallbackHandler","_GxIdeScChatContainer_suggestedPrompRequestedCallbackHandler","async","prompt","assistantFinalResponse","toLowerCase","includes","userPrompt","exitWelcome","componentDidLoad","assistantStatus","componentDidRender","__classPrivateFieldSet","componentWillLoad","chatItems","render","h","Host","model","chatTitle","copyConversationCallback","deleteConversationCallback","ref","el","class","callbacks","loadingState","renderItem","renderItemMercury","items","showAdditionalContent","translations","markdownTheme","slot","suggestedPrompRequestedCallback"],"sources":["src/showcase/chat-container/models.ts","src/showcase/chat-container/callbacks.ts","src/showcase/chat-container/chat-showcase.scss?tag=gx-ide-sc-chat-container&encapsulation=shadow","src/showcase/chat-container/chat.showcase.tsx"],"sourcesContent":["import type {\n ChatMessage,\n ChatTranslations\n} from \"@genexus/chameleon-controls-library\";\n\nimport { MercuryChatMessageMetadata } from \"../../components/chat/lit-custom-render/types\";\n\nexport const ASSISTANT_RESPONSE_SHORT_MARKDOWN =\n '\\n### Code block {#code-block}\\nTo create code blocks, you’ll use three backticks (` ``` `) or three tildes (`~~~`) on the lines before and after the code block.\\n\\n```json\\n{\\n \"firstName\": \"John\",\\n \"lastName\": \"Smith\",\\n \"age\": 25\\n}';\n\nexport const ASSISTANT_NAME = \"Nexa\";\n\n// - - - - - - - - - - - - - -\n// Types of messages\n// - - - - - - - - - - - - - -\n\nexport const userMessageChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"user\",\n content:\n \"Generate a web form for customer registration with fields for name, email, phone, and address. Include validation, save the data to the database, and show a confirmation message after submission.\",\n metadata: null\n }\n];\n\nexport const assistantMessageChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"I’ve created the basic structure for the registration form, but I need a bit more info: Should the address include city, state, and ZIP? Do you want a separate confirmation page or just a message on the same screen? Any specific format or validation for the phone number?\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n }\n];\n\nexport const assistantMessageWarningChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"The CustomerRegistration panel was created with warnings: The “Phone” field uses a generic character format—consider a phone mask. No address validation rules applied.The data is still saved correctly, and the panel works as expected.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"warning\"\n }\n];\n\nexport const assistantMessageSuccessChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"The CustomerRegistration web panel was created successfully. Fields: Name, Email, Phone, Address. Validations applied (required, email format). Data saved to “Customer” transaction. Confirmation message shown after submit. Let me know if you'd like to add styles or link it to another object.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"success\"\n }\n];\n\nexport const errorMessageChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"error\",\n content:\n \"Sorry, I couldn't generate the requested form. Reason: The “Customer” transaction does not exist in the current Knowledge Base. Please create the “Customer” object or check if it’s named differently.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n }\n];\n\nexport const assistantWaitingChatModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"waiting\",\n content: \"Creating CustomerRegistration panel\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n }\n];\n\nexport const chatTranslations: ChatTranslations = {\n accessibleName: {\n clearChat: \"Clear chat\",\n copyMessageContent: \"Copy assistant content\",\n downloadCodeButton: \"Download code\",\n sendButton: \"Send\",\n sendInput: \"Message\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n },\n placeholder: {\n sendInput: \"Ask me a question...\"\n },\n text: {\n copyCodeButton: \"Copy code\",\n copyMessageContent: \"Copy\",\n downloadCodeButton: \"Download\",\n processing: `Processing...`,\n sourceFiles: \"Source files:\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n }\n};\n\n// All messages\n\nexport const allMessagesModel: ChatMessage[] = [\n {\n id: \"1\",\n role: \"user\",\n content:\n \"Generate a web form for customer registration with fields for name, email, phone, and address. Include validation, save the data to the database, and show a confirmation message after submission.\",\n metadata: null\n },\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"I’ve created the basic structure for the registration form, but I need a bit more info: Should the address include city, state, and ZIP? Do you want a separate confirmation page or just a message on the same screen? Any specific format or validation for the phone number?\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"The CustomerRegistration panel was created with warnings: The “Phone” field uses a generic character format—consider a phone mask. No address validation rules applied.The data is still saved correctly, and the panel works as expected.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"warning\"\n },\n {\n id: \"1\",\n role: \"error\",\n content:\n \"Sorry, I couldn't generate the requested form. Reason: The “Customer” transaction does not exist in the current Knowledge Base. Please create the “Customer” object or check if it’s named differently.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"5\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Your information has been saved successfully, and all changes are now reflected in your account. You can continue with the next steps or return to the dashboard at any time.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"15:00\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"success\"\n }\n];\n\n// - - - - - - - - - - - - - -\n// Other messages\n// - - - - - - - - - - - - - -\n\nexport const ASSISTANT_RESPONSE_MARKDOWN = `\n###### Code block {#code-block}\nTo create code blocks, you’ll use three backticks (\\` \\`\\`\\` \\`) or three tildes (\\`~~~\\`) on the lines before and after the code block.\n\n\\`\\`\\`\n{\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"age\": 25\n}\n\\`\\`\\`\n\nAnother way to create code blocks is to indent every line of the block by at least four spaces or one tab.\n\n <html>\n <head>\n </head>\n </html>\n\n\n###### Syntax Highlighting {#syntax-highlighting}\nThis feature allows you to add color highlighting for whatever language your code was written in.\nTo add syntax highlighting, specify a language next to the backticks before the fenced code block.\n\n\\`\\`\\`json\n{\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"age\": 25\n}\n\\`\\`\\`\n\n\\`\\`\\`javascript\nimport React from 'react'\nimport ReactDOM from 'react-dom'\nimport Markdown from 'react-markdown'\nimport rehypeHighlight from 'rehype-highlight'\n\nconst markdown = \\`\n# Your markdown here\n\\`\n\nReactDOM.render(\n <Markdown rehypePlugins={[rehypeHighlight]}>{markdown}</Markdown>,\n document.querySelector('#content')\n)\n\\`\\`\\`\n\n###### Horizontal Rules {#horizontal-rules}\nTo create a horizontal rule, use three or more asterisks (\\`***\\`), dashes (\\`---\\`), or underscores (\\`___\\`) on a line by themselves.\n`;\n\nexport const chatRecord: ChatMessage[] = [\n { id: \"1\", role: \"user\", content: \"Hello world\" },\n { id: \"2\", role: \"assistant\", content: ASSISTANT_RESPONSE_MARKDOWN },\n { id: \"3\", role: \"user\", content: \"Hello world 1\" },\n { id: \"4\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN },\n { id: \"5\", role: \"user\", content: \"Hello world 2\" },\n { id: \"6\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN },\n { id: \"7\", role: \"user\", content: \"Hello world 3\" },\n { id: \"8\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN },\n { id: \"9\", role: \"user\", content: \"Hello world 4\" },\n { id: \"10\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN }\n];\n\nexport const longChatRecord: ChatMessage[] = Array.from(\n { length: 40 },\n (_, index) =>\n index % 2 === 0\n ? {\n id: `index: ${index}`,\n role: \"user\",\n content:\n `index: ${index}` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n`\n }\n : {\n id: `index: ${index}`,\n role: \"assistant\",\n content:\n ASSISTANT_RESPONSE_SHORT_MARKDOWN +\n `\\nindex: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n`\n }\n);\n\nexport const codeFixerRecord: ChatMessage[] = [\n {\n id: \"1\",\n role: \"user\",\n content: \"Please give me an example about...\",\n metadata: \"14:55\"\n },\n {\n id: \"2\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Action required example. Action required example. Action required example.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"3\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Some fields contain missing or invalid data, which may prevent the process from completing correctly. Review your input carefully and make any necessary corrections before continuing.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"warning\"\n },\n {\n id: \"4\",\n role: \"error\",\n content:\n \"An unexpected error occurred while processing your request, and the operation couldn’t be completed.Please check your internet connection or try again later. If the problem persists, contact support.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"5\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Your information has been saved successfully, and all changes are now reflected in your account. You can continue with the next steps or return to the dashboard at any time.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata,\n parts: \"success\"\n },\n {\n id: \"6\",\n role: \"user\",\n content:\n \"Implement the function calculate_average_grade in grades.py that takes a list of grades as input and returns the average grade as a floating-point number\",\n metadata: \"15:00\"\n },\n {\n id: \"7\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"You can provide further details or updates regarding your support ticket and its associated code. Your input here helps us better understand and address your issue effectively.\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"8\",\n role: \"assistant\",\n status: \"waiting\",\n content: \"You can provide further details or updates\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n {\n id: \"9\",\n role: \"assistant\",\n status: \"complete\",\n content: ASSISTANT_RESPONSE_SHORT_MARKDOWN,\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n }\n];\n","import {\n ChatCallbacks,\n ChatTranslations\n} from \"@genexus/chameleon-controls-library\";\nimport { ChatMessageFile } from \"@genexus/chameleon-controls-library/dist/types/components/chat/types\";\n\nimport { ASSISTANT_RESPONSE_MARKDOWN } from \"./models\";\n\nimport { ASSISTANT_NAME } from \"./models\";\nimport { MercuryChatMessageMetadata } from \"../../components/chat/lit-custom-render/types\";\n\nconst PROCESSING_PLACEHOLDER = \"{{ASSISTANT_NAME}}\";\n\nconst sendChatMessages = (chatRef: HTMLChChatElement) => () => {\n chatRef.generatingResponse = true;\n\n chatRef.addNewMessage({\n id: `${new Date().getTime()}`,\n role: \"assistant\",\n content: \"Analyzing\",\n status: \"waiting\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n });\n\n setTimeout(() => {\n chatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: \"Processing with Chat with LLMs\",\n status: \"waiting\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n \"replace\"\n );\n\n setTimeout(() => {\n dummyStreaming(chatRef, 20, ASSISTANT_RESPONSE_MARKDOWN, \"replace\");\n }, 2000);\n }, 2000);\n};\n\nconst stopGeneratingAnswer = (): Promise<void> => {\n console.log(\"stop generating answer\");\n return new Promise<void>(resolve => {\n // Lógica asincrónica aquí si es necesario\n resolve();\n });\n};\n\nexport const chatCallbacksWithChatRef = (\n chChatRef: HTMLChChatElement\n): ChatCallbacks => {\n return {\n sendChatMessages: sendChatMessages(chChatRef),\n uploadFile: (file: File) =>\n new Promise<ChatMessageFile>(() => {\n console.log(\"file\", file);\n\n return Promise.resolve({\n url: \"Error\",\n mimeType: \"application/javascript\"\n } satisfies ChatMessageFile);\n }),\n stopGeneratingAnswer: stopGeneratingAnswer\n };\n};\n\nfunction dummyStreaming(\n chatRef: HTMLChChatElement,\n counter: number,\n stringToDisplay: string,\n mode: \"concat\" | \"replace\"\n) {\n setTimeout(\n () => {\n const streamingCompleted = counter >= stringToDisplay.length;\n\n chatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: stringToDisplay.substring(counter - 20, counter),\n\n // {\n // message: stringToDisplay.substring(counter - 20, counter),\n // files: streamingCompleted\n // ? [\n // {\n // url: \"https://next.genexus.ai\",\n // caption: \"Mars Exploration Contract\"\n // },\n // {\n // url: \"https://gx-chameleon.netlify.app\",\n // caption: \"Venus Exploration Contract\"\n // }\n // ]\n // : undefined\n // },\n status: streamingCompleted ? \"complete\" : \"streaming\",\n metadata: {\n assistantName: ASSISTANT_NAME,\n time: \"14:25\"\n } satisfies MercuryChatMessageMetadata\n },\n mode\n );\n\n if (!streamingCompleted) {\n dummyStreaming(chatRef, counter + 20, stringToDisplay, \"concat\");\n } else {\n chatRef.generatingResponse = false;\n }\n },\n counter % 200 === 0 ? 50 : 40\n );\n}\n\nexport const chatTranslations: ChatTranslations = {\n accessibleName: {\n clearChat: \"Clear chat\",\n copyMessageContent: \"Copy message\",\n downloadCodeButton: \"Download code\",\n sendButton: \"Send\",\n sendInput: \"Message\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n },\n placeholder: {\n sendInput: \"Ask me a question...\"\n },\n text: {\n copyCodeButton: \"Copy code\",\n copyMessageContent: \"Copy message content\",\n downloadCodeButton: \"Download code\",\n processing: `Processing with ${PROCESSING_PLACEHOLDER}`,\n sourceFiles: \"Source files:\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n }\n};\n",":host {\n block-size: 100%;\n display: grid;\n}\n","import { Component, Host, h, State, Prop, Method } from \"@stencil/core\";\nimport { renderItemMercury } from \"../../components/chat/lit-custom-render/render-item.lit\";\nimport { codeFixerRecord } from \"./models\";\n\n// TODO: Add back \"components/chat-lit\" once chat bundle for lit is ready\n// on a new Mercury version\nconst CSS_BUNDLES = [\n \"resets/box-sizing\",\n \"utils/elevation\",\n \"components/markdown-viewer\"\n];\n\nimport { chatCallbacksWithChatRef, chatTranslations } from \"./callbacks\";\nimport {\n ChatMessage,\n ChatCallbacks\n} from \"@genexus/chameleon-controls-library\";\nimport { ChatMessageUser } from \"@genexus/chameleon-controls-library/dist/types/components/chat/types\";\n\n@Component({\n tag: \"gx-ide-sc-chat-container\",\n styleUrl: \"chat-showcase.scss\",\n shadow: true\n})\nexport class GxIdeScChatContainer {\n #chatContainerRef!: HTMLGxIdeChatContainerElement;\n #chatWelcomeRef!: HTMLGxIdeChatWelcomeElement;\n #chChatRef!: HTMLChChatElement;\n #chatCallbacks: ChatCallbacks;\n\n /**\n * If true, the chat items length will be 0, since this is a requirement for dipslaying the ch-chat\n * \"empty-chat\" slot that welcome screen uses to display.\n */\n @Prop() readonly mode: \"welcome\" | \"messages-sample\" | \"empty\" =\n \"messages-sample\";\n\n @State() generatingResponse: boolean = false;\n @State() loadingState:\n | \"all-records-loaded\"\n | \"initial\"\n | \"loading\"\n | \"more-data-to-fetch\" = \"all-records-loaded\";\n @State() showAdditionalContent: boolean = false;\n @State() conversationCopied: boolean = false;\n @State() assistantStatus: string = \"Getting Data\";\n @State() chatItems: ChatMessage[] = [];\n\n /**\n * It will exit the wellcome screen and remove it from the dom.\n */\n @Method()\n async exitWelcome() {\n // hand exitWelcome to gx-ide-chat-welcome\n this.#chatWelcomeRef.exitWelcome();\n }\n\n #copyConversationCallbackHandler = () => {\n this.#chatContainerRef.showCopyConversationMessage();\n };\n\n #deleteConversationCallbackHandler = () => {};\n\n componentDidLoad() {\n setTimeout(() => {\n this.assistantStatus = \"Creating Data Base..\";\n }, 1000);\n }\n\n componentDidRender() {\n if (!this.#chatCallbacks && this.#chChatRef) {\n this.#chatCallbacks = chatCallbacksWithChatRef(this.#chChatRef);\n }\n }\n\n async componentWillLoad() {\n if (this.mode === \"messages-sample\") {\n this.chatItems = codeFixerRecord;\n } else if (this.mode === \"welcome\") {\n this.chatItems = [];\n } else if (this.mode === \"empty\") {\n this.chatItems = [\n {\n id: \"1\",\n role: \"assistant\",\n status: \"complete\",\n content: \"Hello! I am your assistant.\",\n metadata: \"14:56\"\n }\n ];\n }\n }\n #suggestedPrompRequestedCallbackHandler = async (\n prompt: string\n ): Promise<void> => {\n let assistantFinalResponse: string;\n if (prompt.toLowerCase().includes(\"transaction\")) {\n assistantFinalResponse =\n 'To create a transaction in GeneXus, start by opening your KB (Knowledge Base) and selecting \"Transaction\" from the \"New Object\" options. Give it a name and define its attributes, starting with a primary key followed by the related data fields. GeneXus will automatically infer the data structure and relationships based on how you define the attributes and their nesting. Once saved, it generates the necessary database tables and forms for inserting, updating, and deleting records. You can then run the application to test the transaction directly in your browser.';\n } else if (prompt.toLowerCase().includes(\"entity\")) {\n assistantFinalResponse =\n 'In GeneXus, creating an entity usually means defining a Transaction object that represents a real-world concept like \"Customer\" or \"Product.\" To do this, create a new Transaction, name it after the entity, and define its attributes—starting with a unique identifier (like CustomerId) and then adding other fields (like CustomerName, CustomerEmail). GeneXus treats this Transaction as an entity and uses it to generate the corresponding table and interface automatically.';\n } else {\n assistantFinalResponse =\n \"Sorry, I didn’t catch that—mind rephrasing it? 😅\";\n }\n\n const userPrompt: ChatMessageUser = {\n id: \"1\",\n role: \"user\",\n content: prompt\n };\n this.#chChatRef.addNewMessage(userPrompt);\n setTimeout(() => {\n this.#chChatRef.addNewMessage({\n id: `${new Date().getTime()}`,\n role: \"assistant\",\n content: \"Analyzing\",\n status: \"waiting\"\n });\n setTimeout(() => {\n this.#chChatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: \"Processing with Chat with LLMs\",\n status: \"waiting\"\n },\n \"replace\"\n );\n setTimeout(() => {\n this.#chChatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: \"Getting information\",\n status: \"waiting\"\n },\n \"replace\"\n );\n this.#chChatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: assistantFinalResponse,\n status: \"complete\"\n },\n \"replace\"\n );\n }, 1500);\n }, 1500);\n }, 100);\n };\n\n render() {\n return (\n <Host>\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <gx-ide-chat-container\n chatTitle=\"GeneXus Assistant\"\n copyConversationCallback={this.#copyConversationCallbackHandler}\n deleteConversationCallback={this.#deleteConversationCallbackHandler}\n ref={el =>\n (this.#chatContainerRef = el as HTMLGxIdeChatContainerElement)\n }\n class=\"elevation-1\"\n >\n <ch-chat\n callbacks={this.#chatCallbacks}\n class=\"chat-lit\"\n generatingResponse={this.generatingResponse}\n loadingState={this.loadingState} // \"all-records-loaded\" to display the welcome screen\n renderItem={renderItemMercury}\n items={this.chatItems} // length 0 to display the welcome screen\n showAdditionalContent={this.showAdditionalContent}\n translations={chatTranslations}\n ref={(el: HTMLChChatElement) =>\n (this.#chChatRef = el as HTMLChChatElement)\n }\n markdownTheme=\"components/markdown-viewer\"\n >\n <gx-ide-chat-welcome\n ref={el =>\n (this.#chatWelcomeRef = el as HTMLGxIdeChatWelcomeElement)\n }\n slot=\"empty-chat\"\n suggestedPrompRequestedCallback={\n this.#suggestedPrompRequestedCallbackHandler\n }\n ></gx-ide-chat-welcome>\n <div slot=\"additional-content\">\n Custom content that is rendered when the chat renders content\n </div>\n </ch-chat>\n </gx-ide-chat-container>\n </Host>\n );\n }\n}\n"],"mappings":";;;;AAOO,MAAMA,IACX;;AAEK,MAAMC,IAAiB;;;;8BAyKvB;MAAMC,IAA8B;;AAiEEC,MAAMC,KACjD;EAAEC,QAAQ;IACV,CAACC,GAAGC,MACFA,IAAQ,MAAM,IACV;EACEC,IAAI,UAAUD;EACdE,MAAM;EACNC,SACE,UAAUH,MACV,UAAUA,QACV,UAAUA,QACV,UAAUA,QACV,UAAUA,QACV,UAAUA,QACV,UAAUA;IAEd;EACEC,IAAI,UAAUD;EACdE,MAAM;EACNC,SACEV,IACA,YAAYO,QACZ,UAAUA,QACV,UAAUA,QACV,UAAUA,QACV,UAAUA,QACV,UAAUA,QACV,UAAUA;;;AAIf,MAAMI,IAAiC,EAC5C;EACEH,IAAI;EACJC,MAAM;EACNC,SAAS;EACTE,UAAU;GAEZ;EACEJ,IAAI;EACJC,MAAM;EACNI,QAAQ;EACRH,SACE;EACFE,UAAU;IACRE,eAAeb;IACfc,MAAM;;GAGV;EACEP,IAAI;EACJC,MAAM;EACNI,QAAQ;EACRH,SACE;EACFE,UAAU;IACRE,eAAeb;IACfc,MAAM;;EAERC,OAAO;GAET;EACER,IAAI;EACJC,MAAM;EACNC,SACE;EACFE,UAAU;IACRE,eAAeb;IACfc,MAAM;;GAGV;EACEP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AAW3B,EAAAL,MAAIG,GAAA;MACf4B,OAAM;MACNxE,oBAAoByC,KAAKzC;MACzB0E,cAAcjC,KAAKiC;MACnBC,YAAYC;MACZC,OAAOpC,KAAKqB;MACZgB,uBAAuBrC,KAAKqC;MAC5BC,cAAcxD;MACd+C,KAAMC,KACHX,EAAAnB,MAAIE,GAAc4B,GAAuB;MAE5CS,eAAc;OAEdhB,EAAA;MACEM,KAAKC,KACFX,EAAAnB,MAAIC,GAAmB6B,GAAiC;MAE3DU,MAAK;MACLC,iCACEpC,EAAAL,MAAIQ,GAAA;QAGRe,EAAA;MAAKiB,MAAK;OAAoB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as t, r as e, h as a, H as i, a as s } from "./p-97107ecc.js";
|
|
2
2
|
|
|
3
3
|
import { g as n } from "./p-401bfc97.js";
|
|
4
4
|
|
|
@@ -21,34 +21,44 @@ var l = undefined && undefined.__classPrivateFieldGet || function(t, e, a, i) {
|
|
|
21
21
|
|
|
22
22
|
var d, p, h, m, u, f;
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
// TODO: Remove this once update chat bundle for lit is ready
|
|
25
|
+
// on a new Mercury version
|
|
26
|
+
const g = t(`./gx-ide-assets/chat-container/chat-lit.css`);
|
|
25
27
|
|
|
26
|
-
const y =
|
|
28
|
+
const y = [ "resets/box-sizing", "utils/typography", "chameleon/scrollbar", "components/button", "components/dropdown", "components/icon", "utils/elevation" ];
|
|
29
|
+
|
|
30
|
+
const b = {
|
|
31
|
+
// styleSheet: chatListCss,
|
|
32
|
+
url: g,
|
|
33
|
+
name: "components/chat-lit"
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const w = n({
|
|
27
37
|
category: "system",
|
|
28
38
|
name: "copy",
|
|
29
39
|
colorType: "primary"
|
|
30
40
|
});
|
|
31
41
|
|
|
32
|
-
const
|
|
42
|
+
const v = n({
|
|
33
43
|
category: "system",
|
|
34
44
|
name: "delete-outlined",
|
|
35
45
|
colorType: "primary"
|
|
36
46
|
});
|
|
37
47
|
|
|
38
|
-
const
|
|
48
|
+
const x = n({
|
|
39
49
|
category: "objects",
|
|
40
50
|
name: "conversational-flows"
|
|
41
51
|
});
|
|
42
52
|
|
|
43
|
-
const
|
|
53
|
+
const _ = n({
|
|
44
54
|
category: "system",
|
|
45
55
|
name: "more-horizontal",
|
|
46
56
|
colorType: "neutral"
|
|
47
57
|
});
|
|
48
58
|
|
|
49
|
-
const
|
|
50
|
-
constructor(
|
|
51
|
-
|
|
59
|
+
const k = class {
|
|
60
|
+
constructor(t) {
|
|
61
|
+
e(this, t);
|
|
52
62
|
d.set(this, [ {
|
|
53
63
|
type: "slot",
|
|
54
64
|
id: "delete-chat-button"
|
|
@@ -99,64 +109,66 @@ const x = class {
|
|
|
99
109
|
}
|
|
100
110
|
render() {
|
|
101
111
|
const t = this.chatTitle || this.copyConversationCallback || this.deleteConversationCallback;
|
|
102
|
-
const
|
|
103
|
-
return
|
|
112
|
+
const e = this.copyConversationCallback || this.deleteConversationCallback;
|
|
113
|
+
return a(i, {
|
|
104
114
|
class: {
|
|
105
115
|
"chat-container": true,
|
|
106
116
|
"with-header": !!t
|
|
107
117
|
}
|
|
108
|
-
},
|
|
109
|
-
model:
|
|
110
|
-
}),
|
|
118
|
+
}, a("ch-theme", {
|
|
119
|
+
model: y
|
|
120
|
+
}), a("ch-theme", {
|
|
121
|
+
model: b
|
|
122
|
+
}), a("section", {
|
|
111
123
|
class: "section"
|
|
112
|
-
}, t &&
|
|
124
|
+
}, t && a("header", {
|
|
113
125
|
class: "header tiny-semi-bold-l"
|
|
114
|
-
}, this.chatTitle && this.chatTitle,
|
|
126
|
+
}, this.chatTitle && this.chatTitle, e && a("ch-action-menu-render", {
|
|
115
127
|
class: "dropdown",
|
|
116
128
|
blockAlign: "inside-start",
|
|
117
129
|
inlineAlign: "inside-end",
|
|
118
130
|
model: l(this, d, "f"),
|
|
119
131
|
expanded: this.menuIsExpanded,
|
|
120
132
|
onExpandedChange: l(this, m, "f")
|
|
121
|
-
},
|
|
133
|
+
}, a("button", {
|
|
122
134
|
class: "button-tertiary button-icon-only",
|
|
123
135
|
onClick: l(this, h, "f"),
|
|
124
136
|
type: "button",
|
|
125
137
|
"aria-label": l(this, p, "f").showMenuAriaLabel,
|
|
126
138
|
title: l(this, p, "f").showMenuAriaLabel
|
|
127
|
-
},
|
|
139
|
+
}, a("ch-image", {
|
|
128
140
|
class: "icon-md",
|
|
129
|
-
src:
|
|
130
|
-
})), this.copyConversationCallback &&
|
|
141
|
+
src: _
|
|
142
|
+
})), this.copyConversationCallback && a("button", {
|
|
131
143
|
class: "button-tertiary button-icon-and-text button-copy-chat",
|
|
132
144
|
slot: "copy-chat-button",
|
|
133
145
|
onClick: l(this, u, "f"),
|
|
134
146
|
type: "button",
|
|
135
147
|
"aria-label": l(this, p, "f").copyConversationAriaLabel,
|
|
136
148
|
title: l(this, p, "f").copyConversationAriaLabel
|
|
137
|
-
},
|
|
149
|
+
}, a("ch-image", {
|
|
138
150
|
class: "icon-md",
|
|
139
|
-
src:
|
|
140
|
-
}), l(this, p, "f").copyConversationLabel), this.deleteConversationCallback &&
|
|
151
|
+
src: w
|
|
152
|
+
}), l(this, p, "f").copyConversationLabel), this.deleteConversationCallback && a("button", {
|
|
141
153
|
class: "button-tertiary button-icon-and-text button-delete-chat",
|
|
142
154
|
slot: "delete-chat-button",
|
|
143
155
|
onClick: l(this, f, "f"),
|
|
144
156
|
type: "button",
|
|
145
157
|
"aria-label": l(this, p, "f").deleteConversationAriaLabel,
|
|
146
158
|
title: l(this, p, "f").deleteConversationAriaLabel
|
|
147
|
-
},
|
|
159
|
+
}, a("ch-image", {
|
|
148
160
|
class: "icon-md",
|
|
149
|
-
src:
|
|
150
|
-
}), l(this, p, "f").clearConversationLabel))),
|
|
161
|
+
src: v
|
|
162
|
+
}), l(this, p, "f").clearConversationLabel))), a("section", {
|
|
151
163
|
class: "ch-chat-container"
|
|
152
|
-
},
|
|
164
|
+
}, a("slot", null), this.displayConversationCopiedMessage && a("div", {
|
|
153
165
|
class: "chat-container__conversation-copied"
|
|
154
|
-
},
|
|
166
|
+
}, a("div", {
|
|
155
167
|
class: "chat-container__conversation-copied-wrapper"
|
|
156
|
-
},
|
|
168
|
+
}, a("ch-image", {
|
|
157
169
|
class: "icon-md",
|
|
158
|
-
src:
|
|
159
|
-
}),
|
|
170
|
+
src: x
|
|
171
|
+
}), a("p", {
|
|
160
172
|
class: "body-regular-l"
|
|
161
173
|
}, "conversation copied"))))));
|
|
162
174
|
}
|
|
@@ -164,81 +176,81 @@ const x = class {
|
|
|
164
176
|
return [ "gx-ide-assets/chat-container" ];
|
|
165
177
|
}
|
|
166
178
|
get el() {
|
|
167
|
-
return
|
|
179
|
+
return s(this);
|
|
168
180
|
}
|
|
169
181
|
};
|
|
170
182
|
|
|
171
183
|
d = new WeakMap, p = new WeakMap, h = new WeakMap, m = new WeakMap, u = new WeakMap,
|
|
172
184
|
f = new WeakMap;
|
|
173
185
|
|
|
174
|
-
|
|
186
|
+
k.style = r;
|
|
175
187
|
|
|
176
|
-
const
|
|
188
|
+
const z = ":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)}}";
|
|
177
189
|
|
|
178
|
-
var
|
|
190
|
+
var T = undefined && undefined.__classPrivateFieldGet || function(t, e, a, i) {
|
|
179
191
|
if (a === "a" && !i) throw new TypeError("Private accessor was defined without a getter");
|
|
180
192
|
if (typeof e === "function" ? t !== e || !i : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
181
193
|
return a === "m" ? i : a === "a" ? i.call(t) : i ? i.value : e.get(t);
|
|
182
194
|
};
|
|
183
195
|
|
|
184
|
-
var
|
|
196
|
+
var W = undefined && undefined.__classPrivateFieldSet || function(t, e, a, i, s) {
|
|
185
197
|
if (i === "m") throw new TypeError("Private method is not writable");
|
|
186
198
|
if (i === "a" && !s) throw new TypeError("Private accessor was defined without a setter");
|
|
187
199
|
if (typeof e === "function" ? t !== e || !s : !e.has(t)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
188
200
|
return i === "a" ? s.call(t, a) : s ? s.value = a : e.set(t, a), a;
|
|
189
201
|
};
|
|
190
202
|
|
|
191
|
-
var
|
|
203
|
+
var j, C, E, M;
|
|
192
204
|
|
|
193
|
-
const
|
|
205
|
+
const P = t(`./gx-ide-assets/chat-welcome/images/header-illustration.svg`);
|
|
194
206
|
|
|
195
|
-
const
|
|
207
|
+
const I = t(`./gx-ide-assets/chat-welcome/images/ai-avatar-welcome.svg`);
|
|
196
208
|
|
|
197
|
-
const
|
|
209
|
+
const $ = 100;
|
|
198
210
|
|
|
199
|
-
const
|
|
211
|
+
const X = 500;
|
|
200
212
|
|
|
201
|
-
const
|
|
213
|
+
const D = 200;
|
|
202
214
|
|
|
203
|
-
const
|
|
215
|
+
const L = 500;
|
|
204
216
|
|
|
205
|
-
const
|
|
217
|
+
const A = 100;
|
|
206
218
|
|
|
207
|
-
const
|
|
219
|
+
const B = n({
|
|
208
220
|
category: "system",
|
|
209
221
|
name: "assistant",
|
|
210
222
|
colorType: "primary"
|
|
211
223
|
});
|
|
212
224
|
|
|
213
|
-
const
|
|
225
|
+
const S = n({
|
|
214
226
|
category: "system",
|
|
215
227
|
name: "arrow-right",
|
|
216
228
|
colorType: "primary"
|
|
217
229
|
});
|
|
218
230
|
|
|
219
|
-
const
|
|
231
|
+
const U = [ "resets/box-sizing", "components/icon", "utils/typography" ];
|
|
220
232
|
|
|
221
|
-
const
|
|
222
|
-
constructor(
|
|
223
|
-
|
|
233
|
+
const Y = class {
|
|
234
|
+
constructor(t) {
|
|
235
|
+
e(this, t);
|
|
224
236
|
// eslint-disable-next-line @stencil-community/own-props-must-be-private
|
|
225
|
-
|
|
226
|
-
|
|
237
|
+
j.set(this, void 0);
|
|
238
|
+
C.set(this, (() => {
|
|
227
239
|
setTimeout((() => {
|
|
228
240
|
this.showHeader = true;
|
|
229
241
|
setTimeout((() => {
|
|
230
242
|
this.showSuggestedPrompts = true;
|
|
231
|
-
}),
|
|
232
|
-
}),
|
|
243
|
+
}), L);
|
|
244
|
+
}), $ + X);
|
|
233
245
|
}));
|
|
234
|
-
|
|
246
|
+
E.set(this, (async t => {
|
|
235
247
|
const e = t.currentTarget.dataset["prommpt"];
|
|
236
|
-
await
|
|
248
|
+
await T(this, M, "f").call(this);
|
|
237
249
|
this.suggestedPrompRequestedCallback(e);
|
|
238
250
|
}));
|
|
239
|
-
|
|
251
|
+
M.set(this, (async () => {
|
|
240
252
|
this.hideWelcome = true;
|
|
241
|
-
await new Promise((t => setTimeout(t,
|
|
253
|
+
await new Promise((t => setTimeout(t, A)));
|
|
242
254
|
}));
|
|
243
255
|
this.showHeader = false;
|
|
244
256
|
this.showSuggestedPrompts = false;
|
|
@@ -249,76 +261,76 @@ const S = class {
|
|
|
249
261
|
this.suggestedPrompRequestedCallback = undefined;
|
|
250
262
|
}
|
|
251
263
|
async componentWillLoad() {
|
|
252
|
-
|
|
264
|
+
W(this, j, await o.getComponentStrings(this.el), "f");
|
|
253
265
|
// Set defaults
|
|
254
266
|
if (!this.welcomeTitle) {
|
|
255
|
-
this.welcomeTitle =
|
|
267
|
+
this.welcomeTitle = T(this, j, "f").welcomeTitle;
|
|
256
268
|
}
|
|
257
269
|
if (!this.welcomeGreeting) {
|
|
258
|
-
this.welcomeGreeting =
|
|
270
|
+
this.welcomeGreeting = T(this, j, "f").welcomeGreeting;
|
|
259
271
|
}
|
|
260
272
|
if (!this.suggestedPrompts) {
|
|
261
|
-
this.suggestedPrompts =
|
|
273
|
+
this.suggestedPrompts = T(this, j, "f").suggestedPrompts;
|
|
262
274
|
}
|
|
263
275
|
}
|
|
264
276
|
componentDidRender() {
|
|
265
277
|
if (!this.hideWelcome) {
|
|
266
|
-
|
|
278
|
+
T(this, C, "f").call(this);
|
|
267
279
|
}
|
|
268
280
|
}
|
|
269
281
|
/**
|
|
270
282
|
* It will exit the wellcome screen and remove it from the dom.
|
|
271
283
|
*/ async exitWelcome() {
|
|
272
|
-
|
|
284
|
+
T(this, M, "f").call(this);
|
|
273
285
|
}
|
|
274
286
|
render() {
|
|
275
|
-
return
|
|
276
|
-
model:
|
|
277
|
-
}),
|
|
287
|
+
return a(i, null, a("ch-theme", {
|
|
288
|
+
model: U
|
|
289
|
+
}), a("div", {
|
|
278
290
|
class: {
|
|
279
291
|
"welcome-container": true,
|
|
280
292
|
hidden: this.hideWelcome
|
|
281
293
|
},
|
|
282
294
|
style: {
|
|
283
|
-
backgroundImage: `url(${
|
|
284
|
-
"--transition-duration": `${
|
|
295
|
+
backgroundImage: `url(${P})`,
|
|
296
|
+
"--transition-duration": `${A}ms`
|
|
285
297
|
}
|
|
286
|
-
},
|
|
298
|
+
}, a("header", {
|
|
287
299
|
class: {
|
|
288
300
|
header: true,
|
|
289
301
|
"header--visible": this.showHeader
|
|
290
302
|
},
|
|
291
303
|
style: {
|
|
292
|
-
"--transition-delay": `${
|
|
293
|
-
"--transition-duration": `${
|
|
304
|
+
"--transition-delay": `${$}ms`,
|
|
305
|
+
"--transition-duration": `${X}ms`
|
|
294
306
|
}
|
|
295
|
-
},
|
|
307
|
+
}, a("span", {
|
|
296
308
|
class: "header__circle",
|
|
297
309
|
style: {
|
|
298
|
-
backgroundImage: `url(${
|
|
310
|
+
backgroundImage: `url(${I})`
|
|
299
311
|
}
|
|
300
|
-
}),
|
|
312
|
+
}), a("h2", {
|
|
301
313
|
class: "header__title"
|
|
302
|
-
}, this.welcomeTitle),
|
|
314
|
+
}, this.welcomeTitle), a("p", {
|
|
303
315
|
class: "header__greeting"
|
|
304
|
-
}, this.welcomeGreeting)), this.suggestedPrompts && this.showSuggestedPrompts &&
|
|
316
|
+
}, this.welcomeGreeting)), this.suggestedPrompts && this.showSuggestedPrompts && a("ul", {
|
|
305
317
|
class: "suggested-prompts"
|
|
306
|
-
}, this.suggestedPrompts.map(((t,
|
|
318
|
+
}, this.suggestedPrompts.map(((t, e) => a("li", {
|
|
307
319
|
class: "suggested-prompts__item"
|
|
308
|
-
},
|
|
320
|
+
}, a("button", {
|
|
309
321
|
class: {
|
|
310
322
|
"suggested-prompts__button": true
|
|
311
323
|
},
|
|
312
|
-
onClick:
|
|
324
|
+
onClick: T(this, E, "f"),
|
|
313
325
|
style: {
|
|
314
|
-
"--delay": `${
|
|
326
|
+
"--delay": `${D * e}ms`
|
|
315
327
|
},
|
|
316
328
|
"data-prommpt": t
|
|
317
|
-
},
|
|
318
|
-
src:
|
|
329
|
+
}, a("ch-image", {
|
|
330
|
+
src: B,
|
|
319
331
|
class: "icon-md suggested-prompts__icon"
|
|
320
|
-
}), t,
|
|
321
|
-
src:
|
|
332
|
+
}), t, a("ch-image", {
|
|
333
|
+
src: S,
|
|
322
334
|
class: "icon-md suggested-prompts__icon"
|
|
323
335
|
}))))))));
|
|
324
336
|
}
|
|
@@ -326,13 +338,13 @@ const S = class {
|
|
|
326
338
|
return [ "gx-ide-assets/chat-welcome" ];
|
|
327
339
|
}
|
|
328
340
|
get el() {
|
|
329
|
-
return
|
|
341
|
+
return s(this);
|
|
330
342
|
}
|
|
331
343
|
};
|
|
332
344
|
|
|
333
|
-
|
|
345
|
+
j = new WeakMap, C = new WeakMap, E = new WeakMap, M = new WeakMap;
|
|
334
346
|
|
|
335
|
-
|
|
347
|
+
Y.style = z;
|
|
336
348
|
|
|
337
|
-
export {
|
|
338
|
-
//# sourceMappingURL=p-
|
|
349
|
+
export { k as gx_ide_chat_container, Y as gx_ide_chat_welcome };
|
|
350
|
+
//# sourceMappingURL=p-9270c80f.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["chatContainerCss","CHAT_LIT_PATH","getAssetPath","CSS_BUNDLES","CSS_BUNDLE_CHAT_LIT","url","name","COPY_ICON","getIconPath","category","colorType","DELETE_ICON","CONVERSATION_ICON","MORE_HORIZONTAL_ICON","GxIdeChatContainer","_GxIdeChatContainer_menuItems","set","this","type","id","_GxIdeChatContainer_componentLocale","_GxIdeChatContainer_showMenuHandler","menuIsExpanded","_GxIdeChatContainer_menuExpandedChangeHandler","event","detail","_GxIdeChatContainer_copyConversationHandler","copyConversationCallback","_GxIdeChatContainer_deleteConversationHandler","deleteConversationCallback","componentWillLoad","__classPrivateFieldSet","Locale","getComponentStrings","el","showCopyConversationMessage","displayConversationCopiedMessage","setTimeout","render","renderHeader","chatTitle","renderButtonsGroup","h","Host","class","model","blockAlign","inlineAlign","__classPrivateFieldGet","expanded","onExpandedChange","onClick","showMenuAriaLabel","title","src","slot","copyConversationAriaLabel","copyConversationLabel","deleteConversationAriaLabel","clearConversationLabel","chatWelcomeCss","HEADER_ILLUSTRATION","AI_AVATAR","HEADER_TRANSITION_DELAY","HEADER_TRANSITION_DURATION","SUGGESTED_PROMPT_BUTTON_INTERVAL","SUGGESTED_PROMPT_BUTTONS_DELAY","WELCOME_EXIT_DURATION","AI_ICON","ARROW_RIGHT_ICON","GxIdeChatWelcome","_GxIdeChatWelcome_componentLocale","_GxIdeChatWelcome_animationEntrance","showHeader","showSuggestedPrompts","_GxIdeChatWelcome_sendPromptToChat","async","e","prompt","currentTarget","dataset","_GxIdeChatWelcome_animationExit","call","suggestedPrompRequestedCallback","hideWelcome","Promise","resolve","welcomeTitle","welcomeGreeting","suggestedPrompts","componentDidRender","exitWelcome","hidden","style","backgroundImage","header","map","i"],"sources":["src/components/chat/chat-container/chat-container.scss?tag=gx-ide-chat-container","src/components/chat/chat-container/chat-container.tsx","src/components/chat/chat-welcome/chat-welcome.scss?tag=gx-ide-chat-welcome&encapsulation=shadow","src/components/chat/chat-welcome/chat-welcome.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",":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"],"mappings":";;;;;;AAAA,MAAMA,IAAmB;;;;;;;;;;;;;;;;;;2BCkBzB;MAAMC,IAAgBC,EACpB;;AAGF,MAAMC,IAA8B,EAClC,qBACA,oBACA,uBACA,qBACA,uBACA,mBACA;;AAEF,MAAMC,IAAsC;;EAE1CC,KAAKJ;EACLK,MAAM;;;AAGR,MAAMC,IAAYC,EAAY;EAC5BC,UAAU;EACVH,MAAM;EACNI,WAAW;;;AAEb,MAAMC,IAAcH,EAAY;EAC9BC,UAAU;EACVH,MAAM;EACNI,WAAW;;;AAEb,MAAME,IAAoBJ,EAAY;EACpCC,UAAU;EACVH,MAAM;;;AAER,MAAMO,IAAuBL,EAAY;EACvCC,UAAU;EACVH,MAAM;EACNI,WAAW;;;MASAI,IAAkB;;;IAC7BC,EAAAC,IAAAC,MAA8B,EAC5B;MAAEC,MAAM;MAAQC,IAAI;OACpB;MAAED,MAAM;MAAQC,IAAI;;;;;;QAOtBC,EAAAJ,IAAAC,WAAA;IAiDAI,EAAAL,IAAAC,OAAmB;MACjBA,KAAKK,iBAAiB;AAAI;IAG5BC,EAAAP,IAAAC,O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