Add Ctrl+D to exit when editor is empty
- Add isCtrlD helper to keys.ts - CustomEditor intercepts Ctrl+D and only triggers callback when editor is empty - Single Ctrl+D with empty input exits immediately - Update CHANGELOG to frame as feature (Kitty protocol support) not fix
This commit is contained in:
@@ -562,6 +562,7 @@ export class InteractiveMode {
|
||||
};
|
||||
|
||||
this.editor.onCtrlC = () => this.handleCtrlC();
|
||||
this.editor.onCtrlD = () => this.handleCtrlD();
|
||||
this.editor.onShiftTab = () => this.cycleThinkingLevel();
|
||||
this.editor.onCtrlP = () => this.cycleModel();
|
||||
this.editor.onCtrlO = () => this.toggleToolOutputExpansion();
|
||||
@@ -1128,6 +1129,12 @@ export class InteractiveMode {
|
||||
}
|
||||
}
|
||||
|
||||
private handleCtrlD(): void {
|
||||
// Only called when editor is empty (enforced by CustomEditor)
|
||||
this.stop();
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
private updateEditorBorderColor(): void {
|
||||
if (this.isBashMode) {
|
||||
this.editor.borderColor = theme.getBashModeBorderColor();
|
||||
|
||||
Reference in New Issue
Block a user