Skip to content

Commit 03c0f25

Browse files
committed
address bot comments
1 parent f0f0c73 commit 03c0f25

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

packages/cli/src/ui/components/AskUserDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ const ChoiceQuestionView: React.FC<ChoiceQuestionViewProps> = ({
795795
// The options list will take the remaining space and scroll if necessary.
796796
// This is more robust than calculating based on `selectionItems.length`,
797797
// which can incorrectly shrink the question if there are many options.
798-
Math.max(1, Math.floor(listHeight * 0.7))
798+
Math.max(5, Math.floor(listHeight * 0.7))
799799
: 15;
800800
const questionHeight =
801801
listHeight && !isAlternateBuffer

packages/cli/src/ui/components/ToolConfirmationQueue.test.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,8 @@ describe('ToolConfirmationQueue', () => {
282282
// hideToolIdentity is true for ask_user -> subtracts 4 instead of 6
283283
// availableContentHeight = 19 - 4 = 15
284284
// ToolConfirmationMessage handlesOwnUI=true -> returns full 15
285-
// AskUserDialog allocates maxQuestionHeight = floor(15 * 0.7) = 10.
285+
// AskUserDialog allocates questionHeight = Math.min(maxQuestionHeight, Math.max(5, listHeight - DIALOG_PADDING)).
286+
// maxQuestionHeight = floor(15 * 0.7) = 10.
286287
// 10 lines is enough for the 6-line question + padding.
287288
await waitFor(() => {
288289
expect(lastFrame()).toContain('Line 6');

0 commit comments

Comments
 (0)