Commit Graph

3 Commits

Author SHA1 Message Date
Innei 9bb974b8fd
feat(ai): support ai attachement (#4316)
* init

Signed-off-by: Innei <tukon479@gmail.com>

* feat(ai-chat): enhance file handling with category-based icon retrieval

- Introduced `getFileCategoryFromMimeType` function to categorize file types based on MIME type, improving the clarity of file handling in the AI chat interface.
- Updated `FileAttachmentBlock` and `AIChatContextBar` components to utilize the new categorization function for determining file icons, streamlining the code and enhancing maintainability.
- Removed redundant MIME type checks, simplifying the logic for icon assignment.

These changes improve the user experience by ensuring accurate file representation and reduce code complexity.

Signed-off-by: Innei <tukon479@gmail.com>

* feat: preview image

* Update avatar upload to use followApi and bump deps

* feat: Refactor AI chat context blocks and file upload handling

- Introduced new components for rendering AI chat context blocks, including AIDataBlockItem and AIDataBlockPart.
- Enhanced file attachment handling by updating the structure of AIChatContextBlock to separate file attachments from other block types.
- Implemented a new file upload hook (useFileUpload) to manage file uploads with progress tracking and toast notifications.
- Added UploadProgress and CircularProgress components for visual feedback during file uploads.
- Improved file processing logic to simulate realistic upload progress and handle errors more effectively.
- Updated existing components to utilize the new block structure and file upload logic.
- Created utility functions for managing block styles, icons, and labels for better code organization.

Signed-off-by: Innei <tukon479@gmail.com>

* feat: Enhance chat message rendering with Suspense and add ThinkingIndicator component

Signed-off-by: Innei <tukon479@gmail.com>

* fix: Remove error check for message metadata in AIChatMessage component

Signed-off-by: Innei <tukon479@gmail.com>

---------

Signed-off-by: Innei <tukon479@gmail.com>
2025-08-08 16:32:52 +08:00
Innei cb5a2cd114
feat(ai): support customize chat title 2025-08-07 20:57:12 +08:00
Innei 4205d49b08
fix: update tag filter to include mobile and desktop versions
Signed-off-by: Innei <tukon479@gmail.com>
2025-08-04 17:52:20 +08:00