Fix: React hooks error - moved skill selector ESC handler to main useInput

This commit is contained in:
Gemini AI
2025-12-14 21:28:27 +04:00
Unverified
parent 764696a25e
commit 5ae382a461

View File

@@ -2351,7 +2351,9 @@ const App = () => {
// ESC closes menus // ESC closes menus
if (key.escape) { if (key.escape) {
if (showTodoOverlay) { if (showSkillSelector) {
setShowSkillSelector(false);
} else if (showTodoOverlay) {
setShowTodoOverlay(false); setShowTodoOverlay(false);
} else if (showCommandPalette) { } else if (showCommandPalette) {
setShowCommandPalette(false); setShowCommandPalette(false);
@@ -4176,12 +4178,7 @@ This gives the user a chance to refine requirements before implementation.
}]); }]);
}; };
// Handle ESC to close // ESC handling is done in the main keyboard handler
useInput((input, key) => {
if (key.escape) {
setShowSkillSelector(false);
}
}, { isActive: showSkillSelector });
return h(Box, { return h(Box, {
flexDirection: 'column', flexDirection: 'column',