fix(cli): remove QWEN_OAUTH gate from feedback dialog (#4316)

The feedback dialog (point-up/point-down) was only shown to users
authenticated via QWEN_OAUTH. With the QWEN_OAUTH free tier closed
on 2026-04-15 (#3203), the active user pool that can produce
feedback events has effectively drained, leaving the user_feedback
telemetry signal blind.

The reported payload only contains session_id, rating, model,
approval_mode, and prompt_id — no prompt content or other PII —
so there is no privacy reason to scope it to a specific auth
provider. Keep the existing usageStatisticsEnabled and
enableUserFeedback opt-ins, which already gate all telemetry.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
pomelo 2026-05-21 10:25:35 +08:00 committed by GitHub
parent 4b25f9c05c
commit 7c4b7f582a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,7 +7,6 @@ import {
UserFeedbackEvent,
type UserFeedbackRating,
isNodeError,
AuthType,
Storage,
} from '@qwen-code/qwen-code-core';
import { StreamingState, MessageType, type HistoryItem } from '../types.js';
@ -145,16 +144,14 @@ export const useFeedbackDialog = ({
const checkAndShowFeedback = () => {
if (streamingState === StreamingState.Idle && history.length > 0) {
// Show feedback dialog if:
// 1. User is authenticated via QWEN_OAUTH
// 2. Qwen logger is enabled (required for feedback submission)
// 3. User feedback is enabled in settings
// 4. The last message is an AI response
// 5. Random chance (25% probability)
// 6. Meets minimum requirements (tool calls > 10 OR user messages > 5)
// 7. Fatigue mechanism allows showing (not shown recently across sessions)
// 8. Not temporarily dismissed
// 1. Qwen logger is enabled (required for feedback submission)
// 2. User feedback is enabled in settings
// 3. The last message is an AI response
// 4. Random chance (25% probability)
// 5. Meets minimum requirements (tool calls > 10 OR user messages > 5)
// 6. Fatigue mechanism allows showing (not shown recently across sessions)
// 7. Not temporarily dismissed
if (
config.getAuthType() !== AuthType.QWEN_OAUTH ||
!config.getUsageStatisticsEnabled() ||
settings.merged.ui?.enableUserFeedback === false ||
!lastMessageIsAIResponse(history) ||