I want the first press of [CTRL]+[I] to switch to Agent mode, and the second press of [CTRL]+[I] to keep it in Agent mode, instead of closing the Agent window. It should remain in Agent mode regardless of how many times [CTRL]+[I] is pressed.
This would allow me to blindly press [CTRL]+[I] twice to open the Composer window and switch to Agent mode, or remain in Agent mode. Similarly, I could blindly press [CTRL]+[L] twice to open the Composer window and switch to Chat mode, or remain in Chat mode.
This prevents accidentally closing the Composer window by pressing [CTRL]+[I] while already in Agent mode.
This is essential for temporary dual-monitor setups, because with separate Composer windows on each monitor, accidentally pressing [ctrl]+[i] an extra time closes the Composer window, causing significant inconvenience.
Suggested solution: Add a composerMode condition to the keyboard shortcuts, for example, in keybindings.json:
[
{
"key": "ctrl+i",
"command": "composerMode.agent",
"when": "composerMode != 'agent'"
},
{
"key": "ctrl+i",
"command": "composer.focusComposer",
"when": "composerMode == 'agent'"
}
]