📈 feat: Chat rating for feedback (#5878)

* feat: working started for feedback implementation.

TODO:
- needs some refactoring.
- needs some UI animations.

* feat: working rate functionality

* feat: works now as well to reader the already rated responses from the server.

* feat: added the option to give feedback in text (optional)

* feat: added Dismiss option `x` to the `FeedbackTagOptions`

*  feat: Add rating and ratingContent fields to message schema

* 🔧 chore: Bump version to 0.0.3 in package.json

*  feat: Enhance feedback localization and update UI elements

* 🚀 feat: Implement feedback tagging system with thumbs up/down options

* 🚀 feat: Add data-provider package to unused i18n keys detection

* 🎨 style: update HoverButtons' style

* 🎨 style: Update HoverButtons and Fork components for improved styling and visibility

* 🔧 feat: Implement feedback system with rating and content options

* 🔧 feat: Enhance feedback handling with improved rating toggle and tag options

* 🔧 feat: Integrate toast notifications for feedback submission and clean up unused state

* 🔧 feat: Remove unused feedback tag options from translation file

*  refactor: clean up Feedback component and improve HoverButtons structure

*  refactor: remove unused settings switches for auto scroll, hide side panel, and user message markdown

* refactor: reorganize import order

*  refactor: enhance HoverButtons and Fork components with improved styles and animations

*  refactor: update feedback response phrases for improved user engagement

*  refactor: add CheckboxOption component and streamline fork options rendering

* Refactor feedback components and logic

- Consolidated feedback handling into a single Feedback component, removing FeedbackButtons and FeedbackTagOptions.
- Introduced new feedback tagging system with detailed tags for both thumbs up and thumbs down ratings.
- Updated feedback schema to include new tags and improved type definitions.
- Enhanced user interface for feedback collection, including a dialog for additional comments.
- Removed obsolete files and adjusted imports accordingly.
- Updated translations for new feedback tags and placeholders.

*  refactor: update feedback handling by replacing rating fields with feedback in message updates

* fix: add missing validateMessageReq middleware to feedback route and refactor feedback system

* 🗑️ chore: Remove redundant fork option explanations from translation file

* 🔧 refactor: Remove unused dependency from feedback callback

* 🔧 refactor: Simplify message update response structure and improve error logging

* Chore: removed unused tests.

---------

Co-authored-by: Marco Beretta <81851188+berry-13@users.noreply.github.com>
This commit is contained in:
Ruben Talstra 2025-05-30 18:16:34 +02:00 committed by GitHub
parent 4808c5be48
commit 4cbab86b45
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
76 changed files with 1592 additions and 835 deletions

View file

@ -698,4 +698,4 @@
"com_ui_zoom": "تكبير",
"com_user_message": "أنت",
"com_warning_resubmit_unsupported": "إعادة إرسال رسالة الذكاء الاصطناعي غير مدعومة لنقطة النهاية هذه"
}
}

View file

@ -723,4 +723,4 @@
"com_ui_zoom": "Přiblížit",
"com_user_message": "Vy",
"com_warning_resubmit_unsupported": "Opětovné odeslání AI zprávy není pro tento koncový bod podporováno."
}
}

View file

@ -922,4 +922,4 @@
"com_ui_zoom": "Zoom",
"com_user_message": "Du",
"com_warning_resubmit_unsupported": "Das erneute Senden der KI-Nachricht wird für diesen Endpunkt nicht unterstützt."
}
}

View file

@ -715,8 +715,6 @@
"com_ui_fork_info_visible": "This option forks only the visible messages; in other words, the direct path to the target message, without any branches.",
"com_ui_fork_more_details_about": "View additional information and details about the \"{{0}}\" fork option",
"com_ui_fork_more_info_options": "View detailed explanation of all fork options and their behaviors",
"com_ui_fork_more_info_remember": "View explanation of how the \"{{0}}\" option saves your preferences for future forks",
"com_ui_fork_more_info_split_target": "View explanation of how the \"{{0}}\" option affects which messages are included in your fork",
"com_ui_fork_processing": "Forking conversation...",
"com_ui_fork_remember": "Remember",
"com_ui_fork_remember_checked": "Your selection will be remembered after usage. Change this at any time in the settings.",
@ -922,6 +920,22 @@
"com_ui_version_var": "Version {{0}}",
"com_ui_versions": "Versions",
"com_ui_view_source": "View source chat",
"com_ui_feedback_more_information": "Provide additional feedback",
"com_ui_feedback_positive": "Love this",
"com_ui_feedback_negative": "Needs improvement",
"com_ui_feedback_more": "More...",
"com_ui_feedback_placeholder": "Please provide any additional feedback here",
"com_ui_feedback_tag_not_matched": "Didn't match my request",
"com_ui_feedback_tag_inaccurate": "Inaccurate or incorrect answer",
"com_ui_feedback_tag_bad_style": "Poor style or tone",
"com_ui_feedback_tag_missing_image": "Expected an image",
"com_ui_feedback_tag_unjustified_refusal": "Refused without reason",
"com_ui_feedback_tag_not_helpful": "Lacked useful information",
"com_ui_feedback_tag_other": "Other issue",
"com_ui_feedback_tag_accurate_reliable": "Accurate and Reliable",
"com_ui_feedback_tag_creative_solution": "Creative Solution",
"com_ui_feedback_tag_clear_well_written": "Clear and Well-Written",
"com_ui_feedback_tag_attention_to_detail": "Attention to Detail",
"com_ui_web_search": "Web Search",
"com_ui_web_search_api_subtitle": "Search the web for up-to-date information",
"com_ui_web_search_cohere_key": "Enter Cohere API Key",

View file

@ -755,4 +755,4 @@
"com_ui_zoom": "Zoom",
"com_user_message": "Usted",
"com_warning_resubmit_unsupported": "No se admite el reenvío del mensaje de IA para este punto de conexión."
}
}

View file

@ -870,4 +870,4 @@
"com_ui_zoom": "Suumi",
"com_user_message": "Sina",
"com_warning_resubmit_unsupported": "AI sõnumi uuesti esitamine pole selle otspunkti jaoks toetatud."
}
}

View file

@ -850,4 +850,4 @@
"com_ui_zoom": "بزرگنمایی ضربه بزنید؛",
"com_user_message": "شما",
"com_warning_resubmit_unsupported": "ارسال مجدد پیام هوش مصنوعی برای این نقطه پایانی پشتیبانی نمی شود."
}
}

View file

@ -547,4 +547,4 @@
"com_ui_versions": "Versiot",
"com_ui_yes": "Kyllä",
"com_user_message": "Sinä"
}
}

View file

@ -755,4 +755,4 @@
"com_ui_zoom": "Zoom",
"com_user_message": "Vous",
"com_warning_resubmit_unsupported": "La resoumission du message IA n'est pas prise en charge pour ce point de terminaison."
}
}

View file

@ -868,4 +868,4 @@
"com_ui_zoom": "זום",
"com_user_message": "אתה",
"com_warning_resubmit_unsupported": "שליחת הודעה מחדש אינה נתמכת עבור נקודת קצה זו."
}
}

View file

@ -850,4 +850,4 @@
"com_ui_zoom": "Zoom",
"com_user_message": "Ön",
"com_warning_resubmit_unsupported": "Az AI üzenet újraküldése nem támogatott ennél a végpontnál."
}
}

View file

@ -290,4 +290,4 @@
"com_ui_upload_success": "Berhasil mengunggah file",
"com_ui_use_prompt": "Gunakan petunjuk",
"com_user_message": "Kamu"
}
}

View file

@ -832,4 +832,4 @@
"com_ui_zoom": "Zoom",
"com_user_message": "Mostra nome utente nei messaggi",
"com_warning_resubmit_unsupported": "Il reinvio del messaggio AI non è supportato per questo endpoint."
}
}

View file

@ -873,4 +873,4 @@
"com_ui_zoom": "ズーム",
"com_user_message": "あなた",
"com_warning_resubmit_unsupported": "このエンドポイントではAIメッセージの再送信はサポートされていません"
}
}

View file

@ -926,4 +926,4 @@
"com_ui_zoom": "확대/축소",
"com_user_message": "당신",
"com_warning_resubmit_unsupported": "이 엔드포인트에서는 AI 메시지 재전송이 지원되지 않습니다"
}
}

View file

@ -310,4 +310,4 @@
"com_ui_unarchive_error": "Kan conversatie niet uit archiveren",
"com_ui_upload_success": "Bestand succesvol geüpload",
"com_ui_use_prompt": "Gebruik prompt"
}
}

View file

@ -717,4 +717,4 @@
"com_ui_zoom": "Powiększ",
"com_user_message": "Ty",
"com_warning_resubmit_unsupported": "Ponowne przesyłanie wiadomości AI nie jest obsługiwane dla tego punktu końcowego."
}
}

View file

@ -820,4 +820,4 @@
"com_ui_zoom": "Zoom",
"com_user_message": "Você",
"com_warning_resubmit_unsupported": "O reenvio da mensagem de IA não é suportado para este endpoint."
}
}

View file

@ -822,4 +822,4 @@
"com_ui_zoom": "Ampliar",
"com_user_message": "Você",
"com_warning_resubmit_unsupported": "O reenvio da mensagem de IA não é suportado por este endereço."
}
}

View file

@ -870,4 +870,4 @@
"com_ui_zoom": "Масштаб",
"com_user_message": "Вы",
"com_warning_resubmit_unsupported": "Повторная отправка сообщения ИИ не поддерживается для данной конечной точки"
}
}

View file

@ -282,4 +282,4 @@
"com_ui_unarchive_error": "Kunde inte avarkivera chatt",
"com_ui_upload_success": "Uppladdningen av filen lyckades",
"com_ui_use_prompt": "Använd prompt"
}
}

View file

@ -805,4 +805,4 @@
"com_ui_zoom": "ขยาย",
"com_user_message": "คุณ",
"com_warning_resubmit_unsupported": "การส่งข้อความ AI ซ้ำไม่รองรับสำหรับจุดสิ้นสุดนี้"
}
}

View file

@ -728,4 +728,4 @@
"com_ui_zoom": "Yakınlaştır",
"com_user_message": "Sen",
"com_warning_resubmit_unsupported": "Bu uç nokta için yapay zeka mesajını yeniden gönderme desteklenmiyor."
}
}

View file

@ -855,4 +855,4 @@
"com_ui_zoom": "缩放",
"com_user_message": "您",
"com_warning_resubmit_unsupported": "此终端不支持重新提交AI消息"
}
}

View file

@ -698,4 +698,4 @@
"com_ui_zoom": "縮放",
"com_user_message": "您",
"com_warning_resubmit_unsupported": "此端點不支援重新送出 AI 訊息。"
}
}