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

@ -55,11 +55,6 @@ export const DefaultAppLayout: React.FC = () => {
<>
{/* Main view: conversation history + main composer / dialogs */}
<MainContent />
{uiState.btwItem && (
<Box marginX={2} width={uiState.mainAreaWidth}>
<BtwMessage btw={uiState.btwItem.btw} />
</Box>
)}
<Box flexDirection="column" ref={uiState.mainControlsRef}>
{uiState.dialogsVisible ? (
<Box
@ -72,6 +67,10 @@ export const DefaultAppLayout: React.FC = () => {
addItem={uiState.historyManager.addItem}
/>
</Box>
) : uiState.btwItem ? (
<Box marginX={2} width={terminalWidth - 4}>
<BtwMessage btw={uiState.btwItem.btw} />
</Box>
) : (
<Composer />
)}