diff --git a/src/cli/components/HooksManager.tsx b/src/cli/components/HooksManager.tsx
index a577b82..8f14510 100644
--- a/src/cli/components/HooksManager.tsx
+++ b/src/cli/components/HooksManager.tsx
@@ -310,13 +310,11 @@ export const HooksManager = memo(function HooksManager({
setNewCommand("");
}
} else {
- // Could add edit functionality here
+ // Delete selected hook
+ setDeleteHookIndex(selectedIndex - 1);
+ setDeleteConfirmIndex(1); // Default to No
+ setScreen("delete-confirm");
}
- } else if ((input === "d" || input === "D") && selectedIndex > 0) {
- // Delete selected hook
- setDeleteHookIndex(selectedIndex - 1);
- setDeleteConfirmIndex(1); // Default to No
- setScreen("delete-confirm");
} else if (key.escape) {
setScreen("events");
setSelectedIndex(0);
@@ -468,7 +466,7 @@ export const HooksManager = memo(function HooksManager({
// Both types have hooks array
const command = "hooks" in hook ? hook.hooks[0]?.command || "" : "";
const truncatedCommand =
- command.length > 30 ? `${command.slice(0, 27)}...` : command;
+ command.length > 50 ? `${command.slice(0, 47)}...` : command;
return (
@@ -476,8 +474,10 @@ export const HooksManager = memo(function HooksManager({
{prefix} {index + 2}.{" "}
{sourceLabel}
- {matcherPattern !== null && (
+ {matcherPattern !== null ? (
{matcherPattern.padEnd(12)}
+ ) : (
+
)}
{truncatedCommand}
@@ -485,7 +485,7 @@ export const HooksManager = memo(function HooksManager({
})}
- Enter to select · d to delete · esc to go back
+ Enter to select · esc to go back
);
}