-
-
Notifications
You must be signed in to change notification settings - Fork 12.9k
add upload hint for non-visual model #7969
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
👍 @arvinxx Thank you for raising your pull request and contributing to our Community |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
Added validation and warning messages for image uploads when using non-vision models in the chat interface.
- Added vision support check in
src/components/DragUpload/useDragUpload.tsx
to prevent image uploads for unsupported models - Added localization string
visionNotSupported
insrc/locales/default/chat.ts
for user-friendly error messaging - Added test coverage in
useDragUpload.test.tsx
for both drag-drop and paste events with image files - Implemented checks for both drag-and-drop and clipboard paste events to maintain consistent behavior
3 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
|
||
beforeEach(() => { | ||
mockOnUploadFiles = vi.fn(); | ||
mockMessage = { warning: vi.fn() }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: mockMessage is defined but never used in tests
mockMessage = { warning: vi.fn() }; | |
// Remove unused mock |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7969 +/- ##
==========================================
+ Coverage 88.49% 95.67% +7.18%
==========================================
Files 822 14 -808
Lines 60380 2519 -57861
Branches 5699 444 -5255
==========================================
- Hits 53432 2410 -51022
+ Misses 6948 109 -6839
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
📝 补充信息 | Additional Information