mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-13 05:12:55 -07:00
fix(cli): prevent plan truncation in approval dialog by supporting unconstrained heights
Fixes #20716
This commit is contained in:
@@ -789,9 +789,13 @@ const ChoiceQuestionView: React.FC<ChoiceQuestionViewProps> = ({
|
|||||||
const listHeight = availableHeight
|
const listHeight = availableHeight
|
||||||
? Math.max(1, availableHeight - overhead)
|
? Math.max(1, availableHeight - overhead)
|
||||||
: undefined;
|
: undefined;
|
||||||
|
const maxQuestionHeight =
|
||||||
|
question.unconstrainedHeight && listHeight
|
||||||
|
? Math.max(1, listHeight - DIALOG_PADDING - selectionItems.length * 2)
|
||||||
|
: 15;
|
||||||
const questionHeight =
|
const questionHeight =
|
||||||
listHeight && !isAlternateBuffer
|
listHeight && !isAlternateBuffer
|
||||||
? Math.min(15, Math.max(1, listHeight - DIALOG_PADDING))
|
? Math.min(maxQuestionHeight, Math.max(1, listHeight - DIALOG_PADDING))
|
||||||
: undefined;
|
: undefined;
|
||||||
const maxItemsToShow =
|
const maxItemsToShow =
|
||||||
listHeight && questionHeight
|
listHeight && questionHeight
|
||||||
|
|||||||
@@ -247,6 +247,7 @@ export const ExitPlanModeDialog: React.FC<ExitPlanModeDialogProps> = ({
|
|||||||
],
|
],
|
||||||
placeholder: 'Type your feedback...',
|
placeholder: 'Type your feedback...',
|
||||||
multiSelect: false,
|
multiSelect: false,
|
||||||
|
unconstrainedHeight: true,
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
onSubmit={(answers) => {
|
onSubmit={(answers) => {
|
||||||
|
|||||||
@@ -11,11 +11,7 @@ Implementation Steps
|
|||||||
2. Add session storage in src/storage/SessionStore.ts
|
2. Add session storage in src/storage/SessionStore.ts
|
||||||
3. Update src/commands/index.ts to check auth status
|
3. Update src/commands/index.ts to check auth status
|
||||||
4. Add tests in src/auth/__tests__/
|
4. Add tests in src/auth/__tests__/
|
||||||
|
... last 5 lines hidden (Ctrl+O to show) ...
|
||||||
Files to Modify
|
|
||||||
|
|
||||||
- src/index.ts - Add auth middleware
|
|
||||||
- src/config.ts - Add auth configuration options
|
|
||||||
|
|
||||||
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
|
||||||
@@ -38,11 +34,7 @@ Implementation Steps
|
|||||||
2. Add session storage in src/storage/SessionStore.ts
|
2. Add session storage in src/storage/SessionStore.ts
|
||||||
3. Update src/commands/index.ts to check auth status
|
3. Update src/commands/index.ts to check auth status
|
||||||
4. Add tests in src/auth/__tests__/
|
4. Add tests in src/auth/__tests__/
|
||||||
|
... last 5 lines hidden (Ctrl+O to show) ...
|
||||||
Files to Modify
|
|
||||||
|
|
||||||
- src/index.ts - Add auth middleware
|
|
||||||
- src/config.ts - Add auth configuration options
|
|
||||||
|
|
||||||
● 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
|
||||||
@@ -70,11 +62,7 @@ Implementation Steps
|
|||||||
2. Add session storage in src/storage/SessionStore.ts
|
2. Add session storage in src/storage/SessionStore.ts
|
||||||
3. Update src/commands/index.ts to check auth status
|
3. Update src/commands/index.ts to check auth status
|
||||||
4. Add OAuth2 provider support in src/auth/providers/OAuth2Provider.ts
|
4. Add OAuth2 provider support in src/auth/providers/OAuth2Provider.ts
|
||||||
5. Add SAML provider support in src/auth/providers/SAMLProvider.ts
|
... last 26 lines hidden (Ctrl+O to show) ...
|
||||||
6. Add LDAP provider support in src/auth/providers/LDAPProvider.ts
|
|
||||||
7. Create token refresh mechanism in src/auth/TokenManager.ts
|
|
||||||
8. Add multi-factor authentication in src/auth/MFAService.ts
|
|
||||||
... last 22 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
|
||||||
@@ -97,11 +85,7 @@ Implementation Steps
|
|||||||
2. Add session storage in src/storage/SessionStore.ts
|
2. Add session storage in src/storage/SessionStore.ts
|
||||||
3. Update src/commands/index.ts to check auth status
|
3. Update src/commands/index.ts to check auth status
|
||||||
4. Add tests in src/auth/__tests__/
|
4. Add tests in src/auth/__tests__/
|
||||||
|
... last 5 lines hidden (Ctrl+O to show) ...
|
||||||
Files to Modify
|
|
||||||
|
|
||||||
- src/index.ts - Add auth middleware
|
|
||||||
- src/config.ts - Add auth configuration options
|
|
||||||
|
|
||||||
● 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
|
||||||
|
|||||||
@@ -162,6 +162,8 @@ export interface Question {
|
|||||||
multiSelect?: boolean;
|
multiSelect?: boolean;
|
||||||
/** Placeholder hint text. For type='text', shown in the input field. For type='choice', shown in the "Other" custom input. */
|
/** Placeholder hint text. For type='text', shown in the input field. For type='choice', shown in the "Other" custom input. */
|
||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
|
/** Allow the question to consume more vertical space instead of being strictly capped. */
|
||||||
|
unconstrainedHeight?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AskUserRequest {
|
export interface AskUserRequest {
|
||||||
|
|||||||
Reference in New Issue
Block a user