瀏覽代碼

fix: Properly structure Google Drive file upload data for dispatch

Taylor Wilsdon (aider) 4 月之前
父節點
當前提交
eef18d4440
共有 1 個文件被更改,包括 8 次插入1 次删除
  1. 8 1
      src/lib/components/chat/MessageInput.svelte

+ 8 - 1
src/lib/components/chat/MessageInput.svelte

@@ -501,7 +501,14 @@
 											try {
 											try {
 												const fileData = await createPicker();
 												const fileData = await createPicker();
 												if (fileData) {
 												if (fileData) {
-													dispatch('upload', { type: 'google-drive', data: fileData });
+													dispatch('upload', { 
+														type: 'google-drive', 
+														data: {
+															name: fileData.name,
+															url: fileData.url,
+															id: fileData.id
+														}
+													});
 												}
 												}
 											} catch (error) {
 											} catch (error) {
 												console.error('Google Drive Error:', error);
 												console.error('Google Drive Error:', error);