File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
widget/components/chat/msgs/pieces Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 2323<script setup>
2424import { useGlobalStore } from " ~/store" ;
2525import { ref , computed } from " vue" ;
26- import { createTextMessage } from " ~/utils" ;
26+ import { createMessage } from " ~/utils" ;
2727
2828import FileAttachment from " ~/components/icons/FileAttachment.vue" ;
2929
@@ -105,11 +105,14 @@ async function uploadFileToS3(file) {
105105}
106106
107107function handleFileUploaded (s3_path , file_name ) {
108- const m = createTextMessage (" human" , {
108+ const m = createMessage (" human" , [{
109+ " type" : " file_uploaded" ,
110+ " payload" : {
109111 " s3_path" : s3_path,
110112 " name" : file_name,
111113 // We don't pass url because we don't have it yet
112- }, " 0" , " 0" );
114+ },
115+ }], " 0" , " 0" );
113116 if (store .userId !== undefined )
114117 m[" sender" ][" id" ] = store .userId
115118
You can’t perform that action at this time.
0 commit comments