File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ export default function Home() {
4646 const [ selectedImages , setSelectedImages ] = useState < Set < string > > ( new Set ( ) ) ;
4747 const [ images ] = useState < ImageItem [ ] > ( SAMPLE_IMAGES ) ;
4848 const [ isLoading , setIsLoading ] = useState ( false ) ;
49+ const [ userId ] = useState ( ( ) => crypto . randomUUID ( ) ) ;
4950
5051 // Scroll to the right end (newest images) on mount and window resize
5152 useEffect ( ( ) => {
@@ -114,7 +115,7 @@ export default function Home() {
114115 const apiResponse = await sendChatMessage ( {
115116 message,
116117 selected_images : selectedImageIds ,
117- user_id : "user_001" ,
118+ user_id : userId ,
118119 } ) ;
119120
120121 const aiMessage = createMessage ( apiResponse . response , "agent" ) ;
@@ -146,7 +147,7 @@ export default function Home() {
146147 const apiResponse = await sendChatMessage ( {
147148 message : uploadMessage ,
148149 selected_images : [ ] ,
149- user_id : "user_001" ,
150+ user_id : userId ,
150151 } ) ;
151152
152153 const aiMessage = createMessage ( apiResponse . response , "agent" ) ;
You can’t perform that action at this time.
0 commit comments