mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-13 05:12:55 -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)
|
? Math.max(1, availableHeight - overhead)
|
||||||
: undefined;
|
: 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 =
|
const maxQuestionHeight =
|
||||||
question.unconstrainedHeight && listHeight
|
question.unconstrainedHeight && listHeight
|
||||||
? Math.max(5, listHeight - 4)
|
? Math.max(5, listHeight - Math.min(idealOptionsHeight, 10))
|
||||||
: 15;
|
: 15;
|
||||||
|
|
||||||
const questionHeightLimit =
|
const questionHeightLimit =
|
||||||
@@ -805,10 +810,22 @@ const ChoiceQuestionView: React.FC<ChoiceQuestionViewProps> = ({
|
|||||||
? Math.min(maxQuestionHeight, listHeight)
|
? Math.min(maxQuestionHeight, listHeight)
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
const maxItemsToShow =
|
let maxItemsToShow = selectionItems.length;
|
||||||
listHeight && actualQuestionHeight
|
if (listHeight && actualQuestionHeight) {
|
||||||
? Math.max(1, Math.floor((listHeight - actualQuestionHeight) / 2))
|
const remainingHeight = Math.max(0, listHeight - actualQuestionHeight);
|
||||||
: selectionItems.length;
|
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 (
|
return (
|
||||||
<Box flexDirection="column">
|
<Box flexDirection="column">
|
||||||
|
|||||||
@@ -75,15 +75,13 @@ Implementation Steps
|
|||||||
7. Create token refresh mechanism in src/auth/TokenManager.ts
|
7. Create token refresh mechanism in src/auth/TokenManager.ts
|
||||||
8. Add multi-factor authentication in src/auth/MFAService.ts
|
8. Add multi-factor authentication in src/auth/MFAService.ts
|
||||||
9. Implement session timeout handling in src/auth/SessionManager.ts
|
9. Implement session timeout handling in src/auth/SessionManager.ts
|
||||||
10. Add audit logging for auth events in src/auth/AuditLogger.ts
|
... last 21 lines hidden (Ctrl+O to show) ...
|
||||||
... last 20 lines hidden (Ctrl+O to show) ...
|
|
||||||
|
|
||||||
▲
|
|
||||||
● 1. Yes, automatically accept edits
|
● 1. Yes, automatically accept edits
|
||||||
Approves plan and allows tools to run automatically
|
Approves plan and allows tools to run automatically
|
||||||
2. Yes, manually accept edits
|
2. Yes, manually accept edits
|
||||||
Approves plan but requires confirmation for each tool
|
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
|
Enter to select · ↑/↓ to navigate · Ctrl+X to edit plan · Esc to cancel
|
||||||
"
|
"
|
||||||
|
|||||||
Reference in New Issue
Block a user