File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff 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 ,
Original file line number Diff line number Diff line change 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" ,
You can’t perform that action at this time.
0 commit comments