Fix Cmd+K focus restore and focus input after agent switch

This commit is contained in:
Mohamed Boudra
2026-02-04 11:32:28 +07:00
parent bceac42ec9
commit 1be891e21c
4 changed files with 46 additions and 16 deletions
@@ -374,9 +374,11 @@ export function AgentInputArea({
}
lastHandledFocusRequestIdRef.current = focusChatInputRequest.id;
setTimeout(() => {
messageInputRef.current?.focus();
}, 0);
requestAnimationFrame(() => {
requestAnimationFrame(() => {
messageInputRef.current?.focus();
});
});
clearFocusChatInputRequest(focusChatInputRequest.id);
}, [
agentId,