feat: Improved IPC image handling and added vision model support.

- Improved IPC image handling to return mime type and base64 encoded data alongside the image data.
- Updated type definition for `base64` method in image object to return an object with mime, base64, and data properties.
- Added support for vision models using new function and regex.
- Table cell size has been reduced on the FilesPage component.
- Added support for vision model attachments.
- Added model dependency to AttachmentButton component.
- Implemented new functionality to handle image messages in the GeminiProvider class.
- Update image base64 encoding to directly use API response data.
This commit is contained in:
kangfenmao
2024-09-11 13:53:54 +08:00
parent 11ab80f87d
commit fa0cacda26
8 changed files with 62 additions and 28 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ declare global {
all: () => Promise<FileMetadata[]>
}
image: {
base64: (filePath: string) => Promise<string>
base64: (filePath: string) => Promise<{ mime: string; base64: string; data: string }>
}
}
}