fix(cli): add Esc instruction to HooksDialog footer (#23258)

This commit is contained in:
Abhi
2026-03-21 00:29:09 -04:00
committed by GitHub
parent 1a70fdd364
commit e7b6326cfa
2 changed files with 15 additions and 0 deletions

View File

@@ -244,6 +244,11 @@ export const HooksDialog: React.FC<HooksDialogProps> = ({
</Box>
</>
)}
<Box marginTop={1} flexDirection="column">
<Text color={theme.text.secondary} wrap="truncate">
(Press Esc to close)
</Text>
</Box>
</Box>
);
};

View File

@@ -6,6 +6,8 @@ exports[`HooksDialog > snapshots > renders empty hooks dialog 1`] = `
│ │
│ No hooks configured. │
│ │
│ (Press Esc to close) │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
"
`;
@@ -31,6 +33,8 @@ exports[`HooksDialog > snapshots > renders hook using command as name when name
│ Tip: Use /hooks enable <hook-name> or /hooks disable <hook-name> to toggle individual hooks. Use │
│ /hooks enable-all or /hooks disable-all to toggle all hooks at once. │
│ │
│ (Press Esc to close) │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
"
`;
@@ -57,6 +61,8 @@ exports[`HooksDialog > snapshots > renders hook with all metadata (matcher, sequ
│ Tip: Use /hooks enable <hook-name> or /hooks disable <hook-name> to toggle individual hooks. Use │
│ /hooks enable-all or /hooks disable-all to toggle all hooks at once. │
│ │
│ (Press Esc to close) │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
"
`;
@@ -93,6 +99,8 @@ exports[`HooksDialog > snapshots > renders hooks grouped by event name with enab
│ Tip: Use /hooks enable <hook-name> or /hooks disable <hook-name> to toggle individual hooks. Use │
│ /hooks enable-all or /hooks disable-all to toggle all hooks at once. │
│ │
│ (Press Esc to close) │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
"
`;
@@ -119,6 +127,8 @@ exports[`HooksDialog > snapshots > renders single hook with security warning, so
│ Tip: Use /hooks enable <hook-name> or /hooks disable <hook-name> to toggle individual hooks. Use │
│ /hooks enable-all or /hooks disable-all to toggle all hooks at once. │
│ │
│ (Press Esc to close) │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
"
`;