-
Notifications
You must be signed in to change notification settings - Fork 415
feat: add Ctrl+Y keyboard shortcut to toggle YOLO mode #1525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@moonshot-ai/kimi-code": patch | ||
| --- | ||
|
|
||
| Add Ctrl+Y keyboard shortcut to toggle YOLO permission mode. Press Ctrl+Y to switch YOLO mode on or off. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -917,6 +917,10 @@ export class KimiTUI { | |
| void slashCommands.handlePlanCommand(this, next ? 'on' : 'off'); | ||
| } | ||
|
|
||
| handleYoloToggle(): void { | ||
| void slashCommands.handleYoloCommand(this, ''); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When Useful? React with 👍 / 👎. |
||
| } | ||
|
|
||
| handleInputModeChange(mode: 'prompt' | 'bash'): void { | ||
| this.setAppState({ inputMode: mode }); | ||
| this.updateEditorBorderHighlight(); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a user is editing a prompt after killing text with Ctrl-K/Ctrl-U/Ctrl-W, pi-tui's editor expects Ctrl-Y to yank the kill ring (
packages/pi-tui/src/keybindings.ts:115). This early return runs beforesuper.handleInput, so the yank handler is never reached and Ctrl-Y toggles YOLO instead, leaving killed text unrecoverable from the keyboard; choose a non-editor binding or add context/fallthrough so prompt editing still works.Useful? React with 👍 / 👎.