mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-10 22:21:22 -07:00
prevent radio button area from getting truncated
This commit is contained in:
@@ -794,10 +794,15 @@ const ChoiceQuestionView: React.FC<ChoiceQuestionViewProps> = ({
|
||||
? Math.max(1, availableHeight - overhead)
|
||||
: undefined;
|
||||
|
||||
// Modulo the fixed overflow (overhead + 4 lines reserved for list), use all remaining height.
|
||||
const idealOptionsHeight = selectionItems.reduce(
|
||||
(acc, item) => acc + (item.value.description ? 2 : 1),
|
||||
0,
|
||||
);
|
||||
|
||||
// Use remaining height for the question, reserving space for the options list
|
||||
const maxQuestionHeight =
|
||||
question.unconstrainedHeight && listHeight
|
||||
? Math.max(5, listHeight - 4)
|
||||
? Math.max(5, listHeight - Math.min(idealOptionsHeight, 10))
|
||||
: 15;
|
||||
|
||||
const questionHeightLimit =
|
||||
@@ -805,10 +810,22 @@ const ChoiceQuestionView: React.FC<ChoiceQuestionViewProps> = ({
|
||||
? Math.min(maxQuestionHeight, listHeight)
|
||||
: undefined;
|
||||
|
||||
const maxItemsToShow =
|
||||
listHeight && actualQuestionHeight
|
||||
? Math.max(1, Math.floor((listHeight - actualQuestionHeight) / 2))
|
||||
: selectionItems.length;
|
||||
let maxItemsToShow = selectionItems.length;
|
||||
if (listHeight && actualQuestionHeight) {
|
||||
const remainingHeight = Math.max(0, listHeight - actualQuestionHeight);
|
||||
let linesUsed = 0;
|
||||
let itemsThatFit = 0;
|
||||
for (const item of selectionItems) {
|
||||
const itemLines = item.value.description ? 2 : 1;
|
||||
if (linesUsed + itemLines <= remainingHeight) {
|
||||
linesUsed += itemLines;
|
||||
itemsThatFit++;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
maxItemsToShow = Math.max(1, itemsThatFit);
|
||||
}
|
||||
|
||||
return (
|
||||
<Box flexDirection="column">
|
||||
|
||||
@@ -75,15 +75,13 @@ Implementation Steps
|
||||
7. Create token refresh mechanism in src/auth/TokenManager.ts
|
||||
8. Add multi-factor authentication in src/auth/MFAService.ts
|
||||
9. Implement session timeout handling in src/auth/SessionManager.ts
|
||||
10. Add audit logging for auth events in src/auth/AuditLogger.ts
|
||||
... last 20 lines hidden (Ctrl+O to show) ...
|
||||
... last 21 lines hidden (Ctrl+O to show) ...
|
||||
|
||||
▲
|
||||
● 1. Yes, automatically accept edits
|
||||
Approves plan and allows tools to run automatically
|
||||
2. Yes, manually accept edits
|
||||
Approves plan but requires confirmation for each tool
|
||||
▼
|
||||
3. Type your feedback...
|
||||
|
||||
Enter to select · ↑/↓ to navigate · Ctrl+X to edit plan · Esc to cancel
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user