You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(upload): improve error handling and status updates for image upload
- Add status display when starting image upload
- Enhance error messages with HTTP status for failed uploads
- Show error status on upload failure
- Add error handling and logging in dataURL to Blob conversion
- Log uploaded image URL to console
- Display status updates and logs when receiving plugin messages
- Show raw response data when color parsing fails
- Improve message logging and status updates in fallback color analysis
- Provide more specific prompt structure for LLM image color analysis requests
@@ -406,9 +429,11 @@ async function fallbackToCatboxAnalysis() {
406
429
407
430
if(imageUrl){
408
431
showStatus('ANALYZING COLORS...','info');
409
-
// Send image URL to LLM for analysis
432
+
console.log('Sending image URL to LLM:',imageUrl);
433
+
434
+
// Send image URL to LLM for analysis with a more specific prompt
410
435
constpayload={
411
-
message: `Analyze the colors in this image at ${imageUrl} and provide exactly 5 dominant colors in hex format. Response format: {'colors': ['#hex1', '#hex2', '#hex3', '#hex4', '#hex5']}`,
436
+
message: `Please analyze the colors in this image: ${imageUrl} and provide exactly 5 dominant colors in hex format. Response format: {"colors": ["#hex1", "#hex2", "#hex3", "#hex4", "#hex5"]}`,
412
437
useLLM: true
413
438
};
414
439
@@ -418,7 +443,7 @@ async function fallbackToCatboxAnalysis() {
0 commit comments