fix(cli): improve /btw overlay UX — layout, dismiss hints, and history cleanup

- Make /btw overlay mutually exclusive with Composer (replaces input area)
- Add dismiss hints: "Press Escape to cancel" (pending) / "Press Space,
  Enter, or Escape to dismiss" (completed)
- Skip adding /btw to conversation history to avoid duplicate display
- Prioritize dialog shortcuts over btw dismiss via dialogsVisibleRef
- Add `sleep` property to terminal-capture FlowStep for async wait scenarios

Made-with: Cursor
This commit is contained in:
yiliang114 2026-03-21 01:07:02 +08:00
parent 130d6888b4
commit dff9822f9b
6 changed files with 59 additions and 23 deletions

View file

@ -31,12 +31,17 @@ const BtwMessageInternal: React.FC<BtwDisplayProps> = ({ btw }) => (
</Text>
</Box>
{btw.isPending ? (
<Box>
<Text color={Colors.AccentYellow}>{'+ '}</Text>
<Text color={Colors.AccentYellow}>{t('Answering...')}</Text>
<Box flexDirection="column" marginTop={1}>
<Box>
<Text color={Colors.AccentYellow}>{'+ '}</Text>
<Text color={Colors.AccentYellow}>{t('Answering...')}</Text>
</Box>
<Box marginTop={1}>
<Text dimColor>{t('Press Escape to cancel')}</Text>
</Box>
</Box>
) : (
<Box flexDirection="column">
<Box flexDirection="column" marginTop={1}>
<Text wrap="wrap">{btw.answer}</Text>
<Box marginTop={1}>
<Text dimColor>{t('Press Space, Enter, or Escape to dismiss')}</Text>