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-agent-permission-order.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@moonshot-ai/kimi-code": patch
---

web: Order permission modes from safest to most permissive across settings surfaces, and fix the swapped yolo/auto risk colors in the status panel and mobile settings.
5 changes: 3 additions & 2 deletions apps/kimi-web/src/components/chat/StatusPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@ function permLabel(p: PermissionMode): string {
return t('status.permissionManual');
}

// Risk progression matches the Composer: yolo = warning, auto = danger.
const permColor = computed(() => {
const p = props.status.permission;
if (p === 'yolo') return 'var(--color-danger)';
if (p === 'auto') return 'var(--color-warning)';
if (p === 'yolo') return 'var(--color-warning)';
if (p === 'auto') return 'var(--color-danger)';
return 'var(--color-text)';
});

Expand Down
9 changes: 6 additions & 3 deletions apps/kimi-web/src/components/mobile/MobileSettingsSheet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ function onColorScheme(v: string): void {
emit('setColorScheme', v as ColorScheme);
}

const PERM_MODES: PermissionMode[] = ['manual', 'auto', 'yolo'];
// Tap-to-cycle order follows the same safest → most permissive progression
// as the Composer menu and Agent settings (manual → yolo → auto).
const PERM_MODES: PermissionMode[] = ['manual', 'yolo', 'auto'];

// Identity is the model id — display/model names can collide across providers.
const currentModel = computed<AppModel | undefined>(() =>
Expand All @@ -94,10 +96,11 @@ const thinkingOptions = computed(() =>
const planOn = computed<boolean>(() => props.planMode === true);
const swarmOn = computed<boolean>(() => props.swarmMode === true);

// Risk progression matches the Composer: yolo = warning, auto = danger.
const permColor = computed<string>(() => {
const p = props.status.permission;
if (p === 'yolo') return 'var(--color-danger)';
if (p === 'auto') return 'var(--color-warning)';
if (p === 'yolo') return 'var(--color-warning)';
if (p === 'auto') return 'var(--color-danger)';
return 'var(--color-text-muted)';
});
/** Permission sub-line, e.g. "manual · confirm every tool". */
Expand Down
2 changes: 1 addition & 1 deletion apps/kimi-web/src/components/settings/SettingsDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const daemonEndpoint = serverEndpointLabel();
const backendLabel = computed(() =>
props.backend === 'v2' ? 'v2 (kap-server)' : 'v1 (server)',
);
const permissionModes = ['manual', 'auto', 'yolo'] as const;
const permissionModes = ['manual', 'yolo', 'auto'] as const;
// Reuse the Composer's permission labels (status.permission*) so the
// default-permission names stay in sync with the toolbar.
const permissionLabelKey: Record<(typeof permissionModes)[number], string> = {
Expand Down
Loading