Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/web-telemetry-toggle.md
Original file line number Diff line number Diff line change
@@ -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.
24 changes: 18 additions & 6 deletions apps/kimi-web/src/components/settings/SettingsDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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<AppConfig>);
}

// 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<AppConfig>);
}

function setTab(tab: SettingsTab): void {
activeTab.value = tab;
}
Expand Down Expand Up @@ -439,16 +447,20 @@ function setTab(tab: SettingsTab): void {
</button>
</div>

<div v-if="config.telemetry !== undefined" class="row">
<span class="rlabel">{{ t('settings.telemetry') }}</span>
<div class="row">
<span class="rlabel">
{{ t('settings.telemetry') }}
<span class="hint">{{ t('settings.telemetryHint') }}</span>
<span class="hint">{{ t('settings.telemetryRestartHint') }}</span>
</span>
<button
type="button"
class="switch"
role="switch"
:class="{ on: configBool(config.telemetry) }"
:aria-checked="configBool(config.telemetry)"
:class="{ on: config.telemetry !== false }"
:aria-checked="config.telemetry !== false"
:disabled="configSaving"
@click="toggleConfigBoolean('telemetry')"
@click="toggleTelemetry()"
>
<span class="knob" />
</button>
Expand Down
4 changes: 3 additions & 1 deletion apps/kimi-web/src/i18n/locales/en/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down
4 changes: 3 additions & 1 deletion apps/kimi-web/src/i18n/locales/zh/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ export default {
defaultPlanModeHint: '新会话默认进入 plan mode',
mergeSkills: '合并所有可用 Skills',
mergeSkillsHint: '让项目、插件和用户 Skills 一起出现在可用列表中',
telemetry: '遥测',
telemetry: '使用数据改进产品',
telemetryHint: '开启后,我们会收集您的匿名交互数据(如点击、打断、功能使用等),用于改进产品体验。您可以随时关闭。',
telemetryRestartHint: '更改后需重启服务生效。',
credentialReady: '凭据已配置',
credentialMissing: '缺少凭据',
configUnavailable: '当前服务端没有返回 config,设置项暂不可用。',
Expand Down
Loading