From aa6b0d065ee888056c3812781483ddb74739897f Mon Sep 17 00:00:00 2001 From: qer Date: Tue, 30 Jun 2026 20:49:35 +0800 Subject: [PATCH] feat(web): always show the usage-data opt-out toggle in settings (#1232) The telemetry toggle was hidden unless the config explicitly set a value, and its on/off mapping treated the default (unset) state as off even though telemetry is enabled by default. Show it always, treat unset/true as on, and rename it with a description and a restart note. --- .changeset/web-telemetry-toggle.md | 5 ++++ .../components/settings/SettingsDialog.vue | 24 ++++++++++++++----- apps/kimi-web/src/i18n/locales/en/settings.ts | 4 +++- apps/kimi-web/src/i18n/locales/zh/settings.ts | 4 +++- 4 files changed, 29 insertions(+), 8 deletions(-) create mode 100644 .changeset/web-telemetry-toggle.md diff --git a/.changeset/web-telemetry-toggle.md b/.changeset/web-telemetry-toggle.md new file mode 100644 index 000000000..34165369d --- /dev/null +++ b/.changeset/web-telemetry-toggle.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +Always show the usage-data opt-out toggle in the web settings with a clearer label and description. diff --git a/apps/kimi-web/src/components/settings/SettingsDialog.vue b/apps/kimi-web/src/components/settings/SettingsDialog.vue index 9d5923111..3a8bbbb20 100644 --- a/apps/kimi-web/src/components/settings/SettingsDialog.vue +++ b/apps/kimi-web/src/components/settings/SettingsDialog.vue @@ -165,11 +165,19 @@ function setDefaultPermissionMode(mode: 'manual' | 'auto' | 'yolo'): void { emit('updateConfig', { defaultPermissionMode: mode }); } -function toggleConfigBoolean(key: 'defaultThinking' | 'defaultPlanMode' | 'mergeAllAvailableSkills' | 'telemetry'): void { +function toggleConfigBoolean(key: 'defaultThinking' | 'defaultPlanMode' | 'mergeAllAvailableSkills'): void { const current = props.config?.[key]; emit('updateConfig', { [key]: !configBool(current) } as Partial); } +// Telemetry is opt-out: undefined and `true` both mean enabled, only explicit +// `false` disables it. Toggle based on that effective state so an unset value +// (displayed as on) flips to `false` instead of writing a redundant `true`. +function toggleTelemetry(): void { + const enabled = props.config?.telemetry !== false; + emit('updateConfig', { telemetry: !enabled } as Partial); +} + function setTab(tab: SettingsTab): void { activeTab.value = tab; } @@ -439,16 +447,20 @@ function setTab(tab: SettingsTab): void { -
- {{ t('settings.telemetry') }} +
+ + {{ t('settings.telemetry') }} + {{ t('settings.telemetryHint') }} + {{ t('settings.telemetryRestartHint') }} + diff --git a/apps/kimi-web/src/i18n/locales/en/settings.ts b/apps/kimi-web/src/i18n/locales/en/settings.ts index bccf9447d..0be38da46 100644 --- a/apps/kimi-web/src/i18n/locales/en/settings.ts +++ b/apps/kimi-web/src/i18n/locales/en/settings.ts @@ -35,7 +35,9 @@ export default { defaultPlanModeHint: 'Whether new sessions start in plan mode', mergeSkills: 'Merge all available skills', mergeSkillsHint: 'Show project, plugin, and user skills together', - telemetry: 'Telemetry', + telemetry: 'Improve product with usage data', + telemetryHint: 'When on, we collect anonymous interaction data (such as clicks, interruptions, and feature usage) to improve the product experience. You can turn it off at any time.', + telemetryRestartHint: 'Takes effect after restarting the service.', credentialReady: 'Credential configured', credentialMissing: 'Missing credential', configUnavailable: 'The server did not return config yet. These settings are unavailable.', diff --git a/apps/kimi-web/src/i18n/locales/zh/settings.ts b/apps/kimi-web/src/i18n/locales/zh/settings.ts index 9947d739c..b3f01858d 100644 --- a/apps/kimi-web/src/i18n/locales/zh/settings.ts +++ b/apps/kimi-web/src/i18n/locales/zh/settings.ts @@ -35,7 +35,9 @@ export default { defaultPlanModeHint: '新会话默认进入 plan mode', mergeSkills: '合并所有可用 Skills', mergeSkillsHint: '让项目、插件和用户 Skills 一起出现在可用列表中', - telemetry: '遥测', + telemetry: '使用数据改进产品', + telemetryHint: '开启后,我们会收集您的匿名交互数据(如点击、打断、功能使用等),用于改进产品体验。您可以随时关闭。', + telemetryRestartHint: '更改后需重启服务生效。', credentialReady: '凭据已配置', credentialMissing: '缺少凭据', configUnavailable: '当前服务端没有返回 config,设置项暂不可用。',