address bot comments

This commit is contained in:
A.K.M. Adib
2026-03-04 12:56:31 -05:00
parent 36b06f7333
commit 0f88ddb73e
2 changed files with 3 additions and 2 deletions

View File

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

View File

@@ -282,7 +282,8 @@ describe('ToolConfirmationQueue', () => {
// hideToolIdentity is true for ask_user -> subtracts 4 instead of 6
// availableContentHeight = 19 - 4 = 15
// ToolConfirmationMessage handlesOwnUI=true -> returns full 15
// AskUserDialog allocates maxQuestionHeight = floor(15 * 0.7) = 10.
// AskUserDialog allocates questionHeight = Math.min(maxQuestionHeight, Math.max(5, listHeight - DIALOG_PADDING)).
// maxQuestionHeight = floor(15 * 0.7) = 10.
// 10 lines is enough for the 6-line question + padding.
await waitFor(() => {
expect(lastFrame()).toContain('Line 6');