mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-02 13:40:46 +00:00
refactor: reorder feedback options and improve dialog feedback timestamp handling
This commit is contained in:
parent
6327e35a14
commit
4c8414488f
2 changed files with 20 additions and 20 deletions
|
|
@ -116,9 +116,9 @@ export const useFeedbackDialog = ({
|
|||
|
||||
const submitFeedback = useCallback(
|
||||
(rating: number) => {
|
||||
// Only create and log feedback event for ratings 1-3 (BAD, FINE, GOOD)
|
||||
// Only create and log feedback event for ratings 1-3 (GOOD, BAD, FINE)
|
||||
// Rating 0 (DISMISS) should not trigger any telemetry
|
||||
if (rating >= FEEDBACK_OPTIONS.BAD && rating <= FEEDBACK_OPTIONS.GOOD) {
|
||||
if (rating >= FEEDBACK_OPTIONS.GOOD && rating <= FEEDBACK_OPTIONS.FINE) {
|
||||
const feedbackEvent = new UserFeedbackEvent(
|
||||
sessionStats.sessionId,
|
||||
rating as UserFeedbackRating,
|
||||
|
|
@ -127,15 +127,15 @@ export const useFeedbackDialog = ({
|
|||
);
|
||||
|
||||
logUserFeedback(config, feedbackEvent);
|
||||
|
||||
// Record the timestamp when feedback dialog is submitted
|
||||
settings.setValue(
|
||||
SettingScope.User,
|
||||
'ui.feedbackLastShownTimestamp',
|
||||
Date.now(),
|
||||
);
|
||||
}
|
||||
|
||||
// Record the timestamp when feedback dialog is submitted
|
||||
settings.setValue(
|
||||
SettingScope.User,
|
||||
'ui.feedbackLastShownTimestamp',
|
||||
Date.now(),
|
||||
);
|
||||
|
||||
closeFeedbackDialog();
|
||||
},
|
||||
[closeFeedbackDialog, sessionStats.sessionId, config, settings],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue