Task attempt 9af44c93-15c6-4877-84c4-ca868be077ea - Final changes

This commit is contained in:
Louis Knight-Webb
2025-06-24 10:49:25 +01:00
parent 60457f6fb0
commit 5505ee5f30

View File

@@ -158,6 +158,22 @@ export function TaskDetailsPanel({
const scrollContainerRef = useRef<HTMLDivElement>(null);
const { config } = useConfig();
// Handle ESC key locally to prevent global navigation
useEffect(() => {
if (!isOpen) return;
const handleKeyDown = (event: KeyboardEvent) => {
if (event.key === 'Escape') {
event.preventDefault();
event.stopPropagation();
onClose();
}
};
document.addEventListener('keydown', handleKeyDown, true); // Use capture phase
return () => document.removeEventListener('keydown', handleKeyDown, true);
}, [isOpen, onClose]);
// Available executors
const availableExecutors = [
{ id: "echo", name: "Echo" },