Skip to content

Commit 0a715bf

Browse files
Copilothotlong
andcommitted
Fix React type versions and crypto.randomUUID fallback
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent d8ffdf7 commit 0a715bf

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/plugin-chatbot/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
"react-dom": "^18.0.0 || ^19.0.0"
4343
},
4444
"devDependencies": {
45-
"@types/react": "^18.3.12",
46-
"@types/react-dom": "^18.3.1",
45+
"@types/react": "^19.0.6",
46+
"@types/react-dom": "^19.0.3",
4747
"@vitejs/plugin-react": "^4.2.1",
4848
"typescript": "^5.9.3",
4949
"vite": "^7.3.1",

packages/plugin-chatbot/src/renderer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ ComponentRegistry.register('chatbot',
4141
const handleSendMessage = (content: string) => {
4242
// Create user message with robust ID generation
4343
const userMessage: ChatMessage = {
44-
id: crypto.randomUUID(),
44+
id: crypto?.randomUUID?.() || `msg-${Date.now()}-${Math.random().toString(36).slice(2)}`,
4545
role: 'user',
4646
content,
4747
timestamp: schema.showTimestamp ? new Date().toLocaleTimeString() : undefined,
@@ -59,7 +59,7 @@ ComponentRegistry.register('chatbot',
5959
if (schema.autoResponse) {
6060
setTimeout(() => {
6161
const assistantMessage: ChatMessage = {
62-
id: crypto.randomUUID(),
62+
id: crypto?.randomUUID?.() || `msg-${Date.now()}-${Math.random().toString(36).slice(2)}`,
6363
role: 'assistant',
6464
content: schema.autoResponseText || 'Thank you for your message!',
6565
timestamp: schema.showTimestamp ? new Date().toLocaleTimeString() : undefined,

packages/plugin-timeline/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
"react-dom": "^18.0.0 || ^19.0.0"
4242
},
4343
"devDependencies": {
44-
"@types/react": "^18.3.12",
45-
"@types/react-dom": "^18.3.1",
44+
"@types/react": "^19.0.6",
45+
"@types/react-dom": "^19.0.3",
4646
"@vitejs/plugin-react": "^4.2.1",
4747
"typescript": "^5.9.3",
4848
"vite": "^7.3.1",

0 commit comments

Comments
 (0)