diff --git a/web/src/components/Shell.jsx b/web/src/components/Shell.jsx index c5ef38f..b14a698 100644 --- a/web/src/components/Shell.jsx +++ b/web/src/components/Shell.jsx @@ -693,7 +693,7 @@ export default function Shell({ api }) { if (!fromEvent) { setAiInput('') - focusAiTerminal() + setTimeout(() => focusAiTerminal(), 0) } if (trimmed === '/clear') { @@ -937,7 +937,7 @@ export default function Shell({ api }) { setAiInput(e.target.value)} - onKeyDown={e => e.key === 'Enter' && handleAiSend()} + onKeyDown={e => { if (e.key === 'Enter') { e.preventDefault(); e.stopPropagation(); handleAiSend() } }} placeholder={aiAtLimit ? '/clear pour continuer' : t('shell.askAi')} disabled={aiAtLimit && aiInput !== '/clear'} />