@@ -40,6 +40,8 @@ export type InputModeConfig = {
4040 showAgentModeToggle : boolean
4141 /** Whether to disable slash command suggestions */
4242 disableSlashSuggestions : boolean
43+ /** Whether keyboard shortcuts (Escape, Backspace) can exit this mode */
44+ blockKeyboardExit : boolean
4345}
4446
4547export const INPUT_MODE_CONFIGS : Record < InputMode , InputModeConfig > = {
@@ -50,6 +52,7 @@ export const INPUT_MODE_CONFIGS: Record<InputMode, InputModeConfig> = {
5052 widthAdjustment : 0 ,
5153 showAgentModeToggle : true ,
5254 disableSlashSuggestions : false ,
55+ blockKeyboardExit : false ,
5356 } ,
5457 bash : {
5558 icon : '!' ,
@@ -58,6 +61,7 @@ export const INPUT_MODE_CONFIGS: Record<InputMode, InputModeConfig> = {
5861 widthAdjustment : 2 , // 1 char + 1 padding
5962 showAgentModeToggle : false ,
6063 disableSlashSuggestions : true ,
64+ blockKeyboardExit : false ,
6165 } ,
6266 homeDir : {
6367 icon : null ,
@@ -66,6 +70,7 @@ export const INPUT_MODE_CONFIGS: Record<InputMode, InputModeConfig> = {
6670 widthAdjustment : 0 ,
6771 showAgentModeToggle : true ,
6872 disableSlashSuggestions : false ,
73+ blockKeyboardExit : false ,
6974 } ,
7075 referral : {
7176 icon : '◎' ,
@@ -74,6 +79,7 @@ export const INPUT_MODE_CONFIGS: Record<InputMode, InputModeConfig> = {
7479 widthAdjustment : 2 , // 1 char + 1 padding
7580 showAgentModeToggle : false ,
7681 disableSlashSuggestions : true ,
82+ blockKeyboardExit : false ,
7783 } ,
7884 usage : {
7985 icon : null ,
@@ -82,6 +88,7 @@ export const INPUT_MODE_CONFIGS: Record<InputMode, InputModeConfig> = {
8288 widthAdjustment : 0 ,
8389 showAgentModeToggle : true ,
8490 disableSlashSuggestions : false ,
91+ blockKeyboardExit : false ,
8592 } ,
8693 image : {
8794 icon : '📎' ,
@@ -90,6 +97,7 @@ export const INPUT_MODE_CONFIGS: Record<InputMode, InputModeConfig> = {
9097 widthAdjustment : 3 , // emoji width + padding
9198 showAgentModeToggle : false ,
9299 disableSlashSuggestions : true ,
100+ blockKeyboardExit : false ,
93101 } ,
94102 help : {
95103 icon : null ,
@@ -98,6 +106,7 @@ export const INPUT_MODE_CONFIGS: Record<InputMode, InputModeConfig> = {
98106 widthAdjustment : 0 ,
99107 showAgentModeToggle : true ,
100108 disableSlashSuggestions : false ,
109+ blockKeyboardExit : false ,
101110 } ,
102111 'connect:claude' : {
103112 icon : '🔗' ,
@@ -106,6 +115,7 @@ export const INPUT_MODE_CONFIGS: Record<InputMode, InputModeConfig> = {
106115 widthAdjustment : 3 , // emoji width + padding
107116 showAgentModeToggle : false ,
108117 disableSlashSuggestions : true ,
118+ blockKeyboardExit : false ,
109119 } ,
110120 outOfCredits : {
111121 icon : null ,
@@ -114,6 +124,7 @@ export const INPUT_MODE_CONFIGS: Record<InputMode, InputModeConfig> = {
114124 widthAdjustment : 0 ,
115125 showAgentModeToggle : false ,
116126 disableSlashSuggestions : true ,
127+ blockKeyboardExit : false ,
117128 } ,
118129 subscriptionLimit : {
119130 icon : null ,
@@ -122,6 +133,7 @@ export const INPUT_MODE_CONFIGS: Record<InputMode, InputModeConfig> = {
122133 widthAdjustment : 0 ,
123134 showAgentModeToggle : false ,
124135 disableSlashSuggestions : true ,
136+ blockKeyboardExit : true , // User must click "Continue with credits" or wait for reset
125137 } ,
126138}
127139
0 commit comments