From 34f9b24bb6baf7aeadc2e6afb8e11e26eef92a0b Mon Sep 17 00:00:00 2001 From: agatha197 <28584164+agatha197@users.noreply.github.com> Date: Thu, 2 Jan 2025 10:30:09 +0000 Subject: [PATCH] [FR-22] feature: handle image and text attachments in chat modal (#2993) resolves part of https://lablup.atlassian.net/browse/FR-22?atlOrigin=eyJpIjoiNjBiMTg0ZWVmN2M3NGNiNmEzYjZhNjE5NmM0NDA4NDAiLCJwIjoiaiJ9 Enable attaching image/text files to ChatSender. Test: 1. Login with admin 2. Visit `/serving/9837a76e-d62e-4215-9f76-a10b4b9175fc`. (But, please note that this model only allows one image in one conversion.) 3. Test with Chat modal. 4. Attach image or text file. Features with images: - You can add a image file by clicking or drag and drop. ![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/2HueYSdFvL8pOB5mgrUQ/aadefd1c-794a-4b23-acb3-f88a249fe039.png) - Attach an image or text file. ![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/2HueYSdFvL8pOB5mgrUQ/379ef08e-c244-4adc-8cf3-32c0932a97b0.png) - Attach a file and close the attachments. You can see a Badge. ![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/2HueYSdFvL8pOB5mgrUQ/cc2f8c5e-b7f6-4e1a-9429-9d0317ee6734.png) - Conversation with LLM model. ![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/2HueYSdFvL8pOB5mgrUQ/db36028e-fda4-4a81-bf74-2f6616372d99.png) ![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/2HueYSdFvL8pOB5mgrUQ/605f09a2-7b60-4823-ae5f-544b2b484533.png) **Checklist:** (if applicable) - [x] Mention to the original issue - [ ] Documentation - [ ] Minium required manager version - [x] Specific setting for review (eg., KB link, endpoint or how to setup) - [x] Minimum requirements to check during review - [ ] Test case(s) to demonstrate the difference of before/after --- react/package.json | 6 +- react/pnpm-lock.yaml | 427 ++++++++++-------- .../lablupTalkativotUI/ChatMessage.tsx | 40 +- .../lablupTalkativotUI/LLMChatCard.tsx | 119 ++++- .../VirtualChatMessageList.tsx | 3 +- resources/i18n/de.json | 6 +- resources/i18n/el.json | 6 +- resources/i18n/en.json | 6 +- resources/i18n/es.json | 6 +- resources/i18n/fi.json | 6 +- resources/i18n/fr.json | 6 +- resources/i18n/id.json | 6 +- resources/i18n/it.json | 6 +- resources/i18n/ja.json | 6 +- resources/i18n/ko.json | 6 +- resources/i18n/mn.json | 6 +- resources/i18n/ms.json | 6 +- resources/i18n/pl.json | 6 +- resources/i18n/pt-BR.json | 6 +- resources/i18n/pt.json | 6 +- resources/i18n/ru.json | 6 +- resources/i18n/th.json | 6 +- resources/i18n/tr.json | 6 +- resources/i18n/vi.json | 6 +- resources/i18n/zh-CN.json | 6 +- resources/i18n/zh-TW.json | 6 +- 26 files changed, 486 insertions(+), 235 deletions(-) diff --git a/react/package.json b/react/package.json index 05b53a035a..2a9b4cf816 100644 --- a/react/package.json +++ b/react/package.json @@ -3,8 +3,8 @@ "version": "24.09.0-alpha.1", "private": true, "dependencies": { - "@ai-sdk/openai": "^1.0.10", - "@ai-sdk/react": "^0.0.70", + "@ai-sdk/openai": "^1.0.11", + "@ai-sdk/react": "^1.0.7", "@ant-design/cssinjs": "^1.22.0", "@ant-design/icons": "^5.5.1", "@ant-design/x": "^1.0.4", @@ -23,7 +23,7 @@ "@uiw/codemirror-extensions-langs": "^4.23.6", "@uiw/react-codemirror": "^4.23.6", "ahooks": "^3.8.1", - "ai": "^4.0.20", + "ai": "^4.0.22", "ansi_up": "^6.0.2", "antd": "^5.22.2", "antd-style": "^3.7.1", diff --git a/react/pnpm-lock.yaml b/react/pnpm-lock.yaml index 57d3a78e02..c6ef872b83 100644 --- a/react/pnpm-lock.yaml +++ b/react/pnpm-lock.yaml @@ -17,11 +17,11 @@ importers: .: dependencies: '@ai-sdk/openai': - specifier: ^1.0.10 - version: 1.0.10(zod@3.23.8) + specifier: ^1.0.11 + version: 1.0.11(zod@3.23.8) '@ai-sdk/react': - specifier: ^0.0.70 - version: 0.0.70(react@18.3.1)(zod@3.23.8) + specifier: ^1.0.7 + version: 1.0.7(react@18.3.1)(zod@3.23.8) '@ant-design/cssinjs': specifier: ^1.22.0 version: 1.22.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -77,8 +77,8 @@ importers: specifier: ^3.8.1 version: 3.8.1(react@18.3.1) ai: - specifier: ^4.0.20 - version: 4.0.20(react@18.3.1)(zod@3.23.8) + specifier: ^4.0.22 + version: 4.0.22(react@18.3.1)(zod@3.23.8) ansi_up: specifier: ^6.0.2 version: 6.0.2 @@ -293,14 +293,14 @@ packages: '@adobe/css-tools@4.4.0': resolution: {integrity: sha512-Ff9+ksdQQB3rMncgqDK78uLznstjyfIf2Arnh22pW8kBpLs6rpKDwgnZT46hin5Hl1WzazzK64DOrhSwYpS7bQ==} - '@ai-sdk/openai@1.0.10': - resolution: {integrity: sha512-ltZ1B/qSHvNiXngJBVY1GJD41/kvvi9QCQeuiEdf5utJnjRlR0MKNHzb3YRhJaLKFuGFrq1vAnxlSHGANY8R7A==} + '@ai-sdk/openai@1.0.11': + resolution: {integrity: sha512-qI9s7Slma5i5bB4yYVlFdcG3PNDwdqivPT1Dr8adDX92nSSpILjgFIooS5yys9sXjvvcfOi/WXbDvVhLSRRlvg==} engines: {node: '>=18'} peerDependencies: zod: ^3.0.0 - '@ai-sdk/provider-utils@1.0.22': - resolution: {integrity: sha512-YHK2rpj++wnLVc9vPGzGFP3Pjeld2MwhKinetA0zKXOoHAT/Jit5O8kZsxcSlJPu9wvcGT1UGZEjZrtO7PfFOQ==} + '@ai-sdk/provider-utils@2.0.5': + resolution: {integrity: sha512-2M7vLhYN0ThGjNlzow7oO/lsL+DyMxvGMIYmVQvEYaCWhDzxH5dOp78VNjJIVwHzVLMbBDigX3rJuzAs853idw==} engines: {node: '>=18'} peerDependencies: zod: ^3.0.0 @@ -308,37 +308,12 @@ packages: zod: optional: true - '@ai-sdk/provider-utils@2.0.4': - resolution: {integrity: sha512-GMhcQCZbwM6RoZCri0MWeEWXRt/T+uCxsmHEsTwNvEH3GDjNzchfX25C8ftry2MeEOOn6KfqCLSKomcgK6RoOg==} + '@ai-sdk/provider@1.0.3': + resolution: {integrity: sha512-WiuJEpHTrltOIzv3x2wx4gwksAHW0h6nK3SoDzjqCOJLu/2OJ1yASESTIX+f07ChFykHElVoP80Ol/fe9dw6tQ==} engines: {node: '>=18'} - peerDependencies: - zod: ^3.0.0 - peerDependenciesMeta: - zod: - optional: true - - '@ai-sdk/provider@0.0.26': - resolution: {integrity: sha512-dQkfBDs2lTYpKM8389oopPdQgIU007GQyCbuPPrV+K6MtSII3HBfE0stUIMXUb44L+LK1t6GXPP7wjSzjO6uKg==} - engines: {node: '>=18'} - - '@ai-sdk/provider@1.0.2': - resolution: {integrity: sha512-YYtP6xWQyaAf5LiWLJ+ycGTOeBLWrED7LUrvc+SQIWhGaneylqbaGsyQL7VouQUeQ4JZ1qKYZuhmi3W56HADPA==} - engines: {node: '>=18'} - - '@ai-sdk/react@0.0.70': - resolution: {integrity: sha512-GnwbtjW4/4z7MleLiW+TOZC2M29eCg1tOUpuEiYFMmFNZK8mkrqM0PFZMo6UsYeUYMWqEOOcPOU9OQVJMJh7IQ==} - engines: {node: '>=18'} - peerDependencies: - react: ^18 || ^19 || ^19.0.0-rc - zod: ^3.0.0 - peerDependenciesMeta: - react: - optional: true - zod: - optional: true - '@ai-sdk/react@1.0.6': - resolution: {integrity: sha512-8Hkserq0Ge6AEi7N4hlv2FkfglAGbkoAXEZ8YSp255c3PbnZz6+/5fppw+aROmZMOfNwallSRuy1i/iPa2rBpQ==} + '@ai-sdk/react@1.0.7': + resolution: {integrity: sha512-j2/of4iCNq+r2Bjx0O9vdRhn5C/02t2Esenis71YtnsoynPz74eQlJ3N0RYYPheThiJes50yHdfdVdH9ulxs1A==} engines: {node: '>=18'} peerDependencies: react: ^18 || ^19 || ^19.0.0-rc @@ -349,17 +324,8 @@ packages: zod: optional: true - '@ai-sdk/ui-utils@0.0.50': - resolution: {integrity: sha512-Z5QYJVW+5XpSaJ4jYCCAVG7zIAuKOOdikhgpksneNmKvx61ACFaf98pmOd+xnjahl0pIlc/QIe6O4yVaJ1sEaw==} - engines: {node: '>=18'} - peerDependencies: - zod: ^3.0.0 - peerDependenciesMeta: - zod: - optional: true - - '@ai-sdk/ui-utils@1.0.5': - resolution: {integrity: sha512-DGJSbDf+vJyWmFNexSPUsS1AAy7gtsmFmoSyNbNbJjwl9hRIf2dknfA1V0ahx6pg3NNklNYFm53L8Nphjovfvg==} + '@ai-sdk/ui-utils@1.0.6': + resolution: {integrity: sha512-ZP6Vjj+VCnSPBIAvWAdKj2olQONJ/f4aZpkVCGkzprdhv8TjHwB6CTlXFS3zypuEGy4asg84dc1dvXKooQXFvg==} engines: {node: '>=18'} peerDependencies: zod: ^3.0.0 @@ -1153,14 +1119,17 @@ packages: react: ^18.2.0 react-dom: ^18.2.0 - '@cloudscape-design/collection-hooks@1.0.50': - resolution: {integrity: sha512-Lt3+g4wJUB8ZYILLIIFjI8awrZXj7DKe/nv51JMYGHZXlKkkumwS2kNGaryexhSeu2+VDxkg1EzPgtRlzY4dJg==} + '@cloudscape-design/collection-hooks@1.0.56': + resolution: {integrity: sha512-1nDayJZTXMwb/MDcPzmfr12t423V+leKQI+apA0rb5j19SJhqz9AMUYF9QWBGmHsTV2FlKZI6yghbZBkVWDL6Q==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 '@cloudscape-design/component-toolkit@1.0.0-beta.64': resolution: {integrity: sha512-Bl8XG/Etu36dw+7eFK0Pv0gPp8V8mu7QyzvvJYpKv33Q/r8KWEzDsnY1GJGN5IXrFOQobpi8kaY89nju0EIwag==} + '@cloudscape-design/component-toolkit@1.0.0-beta.81': + resolution: {integrity: sha512-//WS5C+DSi6vbD17gdyUO9hikFWjID8FXSmzqtAxV6FsO2HRiSJkAMLt6jRCMZKo9JpOnDaEhtx5pkuiY/Ez+g==} + '@cloudscape-design/components@3.0.677': resolution: {integrity: sha512-kZCEdT2UhQODz1nGyxaP6+rVEwi9V1U2Tb5GYXQTT++S45UBWH/hnxCEvlHDASgZz1o1aNOaCmAAw4sbFp2tQA==} peerDependencies: @@ -1173,8 +1142,11 @@ packages: '@cloudscape-design/test-utils-core@1.0.40': resolution: {integrity: sha512-MMNDPD4ygcYA4ZKvohLJ7M48vqjuqjmUYAwehudeSBNs4t/KCVTBePMRGiS2K95eWPzh0Gu6K49Nrf5RsZi6Qw==} - '@cloudscape-design/theming-runtime@1.0.55': - resolution: {integrity: sha512-JSOOKOt57T/FQnPBh6kxq2+6811IDmv1X5hWLWCIhcKJfvjrGNO7tB0ewrjx+oLoBBJLdbHmxMIRh87NL65kCg==} + '@cloudscape-design/test-utils-core@1.0.47': + resolution: {integrity: sha512-x8D+t/H8LXhEtWHrzLvBoCWPiwBb7uJQGSYeqC+J6WKB0MmDpcEJXPkxJ2n0h1HBAC0n9wgkO64MDzRVtAf1fw==} + + '@cloudscape-design/theming-runtime@1.0.66': + resolution: {integrity: sha512-EJWRxL8ELd/5TPp4wmIMcQIWLrSBtBqmp4whtmq9P4fdMXcq46lJ/hHFSTxQPh21CAFlsJ+Hv5HMTktIxqvsXQ==} '@codemirror/autocomplete@6.18.0': resolution: {integrity: sha512-5DbOvBbY4qW5l57cjDsmmpDh3/TeK1vXfTHa+BUMrRzdWdcxKZ4U4V7vQaTtOpApNU4kLS4FQ6cINtLg245LXA==} @@ -1187,6 +1159,9 @@ packages: '@codemirror/commands@6.6.0': resolution: {integrity: sha512-qnY+b7j1UNcTS31Eenuc/5YJB6gQOzkUoNmJQc0rznwqSRpeaWWpjkWy2C/MPTcePpsKJEM26hXrOXl1+nceXg==} + '@codemirror/commands@6.7.1': + resolution: {integrity: sha512-llTrboQYw5H4THfhN4U3qCnSZ1SOJ60ohhz+SzU0ADGtwlc533DtklQP0vSFaQuCPDn3BPpOd1GbbnUtwNjsrw==} + '@codemirror/lang-angular@0.1.3': resolution: {integrity: sha512-xgeWGJQQl1LyStvndWtruUvb4SnBZDAu/gvFH/ZU+c0W25tQR8e5hq7WTwiIY2dNxnf+49mRiGI/9yxIwB6f5w==} @@ -1196,6 +1171,9 @@ packages: '@codemirror/lang-css@6.2.1': resolution: {integrity: sha512-/UNWDNV5Viwi/1lpr/dIXJNWiwDxpw13I4pTUAsNxZdg6E0mI2kTQb0P2iHczg1Tu+H4EBgJR+hYhKiHKko7qg==} + '@codemirror/lang-css@6.3.1': + resolution: {integrity: sha512-kr5fwBGiGtmz6l0LSJIbno9QrifNMUusivHbnA1H6Dmqy4HZFte3UAICix1VuKo0lMPKQr2rqB+0BkKi/S3Ejg==} + '@codemirror/lang-go@6.0.1': resolution: {integrity: sha512-7fNvbyNylvqCphW9HD6WFnRpcDjr+KXX/FgqXy5H5ZS0eC5edDljukm/yNgYkwTsgp2busdod50AOTIy6Jikfg==} @@ -1220,9 +1198,15 @@ packages: '@codemirror/lang-liquid@6.2.1': resolution: {integrity: sha512-J1Mratcm6JLNEiX+U2OlCDTysGuwbHD76XwuL5o5bo9soJtSbz2g6RU3vGHFyS5DC8rgVmFSzi7i6oBftm7tnA==} + '@codemirror/lang-liquid@6.2.2': + resolution: {integrity: sha512-7Dm841fk37+JQW6j2rI1/uGkJyESrjzyhiIkaLjbbR0U6aFFQvMrJn35WxQreRMADMhzkyVkZM4467OR7GR8nQ==} + '@codemirror/lang-markdown@6.2.5': resolution: {integrity: sha512-Hgke565YcO4fd9pe2uLYxnMufHO5rQwRr+AAhFq8ABuhkrjyX8R5p5s+hZUTdV60O0dMRjxKhBLxz8pu/MkUVA==} + '@codemirror/lang-markdown@6.3.1': + resolution: {integrity: sha512-y3sSPuQjBKZQbQwe3ZJKrSW6Silyl9PnrU/Mf0m2OQgIlPoSYTtOvEL7xs94SVMkb8f4x+SQFnzXPdX4Wk2lsg==} + '@codemirror/lang-php@6.0.1': resolution: {integrity: sha512-ublojMdw/PNWa7qdN5TMsjmqkNuTBD3k6ndZ4Z0S25SBAiweFGyY68AS3xNcIOlb6DDFDvKlinLQ40vSLqf8xA==} @@ -1238,6 +1222,9 @@ packages: '@codemirror/lang-sql@6.7.0': resolution: {integrity: sha512-KMXp6rtyPYz6RaElvkh/77ClEAoQoHRPZo0zutRRialeFs/B/X8YaUJBCnAV2zqyeJPLZ4hgo48mG8TKoNXfZA==} + '@codemirror/lang-sql@6.8.0': + resolution: {integrity: sha512-aGLmY4OwGqN3TdSx3h6QeA1NrvaYtF7kkoWR/+W7/JzB0gQtJ+VJxewlnE3+VImhA4WVlhmkJr109PefOOhjLg==} + '@codemirror/lang-vue@0.1.3': resolution: {integrity: sha512-QSKdtYTDRhEHCfo5zOShzxCmqKJvgGrZwDQSdbvCRJ5pRLWBS7pD/8e/tH44aVQT6FKm0t6RVNoSUWHOI5vNug==} @@ -1247,8 +1234,8 @@ packages: '@codemirror/lang-xml@6.1.0': resolution: {integrity: sha512-3z0blhicHLfwi2UgkZYRPioSgVTo9PV5GP5ducFH6FaHy0IAJRg+ixj5gTR1gnT/glAIC8xv4w2VL1LoZfs+Jg==} - '@codemirror/lang-yaml@6.1.1': - resolution: {integrity: sha512-HV2NzbK9bbVnjWxwObuZh5FuPCowx51mEfoFT9y3y+M37fA3+pbxx4I7uePuygFzDsAmCTwQSc/kXh/flab4uw==} + '@codemirror/lang-yaml@6.1.2': + resolution: {integrity: sha512-dxrfG8w5Ce/QbT7YID7mWZFKhdhsaTNOYjOkSIMt1qmC4VQnXSDSYVHHHn8k6kJUfIhtLo8t1JJgltlxWdsITw==} '@codemirror/language-data@6.5.1': resolution: {integrity: sha512-0sWxeUSNlBr6OmkqybUTImADFUP0M3P0IiSde4nc24bz/6jIYzqYSgkOSLS+CBIoW1vU8Q9KUWXscBXeoMVC9w==} @@ -1256,6 +1243,9 @@ packages: '@codemirror/language@6.10.3': resolution: {integrity: sha512-kDqEU5sCP55Oabl6E7m5N+vZRoc0iWqgDVhEKifcHzPzjqCegcO4amfrYVL9PmPZpl4G0yjkpTpUO/Ui8CzO8A==} + '@codemirror/language@6.10.8': + resolution: {integrity: sha512-wcP8XPPhDH2vTqf181U8MbZnW+tDyPYy0UzVOa+oHORjyT+mhhom9vBd7dApJwoDz9Nb/a8kHjJIsuA/t8vNFw==} + '@codemirror/legacy-modes@6.4.0': resolution: {integrity: sha512-5m/K+1A6gYR0e+h/dEde7LoGimMjRtWXZFg4Lo70cc8HzjSdHe3fLwjWMR0VRl5KFT1SxalSap7uMgPKF28wBA==} @@ -1382,13 +1372,13 @@ packages: resolution: {integrity: sha512-SITSV6aIXsuVNV3f3O0f2n/cgyEDWoSqtZMYiAmcsYHydcKrOz3gUxB/iXd/Qf08+IZX4KpgNbvUdMBmWz+kcA==} engines: {node: '>=10'} - '@dnd-kit/accessibility@3.1.0': - resolution: {integrity: sha512-ea7IkhKvlJUv9iSHJOnxinBcoOI3ppGnnL+VDJ75O45Nss6HtZd8IdN8touXPDtASfeI2T2LImb8VOZcL47wjQ==} + '@dnd-kit/accessibility@3.1.1': + resolution: {integrity: sha512-2P+YgaXF+gRsIihwwY1gCsQSYnu9Zyj2py8kY5fFvUM1qm2WA2u639R6YNVfU4GWr+ZM5mqEsfHZZLoRONbemw==} peerDependencies: react: '>=16.8.0' - '@dnd-kit/core@6.1.0': - resolution: {integrity: sha512-J3cQBClB4TVxwGo3KEjssGEXNJqGVWx17aRTZ1ob0FliR5IjYgTxl5YJbKTzA6IzrtelotH19v6y7uoIRUZPSg==} + '@dnd-kit/core@6.3.1': + resolution: {integrity: sha512-xkGBRQQab4RLwgXxoqETICr6S5JlogafbhNsidmrkVv2YRs5MLwpjoF2qpiGjQt8S9AoxtIV603s0GIUpY5eYQ==} peerDependencies: react: '>=16.8.0' react-dom: '>=16.8.0' @@ -1610,20 +1600,20 @@ packages: resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@formatjs/ecma402-abstract@2.0.0': - resolution: {integrity: sha512-rRqXOqdFmk7RYvj4khklyqzcfQl9vEL/usogncBHRZfZBDOwMGuSRNFl02fu5KGHXdbinju+YXyuR+Nk8xlr/g==} + '@formatjs/ecma402-abstract@2.3.1': + resolution: {integrity: sha512-Ip9uV+/MpLXWRk03U/GzeJMuPeOXpJBSB5V1tjA6kJhvqssye5J5LoYLc7Z5IAHb7nR62sRoguzrFiVCP/hnzw==} - '@formatjs/fast-memoize@2.2.0': - resolution: {integrity: sha512-hnk/nY8FyrL5YxwP9e4r9dqeM6cAbo8PeU9UjyXojZMNvVad2Z06FAVHyR3Ecw6fza+0GH7vdJgiKIVXTMbSBA==} + '@formatjs/fast-memoize@2.2.5': + resolution: {integrity: sha512-6PoewUMrrcqxSoBXAOJDiW1m+AmkrAj0RiXnOMD59GRaswjXhm3MDhgepXPBgonc09oSirAJTsAggzAGQf6A6g==} - '@formatjs/icu-messageformat-parser@2.7.8': - resolution: {integrity: sha512-nBZJYmhpcSX0WeJ5SDYUkZ42AgR3xiyhNCsQweFx3cz/ULJjym8bHAzWKvG5e2+1XO98dBYC0fWeeAECAVSwLA==} + '@formatjs/icu-messageformat-parser@2.9.7': + resolution: {integrity: sha512-cuEHyRM5VqLQobANOjtjlgU7+qmk9Q3fDQuBiRRJ3+Wp3ZoZhpUPtUfuimZXsir6SaI2TaAJ+SLo9vLnV5QcbA==} - '@formatjs/icu-skeleton-parser@1.8.2': - resolution: {integrity: sha512-k4ERKgw7aKGWJZgTarIcNEmvyTVD9FYh0mTrrBMHZ1b8hUu6iOJ4SzsZlo3UNAvHYa+PnvntIwRPt1/vy4nA9Q==} + '@formatjs/icu-skeleton-parser@1.8.11': + resolution: {integrity: sha512-8LlHHE/yL/zVJZHAX3pbKaCjZKmBIO6aJY1mkVh4RMSEu/2WRZ4Ysvv3kKXJ9M8RJLBHdnk1/dUQFdod1Dt7Dw==} - '@formatjs/intl-localematcher@0.5.4': - resolution: {integrity: sha512-zTwEpWOzZ2CiKcB93BLngUX59hQkuZjT2+SAQEscSm52peDW/getsawMcWF1rGRpMCX6D7nSJA3CzJ8gn13N/g==} + '@formatjs/intl-localematcher@0.5.9': + resolution: {integrity: sha512-8zkGu/sv5euxbjfZ/xmklqLyDGQSxsLqg8XOq88JW3cmJtzhCP8EtSJXlaKZnVO4beEaoiT9wj4eIoCQ9smwxA==} '@humanwhocodes/config-array@0.13.0': resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} @@ -1771,6 +1761,9 @@ packages: '@lezer/css@1.1.8': resolution: {integrity: sha512-7JhxupKuMBaWQKjQoLtzhGj83DdnZY9MckEOG5+/iLKNK2ZJqKc6hf6uc0HjwCX7Qlok44jBNqZhHKDhEhZYLA==} + '@lezer/css@1.1.9': + resolution: {integrity: sha512-TYwgljcDv+YrV0MZFFvYFQHCfGgbPMR6nuqLabBdmZoFH3EP1gvw8t0vae326Ne3PszQkbXfVBjCnf3ZVCr0bA==} + '@lezer/go@1.0.0': resolution: {integrity: sha512-co9JfT3QqX1YkrMmourYw2Z8meGC50Ko4d54QEcQbEYpvdUvN4yb0NBZdn/9ertgvjsySxHsKzH3lbm3vqJ4Jw==} @@ -1798,6 +1791,9 @@ packages: '@lezer/markdown@1.3.0': resolution: {integrity: sha512-ErbEQ15eowmJUyT095e9NJc3BI9yZ894fjSDtHftD0InkfUBGgnKSU6dvan9jqsZuNHg2+ag/1oyDRxNsENupQ==} + '@lezer/markdown@1.3.2': + resolution: {integrity: sha512-Wu7B6VnrKTbBEohqa63h5vxXjiC4pO5ZQJ/TDbhJxPQaaIoRD/6UVDhSDtVsCwVZV12vvN9KxuLL3ATMnlG0oQ==} + '@lezer/php@1.0.2': resolution: {integrity: sha512-GN7BnqtGRpFyeoKSEqxvGvhJQiI4zkgmYnDk/JIyc7H7Ifc1tkPnUn/R2R8meH3h/aBf5rzjvU8ZQoyiNDtDrA==} @@ -2790,8 +2786,8 @@ packages: resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} engines: {node: '>= 0.6'} - ace-builds@1.35.4: - resolution: {integrity: sha512-r0KQclhZ/uk5a4zOqRYQkJuQuu4vFMiA6VTj54Tk4nI1TUR3iEMMppZkWbNoWEgWwv4ciDloObb9Rf4V55Qgjw==} + ace-builds@1.37.1: + resolution: {integrity: sha512-6/jxFucA1z1C3hgLlVkTE5/znZ+iYvD301vfwtybiMc3k76IDykliCD0xh/eYZMJUfsJtaOQHZ2AJO5ey0PHWw==} acorn-globals@6.0.0: resolution: {integrity: sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==} @@ -2842,8 +2838,8 @@ packages: peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 - ai@4.0.20: - resolution: {integrity: sha512-dYevYKtREcjSVopBDFWVNca7WJEI1p9Vr9eo7V7fZHzi2vXGDyEa2WYatjFbpR6z6gpVAxKHsof8EoN+B1IAsA==} + ai@4.0.22: + resolution: {integrity: sha512-yvcjWtofI2HZwgT3jMkoNnDUhAY+S9cOvZ6xbbOzrS0ZeFl1/gcbasFnwAqUJ7uL/t72/3a0Vy/pKg6N19A2Mw==} engines: {node: '>=18'} peerDependencies: react: ^18 || ^19 || ^19.0.0-rc @@ -4181,10 +4177,6 @@ packages: resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} engines: {node: '>=0.8.x'} - eventsource-parser@1.1.2: - resolution: {integrity: sha512-v0eOBUbiaFojBu2s2NPBfYUoRR9GjcDNvCXVaqEf5vVfpIAh9f8RCo4vXTP8c63QRKCFwoLpMpTdPwwhEKVgzA==} - engines: {node: '>=14.18'} - eventsource-parser@3.0.0: resolution: {integrity: sha512-T1C0XCUimhxVQzW4zFipdx0SficT651NnkR0ZSH3yQwh+mFMdLfgjABVi4YtMTtaL4s168593DaoaRLMqryavA==} engines: {node: '>=18.0.0'} @@ -4711,8 +4703,8 @@ packages: intersection-observer@0.12.2: resolution: {integrity: sha512-7m1vEcPCxXYI8HqnL8CKI6siDyD+eIWSwgB3DZA+ZTogxk9I4CDnj4wilt9x/+/QbHI4YG5YZNmC6458/e9Ktg==} - intl-messageformat@10.5.14: - resolution: {integrity: sha512-IjC6sI0X7YRjjyVH9aUgdftcmZK7WXdHeil4KwbjDnRWjnVitKpAx3rr6t6di1joFp5188VqKcobOPA6mCLG/w==} + intl-messageformat@10.7.10: + resolution: {integrity: sha512-hp7iejCBiJdW3zmOe18FdlJu8U/JsADSDiBPQhfdSeI8B9POtvPRvPh3nMlvhYayGMKLv6maldhR7y3Pf1vkpw==} invariant@2.2.4: resolution: {integrity: sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==} @@ -7644,6 +7636,9 @@ packages: tslib@2.6.3: resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==} + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + tsutils@3.21.0: resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} @@ -8194,72 +8189,39 @@ snapshots: '@adobe/css-tools@4.4.0': {} - '@ai-sdk/openai@1.0.10(zod@3.23.8)': + '@ai-sdk/openai@1.0.11(zod@3.23.8)': dependencies: - '@ai-sdk/provider': 1.0.2 - '@ai-sdk/provider-utils': 2.0.4(zod@3.23.8) + '@ai-sdk/provider': 1.0.3 + '@ai-sdk/provider-utils': 2.0.5(zod@3.23.8) zod: 3.23.8 - '@ai-sdk/provider-utils@1.0.22(zod@3.23.8)': + '@ai-sdk/provider-utils@2.0.5(zod@3.23.8)': dependencies: - '@ai-sdk/provider': 0.0.26 - eventsource-parser: 1.1.2 - nanoid: 3.3.7 - secure-json-parse: 2.7.0 - optionalDependencies: - zod: 3.23.8 - - '@ai-sdk/provider-utils@2.0.4(zod@3.23.8)': - dependencies: - '@ai-sdk/provider': 1.0.2 + '@ai-sdk/provider': 1.0.3 eventsource-parser: 3.0.0 nanoid: 3.3.8 secure-json-parse: 2.7.0 optionalDependencies: zod: 3.23.8 - '@ai-sdk/provider@0.0.26': + '@ai-sdk/provider@1.0.3': dependencies: json-schema: 0.4.0 - '@ai-sdk/provider@1.0.2': + '@ai-sdk/react@1.0.7(react@18.3.1)(zod@3.23.8)': dependencies: - json-schema: 0.4.0 - - '@ai-sdk/react@0.0.70(react@18.3.1)(zod@3.23.8)': - dependencies: - '@ai-sdk/provider-utils': 1.0.22(zod@3.23.8) - '@ai-sdk/ui-utils': 0.0.50(zod@3.23.8) + '@ai-sdk/provider-utils': 2.0.5(zod@3.23.8) + '@ai-sdk/ui-utils': 1.0.6(zod@3.23.8) swr: 2.2.5(react@18.3.1) throttleit: 2.1.0 optionalDependencies: react: 18.3.1 zod: 3.23.8 - '@ai-sdk/react@1.0.6(react@18.3.1)(zod@3.23.8)': - dependencies: - '@ai-sdk/provider-utils': 2.0.4(zod@3.23.8) - '@ai-sdk/ui-utils': 1.0.5(zod@3.23.8) - swr: 2.2.5(react@18.3.1) - throttleit: 2.1.0 - optionalDependencies: - react: 18.3.1 - zod: 3.23.8 - - '@ai-sdk/ui-utils@0.0.50(zod@3.23.8)': - dependencies: - '@ai-sdk/provider': 0.0.26 - '@ai-sdk/provider-utils': 1.0.22(zod@3.23.8) - json-schema: 0.4.0 - secure-json-parse: 2.7.0 - zod-to-json-schema: 3.23.5(zod@3.23.8) - optionalDependencies: - zod: 3.23.8 - - '@ai-sdk/ui-utils@1.0.5(zod@3.23.8)': + '@ai-sdk/ui-utils@1.0.6(zod@3.23.8)': dependencies: - '@ai-sdk/provider': 1.0.2 - '@ai-sdk/provider-utils': 2.0.4(zod@3.23.8) + '@ai-sdk/provider': 1.0.3 + '@ai-sdk/provider-utils': 2.0.5(zod@3.23.8) zod-to-json-schema: 3.23.5(zod@3.23.8) optionalDependencies: zod: 3.23.8 @@ -9295,7 +9257,7 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - '@cloudscape-design/collection-hooks@1.0.50(react@18.3.1)': + '@cloudscape-design/collection-hooks@1.0.56(react@18.3.1)': dependencies: react: 18.3.1 @@ -9304,28 +9266,33 @@ snapshots: '@juggle/resize-observer': 3.4.0 tslib: 2.6.3 + '@cloudscape-design/component-toolkit@1.0.0-beta.81': + dependencies: + '@juggle/resize-observer': 3.4.0 + tslib: 2.8.1 + '@cloudscape-design/components@3.0.677(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@cloudscape-design/collection-hooks': 1.0.50(react@18.3.1) - '@cloudscape-design/component-toolkit': 1.0.0-beta.64 - '@cloudscape-design/test-utils-core': 1.0.40 - '@cloudscape-design/theming-runtime': 1.0.55 - '@dnd-kit/core': 6.1.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@dnd-kit/sortable': 7.0.2(@dnd-kit/core@6.1.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1) + '@cloudscape-design/collection-hooks': 1.0.56(react@18.3.1) + '@cloudscape-design/component-toolkit': 1.0.0-beta.81 + '@cloudscape-design/test-utils-core': 1.0.47 + '@cloudscape-design/theming-runtime': 1.0.66 + '@dnd-kit/core': 6.3.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@dnd-kit/sortable': 7.0.2(@dnd-kit/core@6.3.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1) '@dnd-kit/utilities': 3.2.2(react@18.3.1) '@juggle/resize-observer': 3.4.0 - ace-builds: 1.35.4 + ace-builds: 1.37.1 balanced-match: 1.0.2 clsx: 1.2.1 d3-shape: 1.3.7 date-fns: 2.30.0 - intl-messageformat: 10.5.14 + intl-messageformat: 10.7.10 mnth: 2.0.0 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) react-keyed-flatten-children: 1.3.0(react@18.3.1) react-transition-group: 4.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - tslib: 2.6.3 + tslib: 2.8.1 weekstart: 1.1.0 '@cloudscape-design/design-tokens@3.0.40': {} @@ -9335,9 +9302,14 @@ snapshots: css-selector-tokenizer: 0.8.0 css.escape: 1.5.1 - '@cloudscape-design/theming-runtime@1.0.55': + '@cloudscape-design/test-utils-core@1.0.47': dependencies: - tslib: 2.6.3 + css-selector-tokenizer: 0.8.0 + css.escape: 1.5.1 + + '@cloudscape-design/theming-runtime@1.0.66': + dependencies: + tslib: 2.8.1 '@codemirror/autocomplete@6.18.0(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.30.0)(@lezer/common@1.2.1)': dependencies: @@ -9346,6 +9318,13 @@ snapshots: '@codemirror/view': 6.30.0 '@lezer/common': 1.2.1 + '@codemirror/autocomplete@6.18.0(@codemirror/language@6.10.8)(@codemirror/state@6.4.1)(@codemirror/view@6.30.0)(@lezer/common@1.2.1)': + dependencies: + '@codemirror/language': 6.10.8 + '@codemirror/state': 6.4.1 + '@codemirror/view': 6.30.0 + '@lezer/common': 1.2.1 + '@codemirror/commands@6.6.0': dependencies: '@codemirror/language': 6.10.3 @@ -9353,6 +9332,13 @@ snapshots: '@codemirror/view': 6.30.0 '@lezer/common': 1.2.1 + '@codemirror/commands@6.7.1': + dependencies: + '@codemirror/language': 6.10.8 + '@codemirror/state': 6.4.1 + '@codemirror/view': 6.30.0 + '@lezer/common': 1.2.1 + '@codemirror/lang-angular@0.1.3': dependencies: '@codemirror/lang-html': 6.4.9 @@ -9377,10 +9363,20 @@ snapshots: transitivePeerDependencies: - '@codemirror/view' + '@codemirror/lang-css@6.3.1(@codemirror/view@6.30.0)': + dependencies: + '@codemirror/autocomplete': 6.18.0(@codemirror/language@6.10.8)(@codemirror/state@6.4.1)(@codemirror/view@6.30.0)(@lezer/common@1.2.1) + '@codemirror/language': 6.10.8 + '@codemirror/state': 6.4.1 + '@lezer/common': 1.2.1 + '@lezer/css': 1.1.9 + transitivePeerDependencies: + - '@codemirror/view' + '@codemirror/lang-go@6.0.1(@codemirror/view@6.30.0)': dependencies: - '@codemirror/autocomplete': 6.18.0(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.30.0)(@lezer/common@1.2.1) - '@codemirror/language': 6.10.3 + '@codemirror/autocomplete': 6.18.0(@codemirror/language@6.10.8)(@codemirror/state@6.4.1)(@codemirror/view@6.30.0)(@lezer/common@1.2.1) + '@codemirror/language': 6.10.8 '@codemirror/state': 6.4.1 '@lezer/common': 1.2.1 '@lezer/go': 1.0.0 @@ -9447,6 +9443,17 @@ snapshots: '@lezer/highlight': 1.2.0 '@lezer/lr': 1.4.2 + '@codemirror/lang-liquid@6.2.2': + dependencies: + '@codemirror/autocomplete': 6.18.0(@codemirror/language@6.10.8)(@codemirror/state@6.4.1)(@codemirror/view@6.30.0)(@lezer/common@1.2.1) + '@codemirror/lang-html': 6.4.9 + '@codemirror/language': 6.10.8 + '@codemirror/state': 6.4.1 + '@codemirror/view': 6.30.0 + '@lezer/common': 1.2.1 + '@lezer/highlight': 1.2.0 + '@lezer/lr': 1.4.2 + '@codemirror/lang-markdown@6.2.5': dependencies: '@codemirror/autocomplete': 6.18.0(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.30.0)(@lezer/common@1.2.1) @@ -9457,6 +9464,16 @@ snapshots: '@lezer/common': 1.2.1 '@lezer/markdown': 1.3.0 + '@codemirror/lang-markdown@6.3.1': + dependencies: + '@codemirror/autocomplete': 6.18.0(@codemirror/language@6.10.8)(@codemirror/state@6.4.1)(@codemirror/view@6.30.0)(@lezer/common@1.2.1) + '@codemirror/lang-html': 6.4.9 + '@codemirror/language': 6.10.8 + '@codemirror/state': 6.4.1 + '@codemirror/view': 6.30.0 + '@lezer/common': 1.2.1 + '@lezer/markdown': 1.3.2 + '@codemirror/lang-php@6.0.1': dependencies: '@codemirror/lang-html': 6.4.9 @@ -9501,6 +9518,17 @@ snapshots: transitivePeerDependencies: - '@codemirror/view' + '@codemirror/lang-sql@6.8.0(@codemirror/view@6.30.0)': + dependencies: + '@codemirror/autocomplete': 6.18.0(@codemirror/language@6.10.8)(@codemirror/state@6.4.1)(@codemirror/view@6.30.0)(@lezer/common@1.2.1) + '@codemirror/language': 6.10.8 + '@codemirror/state': 6.4.1 + '@lezer/common': 1.2.1 + '@lezer/highlight': 1.2.0 + '@lezer/lr': 1.4.2 + transitivePeerDependencies: + - '@codemirror/view' + '@codemirror/lang-vue@0.1.3': dependencies: '@codemirror/lang-html': 6.4.9 @@ -9526,13 +9554,14 @@ snapshots: '@lezer/common': 1.2.1 '@lezer/xml': 1.0.5 - '@codemirror/lang-yaml@6.1.1(@codemirror/view@6.30.0)': + '@codemirror/lang-yaml@6.1.2(@codemirror/view@6.30.0)': dependencies: - '@codemirror/autocomplete': 6.18.0(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.30.0)(@lezer/common@1.2.1) - '@codemirror/language': 6.10.3 + '@codemirror/autocomplete': 6.18.0(@codemirror/language@6.10.8)(@codemirror/state@6.4.1)(@codemirror/view@6.30.0)(@lezer/common@1.2.1) + '@codemirror/language': 6.10.8 '@codemirror/state': 6.4.1 '@lezer/common': 1.2.1 '@lezer/highlight': 1.2.0 + '@lezer/lr': 1.4.2 '@lezer/yaml': 1.0.3 transitivePeerDependencies: - '@codemirror/view' @@ -9541,25 +9570,25 @@ snapshots: dependencies: '@codemirror/lang-angular': 0.1.3 '@codemirror/lang-cpp': 6.0.2 - '@codemirror/lang-css': 6.2.1(@codemirror/view@6.30.0) + '@codemirror/lang-css': 6.3.1(@codemirror/view@6.30.0) '@codemirror/lang-go': 6.0.1(@codemirror/view@6.30.0) '@codemirror/lang-html': 6.4.9 '@codemirror/lang-java': 6.0.1 '@codemirror/lang-javascript': 6.2.2 '@codemirror/lang-json': 6.0.1 '@codemirror/lang-less': 6.0.2(@codemirror/view@6.30.0) - '@codemirror/lang-liquid': 6.2.1 - '@codemirror/lang-markdown': 6.2.5 + '@codemirror/lang-liquid': 6.2.2 + '@codemirror/lang-markdown': 6.3.1 '@codemirror/lang-php': 6.0.1 '@codemirror/lang-python': 6.1.6(@codemirror/view@6.30.0) '@codemirror/lang-rust': 6.0.1 '@codemirror/lang-sass': 6.0.2(@codemirror/view@6.30.0) - '@codemirror/lang-sql': 6.7.0(@codemirror/view@6.30.0) + '@codemirror/lang-sql': 6.8.0(@codemirror/view@6.30.0) '@codemirror/lang-vue': 0.1.3 '@codemirror/lang-wast': 6.0.2 '@codemirror/lang-xml': 6.1.0 - '@codemirror/lang-yaml': 6.1.1(@codemirror/view@6.30.0) - '@codemirror/language': 6.10.3 + '@codemirror/lang-yaml': 6.1.2(@codemirror/view@6.30.0) + '@codemirror/language': 6.10.8 '@codemirror/legacy-modes': 6.4.0 transitivePeerDependencies: - '@codemirror/view' @@ -9573,9 +9602,18 @@ snapshots: '@lezer/lr': 1.4.2 style-mod: 4.1.2 + '@codemirror/language@6.10.8': + dependencies: + '@codemirror/state': 6.4.1 + '@codemirror/view': 6.30.0 + '@lezer/common': 1.2.1 + '@lezer/highlight': 1.2.0 + '@lezer/lr': 1.4.2 + style-mod: 4.1.2 + '@codemirror/legacy-modes@6.4.0': dependencies: - '@codemirror/language': 6.10.3 + '@codemirror/language': 6.10.8 '@codemirror/lint@6.8.1': dependencies: @@ -9593,7 +9631,7 @@ snapshots: '@codemirror/theme-one-dark@6.1.2': dependencies: - '@codemirror/language': 6.10.3 + '@codemirror/language': 6.10.8 '@codemirror/state': 6.4.1 '@codemirror/view': 6.30.0 '@lezer/highlight': 1.2.0 @@ -9707,25 +9745,25 @@ snapshots: '@ctrl/tinycolor@3.6.1': {} - '@dnd-kit/accessibility@3.1.0(react@18.3.1)': + '@dnd-kit/accessibility@3.1.1(react@18.3.1)': dependencies: react: 18.3.1 - tslib: 2.6.3 + tslib: 2.8.1 - '@dnd-kit/core@6.1.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@dnd-kit/core@6.3.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@dnd-kit/accessibility': 3.1.0(react@18.3.1) + '@dnd-kit/accessibility': 3.1.1(react@18.3.1) '@dnd-kit/utilities': 3.2.2(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - tslib: 2.6.3 + tslib: 2.8.1 - '@dnd-kit/sortable@7.0.2(@dnd-kit/core@6.1.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)': + '@dnd-kit/sortable@7.0.2(@dnd-kit/core@6.3.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)': dependencies: - '@dnd-kit/core': 6.1.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@dnd-kit/core': 6.3.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@dnd-kit/utilities': 3.2.2(react@18.3.1) react: 18.3.1 - tslib: 2.6.3 + tslib: 2.8.1 '@dnd-kit/utilities@3.2.2(react@18.3.1)': dependencies: @@ -9902,29 +9940,31 @@ snapshots: '@eslint/js@8.57.1': {} - '@formatjs/ecma402-abstract@2.0.0': + '@formatjs/ecma402-abstract@2.3.1': dependencies: - '@formatjs/intl-localematcher': 0.5.4 - tslib: 2.6.3 + '@formatjs/fast-memoize': 2.2.5 + '@formatjs/intl-localematcher': 0.5.9 + decimal.js: 10.4.3 + tslib: 2.8.1 - '@formatjs/fast-memoize@2.2.0': + '@formatjs/fast-memoize@2.2.5': dependencies: - tslib: 2.6.3 + tslib: 2.8.1 - '@formatjs/icu-messageformat-parser@2.7.8': + '@formatjs/icu-messageformat-parser@2.9.7': dependencies: - '@formatjs/ecma402-abstract': 2.0.0 - '@formatjs/icu-skeleton-parser': 1.8.2 - tslib: 2.6.3 + '@formatjs/ecma402-abstract': 2.3.1 + '@formatjs/icu-skeleton-parser': 1.8.11 + tslib: 2.8.1 - '@formatjs/icu-skeleton-parser@1.8.2': + '@formatjs/icu-skeleton-parser@1.8.11': dependencies: - '@formatjs/ecma402-abstract': 2.0.0 - tslib: 2.6.3 + '@formatjs/ecma402-abstract': 2.3.1 + tslib: 2.8.1 - '@formatjs/intl-localematcher@0.5.4': + '@formatjs/intl-localematcher@0.5.9': dependencies: - tslib: 2.6.3 + tslib: 2.8.1 '@humanwhocodes/config-array@0.13.0': dependencies: @@ -10196,6 +10236,12 @@ snapshots: '@lezer/highlight': 1.2.0 '@lezer/lr': 1.4.2 + '@lezer/css@1.1.9': + dependencies: + '@lezer/common': 1.2.1 + '@lezer/highlight': 1.2.0 + '@lezer/lr': 1.4.2 + '@lezer/go@1.0.0': dependencies: '@lezer/common': 1.2.1 @@ -10244,6 +10290,11 @@ snapshots: '@lezer/common': 1.2.1 '@lezer/highlight': 1.2.0 + '@lezer/markdown@1.3.2': + dependencies: + '@lezer/common': 1.2.1 + '@lezer/highlight': 1.2.0 + '@lezer/php@1.0.2': dependencies: '@lezer/common': 1.2.1 @@ -11570,7 +11621,7 @@ snapshots: mime-types: 2.1.35 negotiator: 0.6.3 - ace-builds@1.35.4: {} + ace-builds@1.37.1: {} acorn-globals@6.0.0: dependencies: @@ -11619,12 +11670,12 @@ snapshots: screenfull: 5.2.0 tslib: 2.6.3 - ai@4.0.20(react@18.3.1)(zod@3.23.8): + ai@4.0.22(react@18.3.1)(zod@3.23.8): dependencies: - '@ai-sdk/provider': 1.0.2 - '@ai-sdk/provider-utils': 2.0.4(zod@3.23.8) - '@ai-sdk/react': 1.0.6(react@18.3.1)(zod@3.23.8) - '@ai-sdk/ui-utils': 1.0.5(zod@3.23.8) + '@ai-sdk/provider': 1.0.3 + '@ai-sdk/provider-utils': 2.0.5(zod@3.23.8) + '@ai-sdk/react': 1.0.7(react@18.3.1)(zod@3.23.8) + '@ai-sdk/ui-utils': 1.0.6(zod@3.23.8) '@opentelemetry/api': 1.9.0 jsondiffpatch: 0.6.0 zod-to-json-schema: 3.23.5(zod@3.23.8) @@ -12277,9 +12328,9 @@ snapshots: codemirror@6.0.1(@lezer/common@1.2.1): dependencies: - '@codemirror/autocomplete': 6.18.0(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.30.0)(@lezer/common@1.2.1) - '@codemirror/commands': 6.6.0 - '@codemirror/language': 6.10.3 + '@codemirror/autocomplete': 6.18.0(@codemirror/language@6.10.8)(@codemirror/state@6.4.1)(@codemirror/view@6.30.0)(@lezer/common@1.2.1) + '@codemirror/commands': 6.7.1 + '@codemirror/language': 6.10.8 '@codemirror/lint': 6.8.1 '@codemirror/search': 6.5.6 '@codemirror/state': 6.4.1 @@ -13272,8 +13323,6 @@ snapshots: events@3.3.0: {} - eventsource-parser@1.1.2: {} - eventsource-parser@3.0.0: {} execa@5.1.1: @@ -13900,12 +13949,12 @@ snapshots: intersection-observer@0.12.2: {} - intl-messageformat@10.5.14: + intl-messageformat@10.7.10: dependencies: - '@formatjs/ecma402-abstract': 2.0.0 - '@formatjs/fast-memoize': 2.2.0 - '@formatjs/icu-messageformat-parser': 2.7.8 - tslib: 2.6.3 + '@formatjs/ecma402-abstract': 2.3.1 + '@formatjs/fast-memoize': 2.2.5 + '@formatjs/icu-messageformat-parser': 2.9.7 + tslib: 2.8.1 invariant@2.2.4: dependencies: @@ -17473,6 +17522,8 @@ snapshots: tslib@2.6.3: {} + tslib@2.8.1: {} + tsutils@3.21.0(typescript@5.7.2): dependencies: tslib: 1.14.1 diff --git a/react/src/components/lablupTalkativotUI/ChatMessage.tsx b/react/src/components/lablupTalkativotUI/ChatMessage.tsx index 16fc6fb534..4e198c0cdc 100644 --- a/react/src/components/lablupTalkativotUI/ChatMessage.tsx +++ b/react/src/components/lablupTalkativotUI/ChatMessage.tsx @@ -2,11 +2,13 @@ import Flex from '../Flex'; // ES 2015 import ChatMessageContent from './ChatMessageContent'; import { Message } from '@ai-sdk/react'; +import { Attachments } from '@ant-design/x'; import { useThrottle } from 'ahooks'; -import { Avatar, theme } from 'antd'; +import { Avatar, theme, Image } from 'antd'; import dayjs from 'dayjs'; import localizedFormat from 'dayjs/plugin/localizedFormat'; import relativeTime from 'dayjs/plugin/relativeTime'; +import _ from 'lodash'; import React from 'react'; import { useState } from 'react'; @@ -33,6 +35,7 @@ const ChatMessage: React.FC<{ const [isHovered, setIsHovered] = useState(false); const throttledMessageContent = useThrottle(message.content, { wait: 50 }); + return ( + {_.map(message.experimental_attachments, (attachment, index) => + _.includes(attachment?.contentType, 'image/') ? ( + + {attachment?.name} + + ) : ( + + ), + )} = ({ ...cardProps }) => { const webuiNavigate = useWebUINavigate(); + const [isOpenAttachments, setIsOpenAttachments] = useState(false); const [modelId, setModelId] = useControllableValue(cardProps, { valuePropName: 'modelId', @@ -89,16 +97,7 @@ const LLMChatCard: React.FC = ({ }); const customModelFormRef = useRef(null); - - // const [userInput, setUserInput] = useControllableValue(cardProps,{ - // valuePropName: "userInput", - // trigger: "onChangeUserInput", - // }); - - // useControllableValue(cardProps, { - // valuePropName: "agentId", - // trigger: "onAgentChange", - // }); + const cardRef = useRef(null); const { messages, @@ -109,7 +108,7 @@ const LLMChatCard: React.FC = ({ isLoading, append, setMessages, - // ...chatHelpers + // ...chatHelpers, } = useChat({ api: baseURL, headers, @@ -164,6 +163,8 @@ const LLMChatCard: React.FC = ({ // eslint-disable-next-line react-hooks/exhaustive-deps }, [submitKey]); + const [files, setFiles] = useState([]); + const items: MenuProps['items'] = filterEmptyItem([ showCompareMenuItem && { key: 'compare', @@ -191,6 +192,7 @@ const LLMChatCard: React.FC = ({ return ( = ({ autoFocus value={input} placeholder="Say something..." + header={ + + false} + getDropContainer={() => cardRef.current} + accept="image/*,text/*" + items={files} + onChange={({ fileList }) => setFiles(fileList)} + placeholder={(type) => + type === 'drop' + ? { + title: t('chatui.DropFileHere'), + } + : { + icon: , + title: t('chatui.UploadFiles'), + description: t('chatui.UploadFilesDescription'), + } + } + /> + + } + prefix={ + false} + getDropContainer={() => cardRef.current} + accept="image/*,text/*" + items={files} + onChange={({ fileList }) => { + setFiles(fileList); + setIsOpenAttachments(true); + }} + placeholder={(type) => + type === 'drop' + ? { + title: t('chatui.DropFileHere'), + } + : { + icon: , + title: t('chatui.UploadFiles'), + description: t('chatui.UploadFilesDescription'), + } + } + > + +