feat(tui): update permission mode copy and reorder /auto /yolo (#1450)

This commit is contained in:
liruifengv 2026-07-07 12:26:25 +08:00 committed by GitHub
parent 743f66e547
commit 7a65e0d1c0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 16 additions and 14 deletions

View file

@ -107,7 +107,7 @@ export async function handleYoloCommand(host: SlashCommandHost, args: string): P
}
await session.setPermission('yolo');
host.setAppState({ permissionMode: 'yolo' });
host.showNotice('YOLO mode: ON', 'Workspace tools auto-approved.');
host.showNotice('YOLO mode: ON', 'AI auto-approves safe actions, asks for approval on risky ones.');
return;
}
@ -130,7 +130,7 @@ export async function handleYoloCommand(host: SlashCommandHost, args: string): P
} else {
await session.setPermission('yolo');
host.setAppState({ permissionMode: 'yolo' });
host.showNotice('YOLO mode: ON', 'Workspace tools auto-approved.');
host.showNotice('YOLO mode: ON', 'AI auto-approves safe actions, asks for approval on risky ones.');
}
}
@ -151,7 +151,7 @@ export async function handleAutoCommand(host: SlashCommandHost, args: string): P
}
await session.setPermission('auto');
host.setAppState({ permissionMode: 'auto' });
host.showNotice('Auto mode: ON', 'Tools auto-approved. Agent will not ask questions.');
host.showNotice('Auto mode: ON', 'Run all actions automatically, including risky ones.');
return;
}
@ -174,7 +174,7 @@ export async function handleAutoCommand(host: SlashCommandHost, args: string): P
} else {
await session.setPermission('auto');
host.setAppState({ permissionMode: 'auto' });
host.showNotice('Auto mode: ON', 'Tools auto-approved. Agent will not ask questions.');
host.showNotice('Auto mode: ON', 'Run all actions automatically, including risky ones.');
}
}

View file

@ -136,15 +136,15 @@ export const BUILTIN_SLASH_COMMANDS = [
{
name: 'yolo',
aliases: ['yes'],
description: 'Toggle auto-approve mode',
priority: 100,
description: 'Toggle YOLO mode: AI auto-approves safe actions, asks for approval on risky ones.',
priority: 101,
availability: 'always',
},
{
name: 'auto',
aliases: [],
description: 'Toggle auto permission mode',
priority: 100,
description: 'Toggle Auto mode: run all actions automatically, including risky ones.',
priority: 99,
availability: 'always',
},
{

View file

@ -6,20 +6,17 @@ const PERMISSION_OPTIONS: readonly ChoiceOption[] = [
{
value: 'manual',
label: 'Manual',
description:
'Ask before commands, edits, and other risky actions. Read/search tools run directly; session approval rules are respected.',
description: 'Approve every action yourself.',
},
{
value: 'auto',
label: 'Auto',
description:
'Run fully non-interactively. Tool actions are approved automatically, and agent questions are skipped so it can decide on its own.',
description: 'Run all actions automatically, including risky ones.',
},
{
value: 'yolo',
label: 'YOLO',
description:
'Automatically approve tool actions and plan transitions. The agent can still ask you explicit questions when your input is needed.',
description: 'AI decides which actions need your approval.',
},
];