feat: Add Google Drive picker button to MessageInput component

This commit is contained in:
Taylor Wilsdon (aider)
2024-12-15 16:08:32 -05:00
parent 61b1a8fdab
commit f566c5940a
2 changed files with 12 additions and 0 deletions

View File

@@ -496,6 +496,16 @@
uploadFilesHandler={() => {
filesInputElement.click();
}}
uploadGoogleDriveHandler={async () => {
try {
const fileData = await createPicker();
if (fileData) {
dispatch('upload', { type: 'google-drive', data: fileData });
}
} catch (error) {
toast.error('Error accessing Google Drive: ' + error.message);
}
}}
onClose={async () => {
await tick();